[flexcoders] Re: Advanced(?) Actionscript question

2008-04-28 Thread Bjorn Schultheiss
Check this out.. Mixins, How to. http://flexonrails.net/?p=79 --- In flexcoders@yahoogroups.com, "Josh McDonald" <[EMAIL PROTECTED]> wrote: > > Of course, I always forger about the "dynamic" keyword :) > > On Tue, Apr 29, 2008 at 1:18 PM, Bjorn Schultheiss < > [EMAIL PROTECTED]> wrote: > > >

Re: [flexcoders] Re: Advanced(?) Actionscript question

2008-04-28 Thread Josh McDonald
Of course, I always forger about the "dynamic" keyword :) On Tue, Apr 29, 2008 at 1:18 PM, Bjorn Schultheiss < [EMAIL PROTECTED]> wrote: > I believe you can do this > > class Foo > { > var bar:Function; > } > > //somewhere outside the class > > function myfunction():void {trace('hi')}; > > > va

[flexcoders] Re: Advanced(?) Actionscript question

2008-04-28 Thread Bjorn Schultheiss
I believe you can do this class Foo { var bar:Function; } //somewhere outside the class function myfunction():void {trace('hi')}; var foo:Foo = new Foo; foo.bar = myfunction; if you have class Foo { function bar():void {} } then you must override. But you have more flexibility if Foo