incubator-xap-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mtu...@apache.org
Subject svn commit: r442693 - /incubator/xap/trunk/src/xap/Xap.js
Date Tue, 12 Sep 2006 20:33:04 GMT
Author: mturyn
Date: Tue Sep 12 13:33:03 2006
New Revision: 442693

URL: http://svn.apache.org/viewvc?view=rev&rev=442693
Log:
Altered setupClassAsSubclassOf() in order to handler descent from a globally-scoped class
(in particular, Object);

Modified:
    incubator/xap/trunk/src/xap/Xap.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=442693&r1=442692&r2=442693
==============================================================================
--- incubator/xap/trunk/src/xap/Xap.js (original)
+++ incubator/xap/trunk/src/xap/Xap.js Tue Sep 12 13:33:03 2006
@@ -337,12 +337,19 @@
 
 
 Xap.resolveConstructor = function(aString){
+	var result ;
 	var scoper = dj_global ;
-	var arr  = aString.split(".") ;
-	for( var kk=0; kk< arr.length - 1; ++kk ){
-		scoper = scoper[arr[kk]] ;
+	// handle global objects 
+	if (typeof scoper[aString] !== "undefined"){
+		result = scoper[aString] ;
+	} else {	
+		var arr  = aString.split(".") ;
+		for( var kk=0; kk< arr.length - 1; ++kk ){
+			scoper = scoper[arr[kk]] ;
+		}
+		result =  scoper[arr[arr.length-1]] ;
 	}
-	return  scoper[arr[arr.length-1]] ;
+	return result ;
 }
 
 



Mime
View raw message