RL 2 alternative to viewmap.mapPackage( "com.package" ) ?
Hi guys,
as the topic says:
does anyone know what the alternative approach is to
viewmap.mapPackage( "com.package" ) ?
I like to work with an MVP-like approach;I want to be able to
inject signals and PM's in my view components.
In RL 1 this was very straight forward.
Is this still possible in RL 2? (I looked at the examples and
documentation but didn't find it...)
Thanx!
Hans
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 creynders on 09 Jan, 2013 12:46 PM
You need to use the ViewProcessorMap extension: https://github.com/robotlegs/robotlegs-framework/tree/master/src/ro...
Haven't used it yet, but seems like the RL1 like usage would be
viewProcessorMap.map(SomeType).forInjection();
and for matching packages:
viewProcessorMap.map( new PackageMatcher().anyOf( 'com.package' ) ).forInjection();
2 Posted by dotdotcommadot on 09 Jan, 2013 01:09 PM
hah! works like a charm :)
I tried this before, but apparently I was just running in the popup-issue again.
Good tip (although off-topic): if pop-ups aren't getting dependency-injection, or linked mediators aren't triggering,
set
contextTag.contextView = FlexGlobals.topLevelApplication.systemManager;
in your Main.mxml.Thanx creynders!
dotdotcommadot closed this discussion on 09 Jan, 2013 03:38 PM.