"Out" - by Big Space Ship
http://labs.bigspaceship.com/blog/?p=28

"...it does make it a lot easier to scan through large volumes of trace()
output and find the information you're looking for by formatting it nicely.
This means that every line traced out is prefixed with the classname of the
instance executing the trace, as well as the type of event the trace is
intended to represent. There's also the option of filtering the outputs such
that only traces from specific classes or of specific types are displayed."



-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of eka
Sent: Saturday, April 28, 2007 12:33 AM
To: flashcoders@chattyfig.figleaf.com
Subject: Re: [Flashcoders] How to call a global method like "trace"--not
theclass method?

Hello :)

Try this code :

class Debug
{


   static public function trace(str:String):void { .. }

   static public function initialize()
   {
          _global.WRITE = Debug.trace ;
   }

}

/// in your code... first in your application :

Debug.initialize() ;

// now you can use the 2 solutions to debug your application :

Debug.trace( "hello world" ) ;

or

_global.WRITE( "hello world" ) ;

EKA+ :)




2007/4/28, Douglas Pearson <[EMAIL PROTECTED]>:
>
> We have a class used in a lot of code that has a "trace" method in it:
>
> class Debug {
>     public function trace(str:String):void { .. }
> }
>
> Now we'd like to call the regular "trace" method from within that class,
> but
> all of our efforts call to the class's trace method.
>
> In C++ you use "::" to indicate a global method so it would be ::trace().
>
> Is there anyway to do something similar in ActionScript?  Obviously, we
> could rename our method to something else but that would mean changing a
> lot
> of existing code.
>
> Thanks,
>
> Doug
>
> _______________________________________________
> 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
>
_______________________________________________
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


_______________________________________________
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

Reply via email to