You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xap-commits@incubator.apache.org by mt...@apache.org on 2006/11/29 17:54:39 UTC
svn commit: r480659 - in /incubator/xap/trunk/src/xap: Xap.js util/Debug.js
Author: mturyn
Date: Wed Nov 29 09:54:38 2006
New Revision: 480659
URL: http://svn.apache.org/viewvc?view=rev&rev=480659
Log:
Fixed so that _debugAll==true gets all classes.
Modified:
incubator/xap/trunk/src/xap/Xap.js
incubator/xap/trunk/src/xap/util/Debug.js
Modified: incubator/xap/trunk/src/xap/Xap.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/Xap.js?view=diff&rev=480659&r1=480658&r2=480659
==============================================================================
--- incubator/xap/trunk/src/xap/Xap.js (original)
+++ incubator/xap/trunk/src/xap/Xap.js Wed Nov 29 09:54:38 2006
@@ -127,7 +127,7 @@
-Xap.ourLoadedClasses = new Object() ;
+Xap.ourDebugLoadClasses = new Object() ;
Xap.kwCompoundRequire = function(){
@@ -171,28 +171,22 @@
// Don't reload, don't depend on ArrayHelper being around
// yet, so keep the class names easily accessible in an Object:
- var alreadyLoaded = (Xap.ourLoadedClasses[toLoad]) ? true : false;
- if (alreadyLoaded) {
- //Xap._logString += "nRedundant load attempt: "+toLoad ;
- // We've already loaded this, so it's loadable:
- result = true;
- } else {
+ var alreadyDebugLoaded = (Xap.ourDebugLoadClasses[toLoad]) ? true :false ;
- // do we need to reload this file?
- //---is it in the "debuggables" list?--are we reloading everything?
- var needToDebugLoad = theDebugger && notModule && (xap.util.Debug._debugAll || (xap.util.Debug._debugLoad && xap.util.Debug._debuggables[toLoad]));
- try {
- dojo.require.apply(dojo, arguments);
- if (needToDebugLoad) {
- xap.util.Debug.addDebuggables([toLoad]);
- Xap.ourLoadedClasses[toLoad] = true;
- }
- result = true;
- }
- catch (ee) {
- //Xap._logString += 'n'+ee ;
- result = false;
+ // do we need to reload this file?
+ //---is it in the "debuggables" list?--are we reloading everything?
+ var needToDebugLoad = theDebugger && notModule && (xap.util.Debug._debugAll || (xap.util.Debug._debugLoad && xap.util.Debug._debuggables[toLoad]));
+ try {
+ dojo.require.apply(dojo, arguments);
+ if (needToDebugLoad && !alreadyDebugLoaded ) {
+ xap.util.Debug.addDebuggables(toLoad);
+ Xap.ourDebugLoadClasses[toLoad] = true;
}
+ result = true;
+ }
+ catch (ee) {
+ //Xap._logString += 'n'+ee ;
+ result = false;
}
return result;
};
Modified: incubator/xap/trunk/src/xap/util/Debug.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/util/Debug.js?view=diff&rev=480659&r1=480658&r2=480659
==============================================================================
--- incubator/xap/trunk/src/xap/util/Debug.js (original)
+++ incubator/xap/trunk/src/xap/util/Debug.js Wed Nov 29 09:54:38 2006
@@ -44,13 +44,16 @@
if( !xap.util.Debug._debuggables ){
xap.util.Debug._debuggables = new Object() ;
}
+ if( typeof dbs == "string" ){
+ return xap.util.Debug.addDebuggables([dbs]) ;
+ }
for (var ii=0; ii<dbs.length; ++ii ){
xap.util.Debug._debuggables[dbs[ii]] = true ;
}
}
/**
- * Load the list of debuggable file from the server.
+ * Load the list of debuggable files from the server.
*/
xap.util.Debug.loadDebuggables = function(){
//If there are args, the first should be a list of