Error #1009: at org.robotlegs.mvcs::Actor/dispatch()

visnik's Avatar


18 Oct, 2011 11:16 PM

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)
                // 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.

  1. Support Staff 1 Posted by Till Schneidere... on 19 Oct, 2011 11:34 AM

    Till Schneidereit's Avatar

    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?

  2. 2 Posted by visnik on 19 Oct, 2011 03:30 PM

    visnik's Avatar

    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.

    service = new MenuItemListService();

    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.

  3. Support Staff 3 Posted by Till Schneidere... on 19 Oct, 2011 03:32 PM

    Till Schneidereit's Avatar

    Cool, very glad my question helped you get things sorted!

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

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac