Packagecom.jadbox.flashmvc2
Classpublic class SuperModel
InheritanceSuperModel Inheritance flash.events.EventDispatcher

This class acts as a singleton to hold global values for a feature. It also holds property references to SuperAction(s) for the view to run them.



Public Properties
 PropertyDefined by
  BUSY : String = "busy"
[static] An action of any type is running on the SuperModel
SuperModel
  FREE : String = "free"
[static] There are no actinos running on the SuperModel
SuperModel
  isBusy : Boolean
[read-only] Returns true if any actions are running on this SuperModel.
SuperModel
Public Methods
 MethodDefined by
  
Simple Constructor.
SuperModel
  
SuperModel
  
SuperModel
  
addEventsListener(type:String, listener:Function, superEventType:Class = null):void
Listen for an even from several actions on SuperModel that have the same superEventType.
SuperModel
  
runEvent(e:SuperEvent = null):void
This method will search all SuperActions that accept the SuperEvent type and run it.
SuperModel
  
syncVars(... VARS):void
SuperModel
Protected Methods
 MethodDefined by
  
monitor(... REST):void
The constuctor of SuperModel will automatically monitor default properties of type SuperAction.
SuperModel
Property detail
BUSYproperty
public static var BUSY:String = "busy"

An action of any type is running on the SuperModel

FREEproperty 
public static var FREE:String = "free"

There are no actinos running on the SuperModel

isBusyproperty 
isBusy:Boolean  [read-only]

Returns true if any actions are running on this SuperModel.

Implementation
    public function get isBusy():Boolean
Constructor detail
SuperModel()constructor
public function SuperModel()

Simple Constructor. It will search for properties on itself that are SuperActions to monitor.

Method detail
actionCompleted()method
public function actionCompleted(e:SuperEvent):voidParameters
e:SuperEvent
actionStarted()method 
public function actionStarted(e:SuperEvent):voidParameters
e:SuperEvent
addEventsListener()method 
public function addEventsListener(type:String, listener:Function, superEventType:Class = null):void

Listen for an even from several actions on SuperModel that have the same superEventType.

Parameters
type:String — Name of the event
 
listener:Function — The callback function for the SuperEvent (or extended event)
 
superEventType:Class (default = null) — The subtype of SuperEvent to only listen for (will not detect further subclassed events). This allows the view to monitor several actions that take the same event. (default is SuperEvent)
monitor()method 
protected function monitor(... REST):void

The constuctor of SuperModel will automatically monitor default properties of type SuperAction.

Parameters
... REST — The list of SuperAction properties on this supermodel;
runEvent()method 
public function runEvent(e:SuperEvent = null):void

This method will search all SuperActions that accept the SuperEvent type and run it.

Parameters
e:SuperEvent (default = null) — The SuperEvent that the view wants to run an action on.
syncVars()method 
public function syncVars(... VARS):voidParameters
... VARS