-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot use a Vector in SignalCommand #2
Comments
I will right some unit tests and see what I can do. Cheers, Joel |
can you post your code for the custom Vector? |
I think your best bet is to create a payload value object that wraps your vector. using base types is a bad idea in general with the SignalCommandMap payloads because of the way they are injected into the command prior to execution. |
Wow, thanks for the quick response! That's what I've done as a workaround for now - wrapping the vector in a value object. I didn't know the payloads were injected differently, but I'll bear that in mind for the rest of the project! I've included the code example of the signal for you to see anyway. Thanks a lot for your help. Mark package signals
} |
I also ran into this yesterday. Array works Vector. does not. It seems akward to create a VO that is just a collection of VOs. Going to switch to Array for now. Hopefully this can be fixed. |
As Mark said, Brilliant Library! I recently started a new project with RL, AS3 Signals, and SignalCommandMap. This framework works very well. Going to convert all our existing Cairngorm projects over next. |
In my project, I see many case that the payload is only a value of a base type (String, int,..).
The named param then be passed from #routeSignalToCommand to #mapSignalValues & #unmapSignalValues, and then passed to injector.mapValue & injector.unmap. |
This is a brilliant library, however I can't seem to be able to inject a Vector of a custom type into a SignalCommand. The Vector is the payload of the signal that the command is registered to. All other types seem to work ok; Vector is the only one I've come across so far that doesn't. I can provide code samples if you need them.
Cheers,
Mark
The text was updated successfully, but these errors were encountered: