| |||||||||||||||||||||||||||||||
|
is no longer needed. (Yay!) But, in the meantime, Delegate is the best solution to the problem of associating a function call with a scope. Also worth mentioning is that since static functions have no scope, you don't need to use Delegate with them. class MyClass { public function MyClass() { var nameData:LoadVars = new LoadVars(); nameData.onData = sayHelloTo; nameData.load("filename.txt"); } public static function sayHelloTo(name:String):Void { trace("Hello, " + name + "!"); } } On 2/15/07, Andy Herrman <aherrman> wrote: > > [explanation snipped] > > On 2/15/07, Omar Fouad <omarfouad.net> wrote: > > mmm still don't get the delegate concept.... _______________________________________________ Flashcoders 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
| ||||||||||||||||||||||||||||||
© 2004-2008 readlist.com