Skip to content

Instantly share code, notes, and snippets.

@Ondina
Created November 3, 2011 13:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Ondina/1336471 to your computer and use it in GitHub Desktop.
Save Ondina/1336471 to your computer and use it in GitHub Desktop.
NavigationCommand (ViewNavigatorApplication)
package com.robotlegs.demos.robotlegsincremental.controllers.commands.mappings
{
import com.robotlegs.demos.robotlegsincremental.controllers.events.NavigationEvent;
import com.robotlegs.demos.robotlegsincremental.controllers.events.SomeViewListEvent;
import com.robotlegs.demos.robotlegsincremental.models.NavigationModel;
import org.robotlegs.mvcs.Command;
/**
*
* @author [Ondina D. F.]
*
*/
public class NavigationCommand extends Command
{
[Inject]
public var event:SomeViewListEvent;
[Inject]
public var navigationModel:NavigationModel;
override public function execute():void
{
dispatch(new NavigationEvent(NavigationEvent.ACTIVE_VIEW_CHANGED, navigationModel.stackViews[event.viewStackIndex]));
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment