Error #1009: at org.robotlegs.mvcs::Actor/dispatch()
I have been banging my head against the wall for about an hour or so, tying to figure out why my service does not seem to get mapped within the framework. I am sure it is something simple I am just overlooking.
Here is what I Have
within My context:
override public function startup():void
{
var serviceBootsrap:ServiceBootsrap = new ServiceBootsrap(injector);
}
within My ServiceBootsrap:
public function ServiceBootsrap(injector:IInjector)
{
injector.mapClass(ISlideMenuService, MenuItemListService);
}
within My MenuItemListService.parseList():
public class MenuItemListService extends Actor implements ISlideMenuService
.....
private function parseList():void
{
for(var i:Number = 0; i < _list.length ; ++i)
{
//...cool stuff is here.
dispatch(new MenuComponentsEvent(MenuComponentsEvent.MENU_ITEM, menuItem));
}
I get the Error #1009: at org.robotlegs.mvcs::Actor/dispatch() when it hits the dispatch line in the parseList() method.
Comments are currently closed for this discussion. You can start a new one.
Support Staff 2 Posted by Till Schneidereit on 19 Oct, 2011 11:34 AM
The only thing that I can come up with from looking at your code is
that you might be invoking parseList too early, i.e., before the
injections have happened.
Are you by any chance invoking it from the constructor instead of from
either a [PostConstruct]-annotated method or from the outside after
the injector has fully initialized your service?
3 Posted by visnik on 19 Oct, 2011 03:30 PM
Till, You are awesome, thank you sir. your question got me to look at the command that injects the service, but i was creating a new service within the execute.
As soon as i realized my mistake, commented out the line of code, and boom, all is good. Not sure how I kept missing that yesterday but thanks. I was quite sure is it was something simple I was overlooking.
thanks again.
Support Staff 4 Posted by Till Schneidereit on 19 Oct, 2011 03:32 PM
Cool, very glad my question helped you get things sorted!