Changeset 6392
- Timestamp:
- 11/01/06 08:45:48 (21 months ago)
- Location:
- trunk/src
- Files:
-
- 3 modified
-
bootstrap1.js (modified) (16 diffs)
-
debug.js (modified) (1 diff)
-
event/common.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bootstrap1.js
r6258 r6392 14 14 // TODOC: HOW TO DOC THE BELOW? 15 15 // @global: djConfig 16 // summary: 16 // summary: 17 17 // Application code can set the global 'djConfig' prior to loading 18 // the library to override certain global settings for how dojo works. 18 // the library to override certain global settings for how dojo works. 19 19 // description: The variables that can be set are as follows: 20 20 // - isDebug: false … … 33 33 // TODOC: IS THIS A COMPLETE LIST? 34 34 // note: 35 // 'djConfig' does not exist under 'dojo.*' so that it can be set before the 36 // 'dojo' variable exists. 35 // 'djConfig' does not exist under 'dojo.*' so that it can be set before the 36 // 'dojo' variable exists. 37 37 // note: 38 // Setting any of these variables *after* the library has loaded does nothing at all. 38 // Setting any of these variables *after* the library has loaded does nothing at all. 39 39 // TODOC: is this still true? Release notes for 0.3 indicated they could be set after load. 40 40 // … … 43 43 //TODOC: HOW TO DOC THIS? 44 44 // @global: dj_global 45 // summary: 45 // summary: 46 46 // an alias for the top-level global object in the host environment 47 47 // (e.g., the window object in a browser). 48 // description: 48 // description: 49 49 // Refer to 'dj_global' rather than referring to window to ensure your 50 50 // code runs correctly in contexts other than web browsers (eg: Rhino on a server). … … 53 53 //TODOC: HOW TO DOC THIS? 54 54 // @global: dj_currentContext 55 // summary: 55 // summary: 56 56 // Private global context object. Where 'dj_global' always refers to the boot-time 57 57 // global context, 'dj_currentContext' can be modified for temporary context shifting. 58 58 // dojo.global() returns dj_currentContext. 59 // description: 59 // description: 60 60 // Refer to dojo.global() rather than referring to dj_global to ensure your 61 61 // code runs correctly in managed contexts. … … 75 75 76 76 // make sure djConfig is defined 77 if(dj_undef("djConfig", this)){ 78 var djConfig = {}; 77 if(dj_undef("djConfig", this)){ 78 var djConfig = {}; 79 79 } 80 80 81 81 //TODOC: HOW TO DOC THIS? 82 82 // dojo is the root variable of (almost all) our public symbols -- make sure it is defined. 83 if(dj_undef("dojo", this)){ 84 var dojo = {}; 83 if(dj_undef("dojo", this)){ 84 var dojo = {}; 85 85 } 86 86 … … 89 89 // return the current global context object 90 90 // (e.g., the window object in a browser). 91 // description: 91 // description: 92 92 // Refer to 'dojo.global()' rather than referring to window to ensure your 93 93 // code runs correctly in contexts other than web browsers (eg: Rhino on a server). … … 112 112 dojo.evalProp = function(/*String*/ name, /*Object*/ object, /*Boolean?*/ create){ 113 113 // summary: Returns 'object[name]'. If not defined and 'create' is true, will return a new Object. 114 // description: 114 // description: 115 115 // Returns null if 'object[name]' is not defined and 'create' is not true. 116 // Note: 'defined' and 'exists' are not the same concept. 116 // Note: 'defined' and 'exists' are not the same concept. 117 117 if((!object)||(!name)) return undefined; // undefined 118 118 if(!dj_undef(name, object)) return object[name]; // mixed … … 122 122 dojo.parseObjPath = function(/*String*/ path, /*Object?*/ context, /*Boolean?*/ create){ 123 123 // summary: Parse string path to an object, and return corresponding object reference and property name. 124 // description: 125 // Returns an object with two properties, 'obj' and 'prop'. 124 // description: 125 // Returns an object with two properties, 'obj' and 'prop'. 126 126 // 'obj[prop]' is the reference indicated by 'path'. 127 127 // path: Path to an object, in the form "A.B.C". … … 141 141 // path: Path to an object, in the form "A.B.C". 142 142 // create: If true, Objects will be created at any point along the 'path' that is undefined. 143 if(typeof path != "string"){ 144 return dojo.global(); 143 if(typeof path != "string"){ 144 return dojo.global(); 145 145 } 146 146 // fast path for no periods … … 178 178 if(exception){ 179 179 message = message + ": "+dojo.errorToString(exception); 180 }else{ 181 message = dojo.errorToString(message); 180 182 } 181 183 … … 192 194 dojo.profile = { start: function(){}, end: function(){}, stop: function(){}, dump: function(){} }; 193 195 194 function dj_eval(/*String*/ scriptFragment){ 196 function dj_eval(/*String*/ scriptFragment){ 195 197 // summary: Perform an evaluation in the global scope. Use this rather than calling 'eval()' directly. 196 198 // description: Placed in a separate function to minimize size of trapped evaluation context. … … 265 267 dojo.hostenv = (function(){ 266 268 // TODOC: HOW TO DOC THIS? 267 // summary: Provides encapsulation of behavior that changes across different 'host environments' 269 // summary: Provides encapsulation of behavior that changes across different 'host environments' 268 270 // (different browsers, server via Rhino, etc). 269 271 // description: None of these methods should ever be called directly by library users. 270 272 // Use public methods such as 'loadModule' instead. 271 273 272 274 // default configuration options 273 275 var config = { … … 299 301 300 302 301 getName: function(){ 303 getName: function(){ 302 304 // sumary: Return the name of the host environment. 303 305 return this.name_; // String … … 305 307 306 308 307 getVersion: function(){ 309 getVersion: function(){ 308 310 // summary: Return the version of the hostenv. 309 311 return this.version_; // String … … 312 314 getText: function(/*String*/ uri){ 313 315 // summary: Read the plain/text contents at the specified 'uri'. 314 // description: 315 // If 'getText()' is not implemented, then it is necessary to override 316 // description: 317 // If 'getText()' is not implemented, then it is necessary to override 316 318 // 'loadUri()' with an implementation that doesn't rely on it. 317 319 … … 327 329 // MAYBE: Return the base uri to scripts in the dojo library. ??? 328 330 // return: Empty string or a path ending in '/'. 329 if(djConfig.baseScriptUri.length){ 331 if(djConfig.baseScriptUri.length){ 330 332 return djConfig.baseScriptUri; 331 333 } -
trunk/src/debug.js
r6280 r6392 3 3 // Produce a line of debug output. Does nothing unless 4 4 // djConfig.isDebug is true. Accepts any nubmer of args, joined with 5 // ' ' to produce a single line of debugging output. Caller should not5 // ' ' to produce a single line of debugging output. Caller should not 6 6 // supply a trailing "\n". 7 7 if (!djConfig.isDebug) { return; } -
trunk/src/event/common.js
r6187 r6392 713 713 result = this.object[this.methodname].apply(this.object, args); 714 714 } 715 }catch(e){ if(!this.squelch){ dojo.raise(e); } } 715 }catch(e){ 716 if(!this.squelch){ 717 dojo.debug(e,"when calling",this.methodname,"on",this.object,"with arguments",args); 718 dojo.raise(e); 719 } 720 } 716 721 717 722 if((this["after"])&&(this.after.length>0)){