drawer event chain complete
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package model;
|
||||
|
||||
import components.NekoDrawer;
|
||||
import control.NekoDrawerEvent;
|
||||
import vo.Rider;
|
||||
import feathers.data.ArrayCollection;
|
||||
import openfl.errors.Error;
|
||||
@@ -10,14 +12,16 @@ import openfl.events.EventDispatcher;
|
||||
class AppModelLocator extends EventDispatcher implements IModelLocator {
|
||||
|
||||
// events constants
|
||||
public static final VIEWING_CHANGE = "viewingChange";
|
||||
public static final RIDERS_LIST_DP_CHANGE = "ridersListDPChange";
|
||||
public static final VIEWING_CHANGE:String = "viewingChange";
|
||||
public static final RIDERS_LIST_DP_CHANGE:String = "ridersListDPChange";
|
||||
//public static final DRAWER_STATE_CHANGE:String = "drawerStateChange";
|
||||
|
||||
|
||||
// this instance stores a static reference to itself
|
||||
private static var model:AppModelLocator;
|
||||
|
||||
// available values for the main viewstack defined as constants to help uncover errors at compile time instead of run time
|
||||
// Navigator
|
||||
public static final ADMIN_LOGIN = 0;
|
||||
public static final RIDERS_LIST = 1;
|
||||
public static final RIDER_DETAIL = 2;
|
||||
@@ -31,6 +35,15 @@ class AppModelLocator extends EventDispatcher implements IModelLocator {
|
||||
return viewing;
|
||||
}
|
||||
|
||||
// at startup, the drawer is closed
|
||||
public var drawerState(default, set):String = NekoDrawer.CLOSE;
|
||||
|
||||
private function set_drawerState(pState:String):String {
|
||||
drawerState = pState;
|
||||
dispatchEvent(new Event(NekoDrawerEvent.DRAWER_STATE_CHANGE));
|
||||
return drawerState;
|
||||
}
|
||||
|
||||
// rider object contains uid/passwd
|
||||
// its value gets set at login and cleared at logout but nothing binds to it or uses it
|
||||
// retained since it was used in the original Adobe CafeTownsend example app
|
||||
|
||||
Reference in New Issue
Block a user