Created
October 19, 2011 10:37
-
-
Save newtriks/1297937 to your computer and use it in GitHub Desktop.
PMVC Nested View Registration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ProfileDisplayMediatorsCommand extends SimpleCommand implements ICommand | |
{ | |
override public function execute( note:INotification ):void | |
{ | |
var profileDisplay:ProfileDisplay = note.getBody() as ProfileDisplay; | |
facade.registerMediator( new ProfileDisplayMediator( profileDisplay ) ); | |
facade.registerMediator( new BalanceDisplayMediator( profileDisplay.balanceComponent ) ); | |
} | |
} |
No good catch :) TBH though this was a quickly typed out example to highlight a potential solution to your query, so untested, could be cleaner and I have not done pmvc for a while now :P
Lucky you :( Stuck with PureMVC on this project - although thanks to RobotLegs dev from previous projects it's pretty easy to write clean PMVC code.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
SimpleCommand already implements ICommand so there's no need to specify it! (sorry pet peeve! ;)