ContextEvent.STARTUP & ContextEvent.STARTUP_COMPLETE
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.
Comments are currently closed for this discussion. You can start a new one.
2 Posted by Stray on 26 Jan, 2011 09:50 AM
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
3 Posted by aesthetics.data on 26 Jan, 2011 10:00 AM
it's what i've just discovered a minute ago...
4 Posted by aesthetics.data on 26 Jan, 2011 10:12 AM
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 ?
5 Posted by Stray on 26 Jan, 2011 10:29 AM
I think it just hasn't been updated yet. We all have jobs :)
6 Posted by aesthetics.data on 26 Jan, 2011 10:52 AM
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 :-)
7 Posted by Stray on 26 Jan, 2011 11:10 AM
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
8 Posted by aesthetics.data on 26 Jan, 2011 11:41 AM
Great! :-) no worries.
Stray closed this discussion on 13 Feb, 2011 04:03 PM.