The PureMVC Framework
Code at the Speed of Thought
Over 10 years of community discussion and knowledge are maintained here as a read-only archive.
New discussions should be taken up in issues on the appropriate projects at
PureMVC Architects Lounge
Announcements and General Discussion
Topic: Register Mediators (Read 3881 times)
March 30, 2009, 05:56:49 »
have the main mxml file displaying a viewstack of a login panel and a main panel. inside the main panel there is two panels, a form panel and a list panel
On startup, the application mediator and the login mediator are attached to the application panel and to the login panel respectively. on login_successful event, the application mediator attaches the main panel mediator to the main panel. the main panel mediator then attaches mediators for the form panel and list panel.
when registering the mediators for the form panel and list panel in the main panel mediator, the view component reference (to list / form panel) from the main panel is null. the reference from the main panel mediator to the form panel is null, the same applies to the list panel. The reason why is because the panels for form and list hasn't yet been rendered, therefore are null.
is there a way to eagerly load the panels? or is there a better way of architecting it to attach listeners to invoke the registermediator to happen after the panels have been created?
sorry im quite new to flex so any feedback on anyone who has come across a similar issue like this would be appreciated greatly.
Re: Register Mediators
Reply #1 on:
March 30, 2009, 04:16:47 »
Deferred instantiation. Check out this article and demo:
Powered by SMF 2.0.15
SMF © 2006-2007, Simple Machines LLC
Content © 2006-2018, Futurescale, Inc.