StartupCommand
hi guys,
i got a problem with my startup command when i inject another
model in it. is this something illegal in rl framework?
when i remove the one i injected, it works fine.
thanks,
carlos
Comments are currently closed for this discussion. You can start a new one.
2 Posted by krasimir on 14 May, 2012 10:38 AM
Hello, can you please post the message of the error that you are receiving.
3 Posted by kakarlus on 14 May, 2012 10:42 AM
hi krasimir,
i dont get the errors, its just that the next block of codes inside my execute function is not running if model2 is injected.
[Inject] public var model1:MyModel1;
[Inject] public var model2:MyModel2;
inside my execute function, i have 2 urlloaders, one for a json query and one for obtaining data from php.
compiles fine w/o compile time error / runtime error.
thanks,
carlos
4 Posted by krasimir on 14 May, 2012 10:49 AM
For me it looks that something is no ok with your second model. Can you please post the code which defines your injection.
5 Posted by kakarlus on 14 May, 2012 10:55 AM
that's what i thought too - here's my 2nd model
package lib.model {
}
6 Posted by krasimir on 14 May, 2012 11:13 AM
How did you inject your module.
7 Posted by kakarlus on 14 May, 2012 11:15 AM
i injected it in my startupcommand
[Inject] public var dateWidgetModel:DateWidgetModel;
8 Posted by krasimir on 14 May, 2012 11:20 AM
Sorry, I meant the code that you are using to define the rule of injection. Something like
injector.mapValue(Class, instance);
9 Posted by kakarlus on 14 May, 2012 11:24 AM
sorry too here it is.
injector.mapSingleton(DateWidget);
... mediatorMap.mapView(DateWidget, DateWidgetMediator);
... contextView.addChild(new DateWidget());
many thanks,
carlos
10 Posted by krasimir on 14 May, 2012 11:34 AM
Are you sure that
injector.mapSingleton(DateWidget);
is correct. I guess it should be:
injector.mapSingleton(DateWidgetModel);
11 Posted by kakarlus on 14 May, 2012 11:39 AM
cheers nailed it :)
many thanks sir krasimir ,
carlos
12 Posted by krasimir on 14 May, 2012 11:41 AM
I'm glad that I helped ;)
Ondina D.F. closed this discussion on 14 May, 2012 12:08 PM.