Skip to content

Instantly share code, notes, and snippets.

@newtriks
Created October 19, 2011 10:37
Show Gist options
  • Select an option

  • Save newtriks/1297937 to your computer and use it in GitHub Desktop.

Select an option

Save newtriks/1297937 to your computer and use it in GitHub Desktop.
PMVC Nested View Registration
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 ) );
}
}
@jonnyreeves

Copy link
Copy Markdown

SimpleCommand already implements ICommand so there's no need to specify it! (sorry pet peeve! ;)

@newtriks

Copy link
Copy Markdown
Author

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

@jonnyreeves

Copy link
Copy Markdown

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