Hi list, I've been dabbling in the black art of wrapping function calls today, and seeing the list is now and then visited by questions on how to trace function names for functions being called and how to insert and take out debug statements, I've decided to post this here, hopefully it's of use to someone, otherwise just ignore it:):
http://objectpainters.com/blog/?p=62 Basically assume you have this (excerpt from the post): var lTestClass:TestClass = new TestClass (); lTestClass.testMethod(1,2,3); it that it prints (testMethod calls testMethod2): This is printed by testMethod This is printed by testMethod 2 Using the FunctionWrapper, it will print: => Entering testMethod with arguments 1,2,3 This is printed by testMethod => Entering testMethod2 This is printed by testMethod 2 <= Exiting testMethod2 with no return value. <= Exiting testMethod with return value:I am testMethod's returnvalue Greetz and a nice weekend to you all! JC ps you can specify which trace function to use, eg trace or _global.tt or whatever. _______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com