From: Richard K. <ric...@us...> - 2005-05-22 03:49:14
|
Update of /cvsroot/actionstep/actionstep/src/org/actionstep In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18977 Modified Files: ASDebugger.as Removed Files: ActionStep.as Log Message: removed ActionStep.as and added test/ASTestMain in its place Index: ASDebugger.as =================================================================== RCS file: /cvsroot/actionstep/actionstep/src/org/actionstep/ASDebugger.as,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ASDebugger.as 4 May 2005 05:04:43 -0000 1.2 --- ASDebugger.as 22 May 2005 03:49:06 -0000 1.3 *************** *** 102,105 **** --- 102,145 ---- } + /** + * Prints the source ot flash var + */ + public static function dump(obj){ + if(obj == null) return; + + switch( obj.constructor ){ + + case Number: + return obj; + + case String: + return "String(" + obj + ")"; + + case Array: + var els = []; + for(var key in obj){ + els[els.length] = "" + + key + + ":" + + dump(obj[key]); + } + return "Array("+els.join(", ")+")" + case Object: + case TextField: //default + dom + var els = []; + for(var key in obj){ + els[els.length] = "" + + key + + ":" + + dump(obj[key]); + } + return "Object("+els.join(", ")+")"; + + default : + return obj.toString(); + } + } + + /* * Sets the level of the debugger --- ActionStep.as DELETED --- |