import com.myproject.view.components.MyComponent;
protected function get myComponent():MyComponent
{
return MyComponent(viewComponent);
}
I also have an external swf whose document class is set to MyComponent. When I load up all of my application swfs I pass that loaded component to MyMediator:
facade.registerMediator( new MyMediator( myLoadedComponentReference ));
This is typically how I setup my mediators/components. However I realize now that because MyMediator imports MyComponent that I am compiling the MyComponent class in two places ( in the main application which holds my puremvc mediator and in the MyComponent swf ). This all seems very wrong to me as I believe things should only be compiled in one location, otherwise it's just wasting memory and potentially dangerous.
Do you guys have some opinions on all of this? Should loaded classes only be referenced by interface?
- rob