| Package | com.jadbox.flashmvc |
| Class | public class SuperModel |
| Inheritance | SuperModel flash.events.EventDispatcher |
| Property | Defined by | ||
|---|---|---|---|
| data : Object
data is a variable holder for the user.
| SuperModel | ||
| debugMode : Boolean = false [static]
When debugMode is enabled (by default), the application will allow a local connection
from SuperLogger for testing.
| SuperModel | ||
| isPerfoming : Boolean [read-only]
Returns true or false if the model is currently performing any action
| SuperModel | ||
| log : XML [read-only]
Used for getting the global log by SuperModel.superModel.log;
Returns a global SuperModel XML log of all actions taken place within the running Flash application
| SuperModel | ||
| _runningActions : Dictionary [static]
| SuperModel | ||
| superModel : SuperModel
[static]
Used for getting the global log by SuperModel.superModel.log;
| SuperModel | ||
| Method | Defined by | ||
|---|---|---|---|
| SuperModel | |||
|
actionAdd(classRef:Class):void
Registers an action class to this model.
| SuperModel | ||
|
actionRemove(className:String):void
Removes an action from the model
| SuperModel | ||
|
actions():Array
Returns an array of String names for each action on the SuperModel
| SuperModel | ||
|
addActionEventListener(action:String, eventName:String, callBack:Function):void
Add an event listner for when an action dispatches an event on the its helper object.
| SuperModel | ||
|
addHasActionListeners(action:String, added:Function = null, removed:Function = null):void
This method allows you to specify callback functions for when an action is added or removed on the supermodel.
| SuperModel | ||
|
addResultListeners(action:String, success:Function = null, fail:Function = null):void
This method allows you to specify a success and fail callback function for a particular action class on the supermodel.
| SuperModel | ||
|
addStatusListeners(action:String, enabled:Function = null, disabled:Function = null):void
This method allows you to specify callback functions for when an action is enabled or disabled for a particular action class on the supermodel.
| SuperModel | ||
|
completePerformance(actionHelper:ActionHelper, result:Object, successful:Boolean = true):void
Internal only
| SuperModel | ||
|
hasAction(className:String):Boolean
Returns a boolean if an action is registered to the model
| SuperModel | ||
|
isEnabled(className:String):Boolean
Retrieves if an action class is either enabled/disabled
| SuperModel | ||
|
perform(className:String, onComplete:Function = null, ... params):void
Runs an action class that is registered to the SuperModel.
| SuperModel | ||
|
process(meta:Performance, ... params):void
This method is feed a Performance class which details a command to be excuted by this SuperModel.
| SuperModel | ||
|
registerPerformance(action:Object):SuperModel
[static]
Internal only
| SuperModel | ||
|
run(action:*, args:Array):void
Faster way to wrap actions to the SuperModel.
| SuperModel | ||
|
setEnabled(className:String, enabled:Boolean = true):void
Sets an action class to be enabled or disabled
| SuperModel | ||
| data | property |
public var data:Objectdata is a variable holder for the user.
| debugMode | property |
public static var debugMode:Boolean = falseWhen debugMode is enabled (by default), the application will allow a local connection from SuperLogger for testing.
| isPerfoming | property |
isPerfoming:Boolean [read-only]Returns true or false if the model is currently performing any action
This property can be used as the source for data binding.
Implementation public function get isPerfoming():Boolean
| log | property |
log:XML [read-only]Used for getting the global log by SuperModel.superModel.log; Returns a global SuperModel XML log of all actions taken place within the running Flash application
This property can be used as the source for data binding.
Implementation public function get log():XML
tom,25
betty,22
| _runningActions | property |
public static var _runningActions:Dictionary
| superModel | property |
public static var superModel:SuperModelUsed for getting the global log by SuperModel.superModel.log;
| SuperModel | () | constructor |
public function SuperModel()
| actionAdd | () | method |
public function actionAdd(classRef:Class):voidRegisters an action class to this model.
ParametersclassRef:Class — This is your performance class reference
|
| actionRemove | () | method |
public function actionRemove(className:String):voidRemoves an action from the model
ParametersclassName:String — This is the performance class name
|
| actions | () | method |
public function actions():ArrayReturns an array of String names for each action on the SuperModel
ReturnsArray |
| addActionEventListener | () | method |
public function addActionEventListener(action:String, eventName:String, callBack:Function):voidAdd an event listner for when an action dispatches an event on the its helper object.
Parametersaction:String — Action name to monitor
|
|
eventName:String — Event name
|
|
callBack:Function — Callback function that will carry the Event object.
WIP
|
| addHasActionListeners | () | method |
public function addHasActionListeners(action:String, added:Function = null, removed:Function = null):voidThis method allows you to specify callback functions for when an action is added or removed on the supermodel.
Parametersaction:String — This is the action class name that you are monitoring the result of.
|
|
added:Function (default = null) — Callback function for when the action is added.
|
|
removed:Function (default = null) — Callback function for when the action is removed.
|
| addResultListeners | () | method |
public function addResultListeners(action:String, success:Function = null, fail:Function = null):voidThis method allows you to specify a success and fail callback function for a particular action class on the supermodel.
Parametersaction:String — This is the action class name that you are monitoring the result of.
|
|
success:Function (default = null) — Callback function for when the action completes successfully.
|
|
fail:Function (default = null) — Callback function for when the action fails.
|
| addStatusListeners | () | method |
public function addStatusListeners(action:String, enabled:Function = null, disabled:Function = null):voidThis method allows you to specify callback functions for when an action is enabled or disabled for a particular action class on the supermodel.
Parametersaction:String — This is the action class name that you are monitoring the result of.
|
|
enabled:Function (default = null) — Callback function for when the action is enabled.
|
|
disabled:Function (default = null) — Callback function for when the action is disabled.
|
| completePerformance | () | method |
public function completePerformance(actionHelper:ActionHelper, result:Object, successful:Boolean = true):voidInternal only
ParametersactionHelper:ActionHelper |
|
result:Object |
|
successful:Boolean (default = true) |
| hasAction | () | method |
public function hasAction(className:String):BooleanReturns a boolean if an action is registered to the model
ParametersclassName:String — This is the performance class name
|
Boolean — Returns true or false if this model has the class
|
| isEnabled | () | method |
public function isEnabled(className:String):BooleanRetrieves if an action class is either enabled/disabled
ParametersclassName:String |
Boolean — Returns true or false if the class is enabled or disabled
|
| perform | () | method |
public function perform(className:String, onComplete:Function = null, ... params):voidRuns an action class that is registered to the SuperModel.
ParametersclassName:String — This is the action class name
|
|
onComplete:Function (default = null) — CallBack function on class action success. The callback needs one param of type Object for any result data from that action class.
|
|
... params — The parameters that the performance class expects for its constructor.
|
| process | () | method |
public function process(meta:Performance, ... params):voidThis method is feed a Performance class which details a command to be excuted by this SuperModel.
Parametersmeta:Performance — This is an optional parameter to overrite the Performance parameters.
|
|
... params |
| registerPerformance | () | method |
public static function registerPerformance(action:Object):SuperModelInternal only
Parametersaction:Object |
SuperModel |
| run | () | method |
public function run(action:*, args:Array):voidFaster way to wrap actions to the SuperModel.
Parametersaction:* — Can be a class reference or the string of the class name added to the SuperModel.
|
|
args:Array — Parameters for the action class.
|
| setEnabled | () | method |
public function setEnabled(className:String, enabled:Boolean = true):voidSets an action class to be enabled or disabled
ParametersclassName:String — This is the performance class name
|
|
enabled:Boolean (default = true) — true/false if you want to enable or disable
|