0

How to just execute a command in robotlegs without making him listening for an event?

Another way, but not this one: "It is not necessary, and should never be done, to call the execute() method directly. This is the framework implementation’s job."

http://knowledge.robotlegs.org/faqs/reference-mvcs-implementation/how-are-commands-triggered-in-mvcs-implementation

Totty.js
  • 15,563
  • 31
  • 103
  • 175

1 Answers1

0

Also, please read the Robotlegs documentation and ASDocs ( http://api.robotlegs.org/ ). If you had, you would have seen this:

http://api.robotlegs.org/org/robotlegs/core/ICommandMap.html#execute%28%29

Nick Udell
  • 2,420
  • 5
  • 44
  • 83
Franky-D
  • 450
  • 4
  • 16
  • But I read somewhere that calling dirrectly execute() on a command is bad design.. There are no other ways? – Totty.js Nov 08 '10 at 18:56
  • I did not say you should call execute on the command. You can execute commands through the CommandMap. Did you even follow the link I posted? – Franky-D Nov 09 '10 at 19:05
  • Yes I read.. So I have to use the execute(Command) on the command map, right? – Totty.js Nov 12 '10 at 18:12
  • 1
    Yes, that will make sure that dependencies are injected into the Command instance before it is executed. – Franky-D Nov 14 '10 at 15:44
  • 1
    StackOverflow is a perfectly fine place to ask RL questions. CommandMap#execute should do it. Can you explain why you want to do this? – Joel Hooks Nov 20 '10 at 23:41