Issue With Multiple Modules Executing A Shared Command
Hey everybody ,
Apologies ahead of time if this has been covered elsewhere but just wanted to put this out there in case anyone else runs into it.
My dev team and I ran into a tricky issue today that stumped us for quite some time. We have a fairly involved web app , the acts as a bootstrap , and loads modules. We are using RL , Signals , and a covariance utility. What we saw was this,
Bootstrap Loads Module 1.
Module 1 has a shared command mapped to in the bootstrap that gets
executed , which is pulled of the loader property.
The shared command executes a uniquely referenced command from
within the newly loaded module.
The unique command in each module is named the same thing for
consistency.
Bootstrap Loads Module 2 , but when its same command gets executed
its was executing module1's command.
The Command in question is unique to each module , so it seemed an impossibility that the first one executed again. However what was occuring , is that because we are using Maven Archetypes to create our projects , the top Level MXML file in both modules was called , Module.mxml.
This generally isnt a problem because of FQCN , however , in the case of the top level package , there is no unique path to differentiate one command from the other. So command map was executing the first , and always the first. I think because this check
verifyCommandClass(commandClass);
was considering the second command to be the same as the first.
So the solution seems to be , if you are chaining commands , and sharing injectors across module , and if you call the command map directly to execute internal commands on that injector , make certain you give your top level , application class a unique name.
At any rate , i dont think it was any problem of RL , just perhaps an oversight on our part. Still time consuming. Hope this helps someone.
-adam
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
Ondina D.F. closed this discussion on 12 Dec, 2011 12:17 PM.