Hi Fabian, Thanks -- I tested your solution and it works perfectly :)
Simon ----- Original Message ---- From: Fabian Jakobs <[EMAIL PROTECTED]> To: qooxdoo Development <[email protected]> Sent: Thursday, 15 February, 2007 6:15:03 PM Subject: Re: [qooxdoo-devel] Method broken by make build? Hi Simon, the problem here seems to be the local variable optimizer. The variable "callbackObj" (1) seems to be local and is thus renamed to "$0" (3). The problem arises from the eval. The string "callbackObj." (2) of cause cannot be detected to be a reference to the local variable and is not renamed. It is always a good idea to avoid "eval". You could rewrite your code like this: (callbackObj[callbackMethodName])(args): Best Fabian > > > Here is the (trimmed) uncompressed code: > > qx.Proto.waitForMapManager = function(callbackObj, callbackMethodName, > callbackArgsKey) > { > ... > > // Check whether our MapManager exists yet > if (this.getMapManager() != null) > { > // Lookup any (optional) callback args > var args = callbackObj.getUserData(callbackArgsKey); > ^^^^^^(1)^^^^^ > // Invoke our callbackObj > var callbackScript = "callbackObj." + callbackMethodName + "(args);" > ^^^^ (2) ^^^ > eval(callbackScript); > } > else > { > ... > > } > } > > > > Here is the compressed code: > > qx.Proto.waitForMapManager=function($0,$1,$2){var $3=false; > var $4=false; > if($0&&$0.getUserData){$3=true; > if($1){if($0[$1]){$4=true; > }}}if(!$3||!$4){this.warn($[1634]); > return; > }if(this.getMapManager()!=null){var $5=$0.getUserData($2); > ^^ (3) ^^ > var $6=$[1023]+$1+$[1572]; > eval($6); > }else{var $7=this._hashCode; > setTimeout(function(){var $8=qx.core.Object._db[$7]; > $8.waitForMapManager($0,$1,$2); > $0=null; > },100); > }}; > > Best Fabian ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel Send instant messages to your online friends http://au.messenger.yahoo.com ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
