SignalCommandMap with parameters issues

tom's Avatar

tom

18 Oct, 2011 10:04 AM

Hi guys,

Firstly can I say that I am a newbie to robotlegs but have been using Signals/AS3 for some time. I have googled and googled but could not find a solid answer to my question and I hope you nice people can help me.

I'm having trouble hooking up signals (with parameters) to commands. I am getting the following errors:

"Exception fault: ArgumentError: Listener has 0 arguments but it needs at least 1 to match the given value classes."

Below is a snippet of the offending code (apologies for formatting):

MainContext.as:

 signalCommandMap.mapSignalClass(ChangeStateSignal, ChangeStateCommand);

ChangeStateSignal.as

 public class ChangeStateSignal extends Signal {

    public function ChangeStateSignal():void {
        super(StateID);
    }
}

ChangeStateCommand.as

 public class ChangeStateCommand extends Command {

    [Inject]
    public var state : StateID;

    [Inject]
    public var coreModel : CoreModel;

    override public function execute() : void {

        coreModel.changeState(state);
    }
}
  1. 1 Posted by tom on 18 Oct, 2011 10:19 AM

    tom's Avatar

    It seems these issues are resolved when I update from Signals 0.8 to 0.9 Beta.

    Close discussion :)

  2. Ondina D.F. closed this discussion on 01 Nov, 2011 04:19 PM.

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

Keyboard shortcuts

Generic

? 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