Changeset 3209
- Timestamp:
- 05/30/07 13:01:31 (2 years ago)
- Files:
-
- sandbox/tschaub/debug/examples/debug.html (modified) (3 diffs)
- sandbox/tschaub/debug/lib/Firebug/DebugOpenLayers.js (modified) (5 diffs)
- sandbox/tschaub/debug/lib/Firebug/firebug.html (modified) (1 diff)
- sandbox/tschaub/debug/lib/OpenLayers/BaseTypes.js (modified) (2 diffs)
- sandbox/tschaub/debug/lib/OpenLayers/Layer.js (modified) (1 diff)
- sandbox/tschaub/debug/tests/BaseTypes/test_Console.html (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
sandbox/tschaub/debug/examples/debug.html
r3058 r3209 8 8 <!-- 9 9 function consoleLog() { 10 OpenLayers. console.log("This is the result of an OpenLayers.console.log() call");10 OpenLayers.Console.log("This is the result of an OpenLayers.Console.log() call"); 11 11 } 12 12 function consoleWarn() { 13 OpenLayers. console.warn("This is the result of an OpenLayers.console.warn() call");13 OpenLayers.Console.warn("This is the result of an OpenLayers.Console.warn() call"); 14 14 } 15 15 function consoleError() { 16 OpenLayers. console.error("This is the result of an OpenLayers.console.error() call");16 OpenLayers.Console.error("This is the result of an OpenLayers.Console.error() call"); 17 17 } 18 18 function consoleDir() { 19 OpenLayers. console.dir(OpenLayers);19 OpenLayers.Console.dir(OpenLayers); 20 20 } 21 21 function consoleDirxml() { 22 OpenLayers. console.dirxml(document.getElementsByTagName('body')[0]);22 OpenLayers.Console.dirxml(document.getElementsByTagName('body')[0]); 23 23 } 24 24 // --> … … 33 33 </pre> 34 34 The path to DebugOpenLayers.js must be relative to your 35 html file. With this script included calls to OpenLayers. console35 html file. With this script included calls to OpenLayers.Console 36 36 will be displayed in the Firebug console. For browsers without 37 37 the Firebug extension, the script creates a Firebug Lite console. … … 43 43 <ul> 44 44 <li> 45 <a href="javascript: void(consoleLog());">OpenLayers. console.log()</a>45 <a href="javascript: void(consoleLog());">OpenLayers.Console.log()</a> 46 46 </li> 47 47 <li> 48 <a href="javascript: void(consoleWarn());">OpenLayers. console.warn()</a>48 <a href="javascript: void(consoleWarn());">OpenLayers.Console.warn()</a> 49 49 </li> 50 50 <li> 51 <a href="javascript: void(consoleError());">OpenLayers. console.error()</a>51 <a href="javascript: void(consoleError());">OpenLayers.Console.error()</a> 52 52 </li> 53 53 <li> 54 <a href="javascript: void(consoleDir());">OpenLayers. console.dir()</a>54 <a href="javascript: void(consoleDir());">OpenLayers.Console.dir()</a> 55 55 </li> 56 56 <li> 57 <a href="javascript: void(consoleDirxml());">OpenLayers. console.dirxml()</a>57 <a href="javascript: void(consoleDirxml());">OpenLayers.Console.dirxml()</a> 58 58 </li> 59 59 </ul> sandbox/tschaub/debug/lib/Firebug/DebugOpenLayers.js
r3058 r3209 3 3 * script tag to get Firebug debugging in any browser. With this script 4 4 * included, if a browser has the Firebug extension installed, calls to 5 * OpenLayers. console will get rerouted to console. If a browser does not5 * OpenLayers.Console will get rerouted to console. If a browser does not 6 6 * have the Firebug extension installed, this script mimics the behavior 7 7 * of that extension. With this script included, the Firebug console can … … 11 11 * http://www.getfirebug.com/lite.html 12 12 * Modifications include putting the console object in the OpenLayers 13 * namespace, modifying getFirebugURL, and re-routing OpenLayers. console calls13 * namespace, modifying getFirebugURL, and re-routing OpenLayers.Console calls 14 14 * to console if the Firebug extension is installed. 15 15 */ … … 18 18 if (("console" in window) && ("firebug" in console)) { 19 19 /** 20 * If the Firebug extension is installed, re-route all OpenLayers. console20 * If the Firebug extension is installed, re-route all OpenLayers.Console 21 21 * calls to the console object. 22 22 */ 23 OpenLayers.Util.extend(OpenLayers. console, console);23 OpenLayers.Util.extend(OpenLayers.Console, console); 24 24 } else { 25 25 /** … … 29 29 (function() 30 30 { 31 OpenLayers. console =31 OpenLayers.Console = 32 32 { 33 33 log: function() … … 282 282 } 283 283 284 OpenLayers. console.log(value);284 OpenLayers.Console.log(value); 285 285 } 286 286 sandbox/tschaub/debug/lib/Firebug/firebug.html
r3058 r3209 11 11 <body> 12 12 <div id="toolbar" class="toolbar"> 13 <a href="#" onclick="parent.OpenLayers. console.clear()">Clear</a>13 <a href="#" onclick="parent.OpenLayers.Console.clear()">Clear</a> 14 14 <span class="toolbarRight"> 15 <a href="#" onclick="parent.OpenLayers. console.close()">Close</a>15 <a href="#" onclick="parent.OpenLayers.Console.close()">Close</a> 16 16 </span> 17 17 </div> sandbox/tschaub/debug/lib/OpenLayers/BaseTypes.js
r3152 r3209 951 951 */ 952 952 953 OpenLayers. console = {};953 OpenLayers.Console = {}; 954 954 (function() { 955 955 var methods = ['log', 'debug', 'info', 'warn', 'error', 'assert', … … 957 957 'timeEnd', 'profile', 'profileEnd', 'count']; 958 958 for(var i=0; i<methods.length; ++i) { 959 OpenLayers. console[methods[i]] = function() {};959 OpenLayers.Console[methods[i]] = function() {}; 960 960 } 961 961 })(); sandbox/tschaub/debug/lib/OpenLayers/Layer.js
r3152 r3209 310 310 // layers with gutters need non-null tile sizes 311 311 //if(tileSize == null) { 312 // OpenLayers. console.error("Error in layer.setMap() for " +312 // OpenLayers.Console.error("Error in layer.setMap() for " + 313 313 // this.name + ": layers with gutters " + 314 314 // "need non-null tile sizes"); sandbox/tschaub/debug/tests/BaseTypes/test_Console.html
r3058 r3209 7 7 /** 8 8 * These tests only assure that OpenLayers works when not 9 * in debug mode. It means that calls to OpenLayers. console9 * in debug mode. It means that calls to OpenLayers.Console 10 10 * will not do anything in this case. When OpenLayers is in 11 11 * debug mode, we assume that the Firebug extension or Firebug Lite … … 13 13 */ 14 14 15 // supported OpenLayers. console methods15 // supported OpenLayers.Console methods 16 16 var methods = ['log', 'debug', 'info', 'warn', 'error', 'assert', 17 17 'dir', 'dirxml', 'trace', 'group', 'groupEnd', 'time', … … 22 22 var nothing, method; 23 23 for(var i=0; i<methods.length; ++i) { 24 method = OpenLayers. console[methods[i]];24 method = OpenLayers.Console[methods[i]]; 25 25 t.ok(method, 26 "OpenLayers. console." + methods[i] + " exists");27 nothing = OpenLayers. console[methods[i]]();26 "OpenLayers.Console." + methods[i] + " exists"); 27 nothing = OpenLayers.Console[methods[i]](); 28 28 t.eq(nothing, null, 29 "OpenLayers. console." + methods[i] + "() " +29 "OpenLayers.Console." + methods[i] + "() " + 30 30 "call is harmless when not in debug mode"); 31 31 }
