ContextEvent.STARTUP & ContextEvent.STARTUP_COMPLETE

aesthetics.data's Avatar

aesthetics.data

26 Jan, 2011 09:35 AM via web

Would it be possible to have more details about ContextEvent.STARTUP & ContextEvent.STARTUP_COMPLETE ?
i wrote some simple code just to test ContextEvent.STARTUP , and nothing happens :

in my context :
`override public function startup():void{

        commandMap.mapEvent( ContextEvent.STARTUP , StartupCommand , ContextEvent , true );
        commandMap.mapEvent( SBEvent.INIT_SB , SBInitCommand       );
        commandMap.mapEvent( TVEvent.INIT_TV , TextZoneInitCommand );
        commandMap.mapEvent( DataLoadingServiceEvent.DATA_LOADED , PopulateModelWithLoadedDataCommand , DataLoadingServiceEvent );

        mediatorMap.mapView( ScrollBarView , ScrollBarMediator );
        mediatorMap.mapView( TextView  , TextViewMediator  );

        injector.mapSingleton( ComboBoxModel );
        injector.mapSingleton( DataLoadingService );
        super.startup();

    }`

and StartupCommand.as : `[Inject]

    public var service:DataLoadingService;

    override public function execute():void
    {
        Debug.trace( "in the StartupCommand" );
    }`

nothing is traced.

  1. 2 Posted by Stray on 26 Jan, 2011 09:50 AM

    Stray's Avatar

    Hi there,

    you can find the context details on github:

    https://github.com/robotlegs/robotlegs-framework/blob/master/src/org/robotlegs/mvcs/Context.as

    The key thing to know is that STARTUP_COMPLETE is dispatched automatically by the context when you call super.startup();

    The STARTUP event is something you would dispatch for yourself, so - in the case you sent - nothing happens because you never dispatch the event.

    I believe Paul Robertson has also now documented this in the asdoc comments.

    Stray

  2. 3 Posted by aesthetics.data on 26 Jan, 2011 10:00 AM

    aesthetics.data's Avatar

    it's what i've just discovered a minute ago...

  3. 4 Posted by aesthetics.data on 26 Jan, 2011 10:12 AM

    aesthetics.data's Avatar

    Thanks for your reply.
    indeed there is some comment @ : https://github.com/robotlegs/robotlegs-framework/blob/master/src/or... , but looking for Context @ http://api.robotlegs.org/ , nothing is explained, right ? or do i look at the wrong place ?

  4. 5 Posted by Stray on 26 Jan, 2011 10:29 AM

    Stray's Avatar

    I think it just hasn't been updated yet. We all have jobs :)

  5. 6 Posted by aesthetics.data on 26 Jan, 2011 10:52 AM

    aesthetics.data's Avatar

    thanks :-)
    We all have jobs, me too... i am the office right now... :-)
    i'm a robotlegs noob, so i'm just asking questions not to bother anyone, but to be sure i've looked documentation in the right place and not asking question that make lose your time...
    thanks again :-)

  6. 7 Posted by Stray on 26 Jan, 2011 11:10 AM

    Stray's Avatar

    Ah - sorry - didn't mean to make it sound like we're not happy to give our time. Just that a few things are on our 'todo' list but we gotta do the work-stuff first.

    I'll see if we can run an asdoc and get those updated this weekend - it's a good spot.

    Keep asking questions - it's the best way to learn!

    Cheers,

    Stray

  7. 8 Posted by aesthetics.data on 26 Jan, 2011 11:41 AM

    aesthetics.data's Avatar

    Great! :-) no worries.

  8. Stray closed this discussion on 13 Feb, 2011 04:03 PM.

Comments are currently closed for this discussion. You can start a new one.