Sharing Models Between Modules
Using the modular utility from Joel Hooks. Which by the way, is the SWC no longer in the github download? I did not see it, needed to build it manually.
Anyway, everything works fine so far. However, I have data that I need to share between modules. I am curious to know if there is a proper way to do this, outside of me hacking the data into the custom events. There are quite a few models that need to be shared between modules. It would be a lot easier if I could somehow inject those models into multiple modules.
Each module is SWF, loaded dynamically at runtime.
Thoughts/suggestions would be appreciated.
Thanks,
John
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
Support Staff 1 Posted by Ondina D.F. on 02 Aug, 2012 10:07 AM
Hey John,
The keywords are parentInjector, child injectors.
From Joel’s tutorial (http://joelhooks.com/2010/05/02/modular-robotlegs/#respond):
Also look at Stray’s answers in these threads:
http://knowledge.robotlegs.org/discussions/problems/252-singelton-i...
http://knowledge.robotlegs.org/discussions/problems/261-modular-uti...
Here Till’s explanation of Child Injectors:
https://github.com/tschneidereit/SwiftSuspenders/tree/childinjector...
I know, I know, it is a lot of reading, but hopefully it will help you…. :)
Ondina
2 Posted by john.amedo on 07 Aug, 2012 02:51 PM
Thanks for the explanation. I understand now.
john.amedo closed this discussion on 07 Aug, 2012 02:51 PM.