Data injection and event mediating in modules

15 views
Skip to first unread message

Lars

unread,
Feb 3, 2012, 3:50:46 AM2/3/12
to Swiz Framework
It seems I can't get a finger on getting injection and event mediating
to work in my modules (which I desperatly need). The documentation is
to short to be any useful except for the scoping properties. I
downloaded the example files, but still I couldn't get my injection to
work.

To simplify the issue I started a new clean Flex project and set it up
nearly similar to the way like in the swiz-examples (from the swiz
homepage ofc).

My Apllication.mxml just contains the swiz config declaration.
The swiz config containts the bean provider and the event &
viewpackages
=> Bean: ApplicationManager
The ApplicationManager creates a custom component and adds the
component to the stage. It also has a bindable public variable
myData:String='Bla'
The custom component contains an CreationAwareModuleLoader which has
its url set to modules/TestModule.swf.
The TestModule also has the variable and the inject command to it
[Inject(source="appManager.myData", bind="true")]
public var myData:String;
it also has a trace of this variable after the addedToStage event is
fired.

Any suggestions or hints whats going wrong?

Ideally I need my modules in seperate projects, but I prefer to get a
solution step by step, so for now I want to keep the module inside my
project.

Brian Kotek

unread,
Feb 3, 2012, 10:23:28 AM2/3/12
to swiz-fr...@googlegroups.com
It sounds like you set up the module communication demo ( https://github.com/swiz/swiz-examples/tree/master/SwizModuleCommunicationDemo-Flex4 ), does it work for you? Just making sure, since it shows several types of inter-module communication.


--
You received this message because you are subscribed to the Google Groups "Swiz Framework" group.
To post to this group, send email to swiz-fr...@googlegroups.com.
To unsubscribe from this group, send email to swiz-framewor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/swiz-framework?hl=en.


Reply all
Reply to author
Forward
0 new messages