|
Don't think of things as "inclusion" and "pulling in", think of it as
cooperating components.
You can use Application.application, but I think this leads to awful
code.
One slightly better mechanism is to pass the child component a direct
handle to the things it might need to manipulate.
I.e. in a creationComplete handler, do:
child.setOutputWidget( this.sometextfield );
But my favorite (which requires a bit more work) is to make your
application implement an interface that you define:
public interface IWhatever
{
public function doSomething( .. );
}
and then pass "this" to your child components, which expect an
IWhatever:
child.setWhatever( this )
(and in the child...)
public function setWhatever( whatever:IWhatever )
{..}
Cheers,
-rg
|
- RE: [flexcoders] Spltting up code (best practice) Roger Gonzalez
- Re: [flexcoders] Spltting up code (best practice) Anatole Tartakovsky
- RE: [flexcoders] Spltting up code (best practice) Jonathan Miranda
- Re: [flexcoders] Spltting up code (best pract... Anatole Tartakovsky
- Re: [flexcoders] Spltting up code (best p... Teoti Graphix
- Re: [flexcoders] Spltting up code (be... Anatole Tartakovsky

