1 Reply Latest reply on Dec 8, 2010 12:53 AM by SJ_FR

    Trouble with event sequence when initializing MXML component

    SJ_FR

      Hi everyone,

       

      Here is my problem:

       

      I'm using a Cairngorm-like architecture for those who know, for those who don't, my point is that the components from the view layer of the MVC pattern are subdivided into two parts:

      1. the MXML part which is the view, the layout and 2. the AS part called presentation manager, which is kind of a local controller that manages the behavior of the MXML part.

       

      When i create an MXML component, it is supposed to create its own presentation manager and make the link between itself and its presentation manager so that the two parts of the components just make one at the end.

      The view creates the presentation manager using the initialize event, but here comes the problem: sometimes, i need to use presentation manager as soon as possible and the initialize event is too slow in some cases. In the worst case, it looks like the initialize event is never dispatched and i don't understand why, the content of the view is never loaded (this operation is supposed to be handled by the presentation manager).

       

      That's quite annoying, obviously.

       

      If someone could help me or have some clues that i don't, about the initialize event in MXML or stuff like that...

       

      Thank you for your help.

      Best regards,

       

      SJ.