Method | Defined By | ||
---|---|---|---|
WeavePath constructor. | WeavePath | ||
addCallback(relevantContext:Object, callback:Function, triggerCallbackNow:Boolean = false, immediateMode:Boolean = false, delayWhileBusy:Boolean = true):WeavePath
Adds a callback to the object at the current path. | WeavePath | ||
Calls a function using the current WeavePath object as the 'this' value. | WeavePath | ||
Applies a session state diff to the object at the current path or relative to the current path. | WeavePath | ||
Evaluates an ActionScript expression using the current path, vars, and libs. | WeavePath | ||
Applies a function to each item in an Array or an Object. | WeavePath | ||
forEachChild(... relativePath_visitorFunction):WeavePath
Calls a function for each child of the current WeavePath or the one specified by a relativePath. | WeavePath | ||
forEachName(... relativePath_visitorFunction):WeavePath
Calls a function for each child of the current WeavePath or the one specified by a relativePath. | WeavePath | ||
getChildren(... relativePath):Array
Gets an Array of child WeavePath objects under the object at the current path or relative to the current path. | WeavePath | ||
getDiff(... relativePath_previousState):Object
Gets the changes that have occurred since previousState for the object at the current path or relative to the current path. | WeavePath | ||
getNames(... relativePath):Array
Gets an Array of child names under the object at the current path or relative to the current path. | WeavePath | ||
getObject(... relativePath):ILinkableObject | WeavePath | ||
getPath(... relativePath):Array
Returns a copy of the current path Array or the path Array of a descendant object. | WeavePath | ||
getReverseDiff(... relativePath_otherState):Object
Gets the changes that would have to occur to get to another state for the object at the current path or relative to the current path. | WeavePath | ||
getSimpleType(... relativePath):String
Gets the simple type (unqualified class name) of the object at the current path or relative to the current path. | WeavePath | ||
getState(... relativePath):Object
Gets the session state of an object at the current path or relative to the current path. | WeavePath | ||
getType(... relativePath):String
Gets the type (qualified class name) of the object at the current path or relative to the current path. | WeavePath | ||
getTypedState(... relativePath):Object | WeavePath | ||
getUntypedState(... relativePath):Object | WeavePath | ||
getValue(script_or_function:*, ... args):Object
Returns the value of an ActionScript expression or variable using the current path as the 'this' argument. | WeavePath | ||
[static] | WeavePath | ||
Returns to the previous WeavePath that spawned the current one with push(). | WeavePath | ||
Creates a new WeavePath relative to the current one. | WeavePath | ||
Removes a dynamically created object. | WeavePath | ||
removeCallback(relevantContext:Object, callback:Function):WeavePath
Removes a callback from the object at the current path or from everywhere. | WeavePath | ||
Reorders the children of an ILinkableHashMap at the current path. | WeavePath | ||
Requests that an object be created if it doesn't already exist at the current path (or relative path, if specified). | WeavePath | ||
Sets the session state of the object at the current path or relative to the current path. | WeavePath | ||
toString():String
Provides a human-readable string containing the path. | WeavePath | ||
Calls weaveTrace() in Weave to print to the log window. | WeavePath |
Method | Defined By | ||
---|---|---|---|
_assertParams(methodName:String, args:Array, minLength:int = 1):Boolean [static] | WeavePath | ||
_failMessage(methodName:String, message:String, path:Array = null):* [static] | WeavePath | ||
_failObject(methodName:String, path:Array):* [static] | WeavePath | ||
_failPath(methodName:String, path:Array):* [static] | WeavePath |
_parent | property |
protected var _parent:WeavePath
_path | property |
protected var _path:Array
weave | property |
public var weave:Weave
A pointer to the Weave instance.
WeavePath | () | Constructor |
public function WeavePath(weave:Weave, basePath:Array)
WeavePath constructor. WeavePath objects are immutable after they are created.
Parametersweave:Weave — An optional Array specifying the path to an object in the session state.
A child index number may be used in place of a name in the path when its parent object is a LinkableHashMap.
| |
basePath:Array |
_assertParams | () | method |
protected static function _assertParams(methodName:String, args:Array, minLength:int = 1):Boolean
Parameters
methodName:String | |
args:Array | |
minLength:int (default = 1 )
|
Boolean |
_failMessage | () | method |
protected static function _failMessage(methodName:String, message:String, path:Array = null):*
Parameters
methodName:String | |
message:String | |
path:Array (default = null )
|
* |
_failObject | () | method |
protected static function _failObject(methodName:String, path:Array):*
Parameters
methodName:String | |
path:Array |
* |
_failPath | () | method |
protected static function _failPath(methodName:String, path:Array):*
Parameters
methodName:String | |
path:Array |
* |
addCallback | () | method |
public function addCallback(relevantContext:Object, callback:Function, triggerCallbackNow:Boolean = false, immediateMode:Boolean = false, delayWhileBusy:Boolean = true):WeavePath
Adds a callback to the object at the current path. When the callback is called, a WeavePath object initialized at the current path will be used as the 'this' context. If the same callback is added to multiple paths, only the last path will be used as the 'this' context.
Parameters
relevantContext:Object — The thisArg for the function. When the context is disposed with Weave.dispose(), the callback will be disabled.
| |
callback:Function — The callback function.
| |
triggerCallbackNow:Boolean (default = false ) — Optional parameter, when set to true will trigger the callback now.
| |
immediateMode:Boolean (default = false ) — Optional parameter, when set to true will use an immediate callback instead of a grouped callback.
| |
delayWhileBusy:Boolean (default = true ) — Optional parameter, specifies whether to delay a grouped callback while the object is busy. Default is true.
|
WeavePath — The current WeavePath object.
|
call | () | method |
public function call(func:Function, ... args):WeavePath
Calls a function using the current WeavePath object as the 'this' value.
Parameters
func:Function — The function to call.
| |
... args — An optional list of arguments to pass to the function.
|
WeavePath — The current WeavePath object.
|
diff | () | method |
public function diff(... relativePath_diff):WeavePath
Applies a session state diff to the object at the current path or relative to the current path. Existing dynamically created objects that do not appear in the new state will remain unchanged.
Parameters
... relativePath_diff — An optional Array (or multiple parameters) specifying descendant names relative to the current path.
A child index number may be used in place of a name in the path when its parent object is a LinkableHashMap.
|
WeavePath — The current WeavePath object.
|
exec | () | method |
public function exec(script_or_function:*, callback:Function = null):WeavePath
Evaluates an ActionScript expression using the current path, vars, and libs. The 'this' context within the script will be the object at the current path.
Parameters
script_or_function:* — Either a String containing JavaScript code, or a Function.
| |
callback:Function (default = null ) — Optional callback function to be passed the result of evaluating the script or function. The 'this' argument will be the current WeavePath object.
|
WeavePath — The current WeavePath object.
|
forEach | () | method |
public function forEach(items:Object, visitorFunction:Function):WeavePath
Applies a function to each item in an Array or an Object.
Parameters
items:Object — Either an Array or an Object to iterate over.
| |
visitorFunction:Function — A function to be called for each item in items. The function will be called using the current
WeavePath object as the 'this' value and will receive three parameters: item, key, items.
If items is an Array, the key will be an integer. If items is an Object, the key will be a String.
|
WeavePath — The current WeavePath object.
|
forEachChild | () | method |
public function forEachChild(... relativePath_visitorFunction):WeavePath
Calls a function for each child of the current WeavePath or the one specified by a relativePath. The function receives child WeavePath objects.
Parameters
... relativePath_visitorFunction — An optional Array (or multiple parameters) specifying descendant names relative to the current path.
A child index number may be used in place of a name in the path when its parent object is a LinkableHashMap.
|
WeavePath — The current WeavePath object.
|
forEachName | () | method |
public function forEachName(... relativePath_visitorFunction):WeavePath
Calls a function for each child of the current WeavePath or the one specified by a relativePath. The function receives child names.
Parameters
... relativePath_visitorFunction — An optional Array (or multiple parameters) specifying descendant names relative to the current path.
A child index number may be used in place of a name in the path when its parent object is a LinkableHashMap.
|
WeavePath — The current WeavePath object.
|
getChildren | () | method |
public function getChildren(... relativePath):Array
Gets an Array of child WeavePath objects under the object at the current path or relative to the current path.
Parameters
... relativePath — An optional Array (or multiple parameters) specifying descendant names relative to the current path.
A child index number may be used in place of a name in the path when its parent object is a LinkableHashMap.
|
Array — An Array of child WeavePath objects.
|
getDiff | () | method |
public function getDiff(... relativePath_previousState):Object
Gets the changes that have occurred since previousState for the object at the current path or relative to the current path.
Parameters
... relativePath_previousState — An optional Array (or multiple parameters) specifying descendant names relative to the current path.
A child index number may be used in place of a name in the path when its parent object is a LinkableHashMap.
|
Object — A session state diff.
|
getNames | () | method |
public function getNames(... relativePath):Array
Gets an Array of child names under the object at the current path or relative to the current path.
Parameters
... relativePath — An optional Array (or multiple parameters) specifying descendant names relative to the current path.
A child index number may be used in place of a name in the path when its parent object is a LinkableHashMap.
|
Array — An Array of child names.
|
getObject | () | method |
public function getObject(... relativePath):ILinkableObject
Parameters
... relativePath |
ILinkableObject |
getPath | () | method |
public function getPath(... relativePath):Array
Returns a copy of the current path Array or the path Array of a descendant object.
Parameters
... relativePath — An optional Array (or multiple parameters) specifying descendant names to be appended to the result.
|
Array — An Array of successive child names used to identify an object in a Weave session state.
|
getReverseDiff | () | method |
public function getReverseDiff(... relativePath_otherState):Object
Gets the changes that would have to occur to get to another state for the object at the current path or relative to the current path.
Parameters
... relativePath_otherState — An optional Array (or multiple parameters) specifying descendant names relative to the current path.
A child index number may be used in place of a name in the path when its parent object is a LinkableHashMap.
|
Object — A session state diff.
|
getSimpleType | () | method |
public function getSimpleType(... relativePath):String
Gets the simple type (unqualified class name) of the object at the current path or relative to the current path.
Parameters
... relativePath — An optional Array (or multiple parameters) specifying descendant names relative to the current path.
A child index number may be used in place of a name in the path when its parent object is a LinkableHashMap.
|
String — The unqualified class name of the object at the current or descendant path, or null if there is no object.
|
getState | () | method |
public function getState(... relativePath):Object
Gets the session state of an object at the current path or relative to the current path.
Parameters
... relativePath — An optional Array (or multiple parameters) specifying descendant names relative to the current path.
A child index number may be used in place of a name in the path when its parent object is a LinkableHashMap.
|
Object — The session state of the object at the current or descendant path.
|
getType | () | method |
public function getType(... relativePath):String
Gets the type (qualified class name) of the object at the current path or relative to the current path.
Parameters
... relativePath — An optional Array (or multiple parameters) specifying descendant names relative to the current path.
A child index number may be used in place of a name in the path when its parent object is a LinkableHashMap.
|
String — The qualified class name of the object at the current or descendant path, or null if there is no object.
|
getTypedState | () | method |
public function getTypedState(... relativePath):Object
Parameters
... relativePath |
Object |
getUntypedState | () | method |
public function getUntypedState(... relativePath):Object
Parameters
... relativePath |
Object |
getValue | () | method |
public function getValue(script_or_function:*, ... args):Object
Returns the value of an ActionScript expression or variable using the current path as the 'this' argument.
Parameters
script_or_function:* — Either a String containing JavaScript code, or a Function.
| |
... args |
Object — The result of evaluating the script or function.
|
migrate | () | method |
public static function migrate(source:WeavePath, destination:Weave):void
Parameters
source:WeavePath | |
destination:Weave |
pop | () | method |
public function pop():WeavePath
Returns to the previous WeavePath that spawned the current one with push().
ReturnsWeavePath — The parent WeavePath object.
|
push | () | method |
public function push(... relativePath):WeavePath
Creates a new WeavePath relative to the current one.
Parameters
... relativePath — An Array (or multiple parameters) specifying descendant names relative to the current path.
A child index number may be used in place of a name in the path when its parent object is a LinkableHashMap.
|
WeavePath — A new WeavePath object which remembers the current WeavePath as its parent.
|
remove | () | method |
public function remove(... relativePath):WeavePath
Removes a dynamically created object.
Parameters
... relativePath — An optional Array (or multiple parameters) specifying descendant names relative to the current path.
A child index number may be used in place of a name in the path when its parent object is a LinkableHashMap.
|
WeavePath — The current WeavePath object.
|
removeCallback | () | method |
public function removeCallback(relevantContext:Object, callback:Function):WeavePath
Removes a callback from the object at the current path or from everywhere.
Parameters
relevantContext:Object — The relevantContext parameter that was given when the callback was added.
| |
callback:Function — The callback function.
|
WeavePath — The current WeavePath object.
|
reorder | () | method |
public function reorder(... orderedNames):WeavePath
Reorders the children of an ILinkableHashMap at the current path.
Parameters
... orderedNames — An Array (or multiple parameters) specifying ordered child names.
|
WeavePath — The current WeavePath object.
|
request | () | method |
public function request(... relativePath_objectType):WeavePath
Requests that an object be created if it doesn't already exist at the current path (or relative path, if specified). This function can also be used to assert that the object at the current path is of the type you expect it to be.
Parameters
... relativePath_objectType — An optional Array (or multiple parameters) specifying descendant names relative to the current path.
A child index number may be used in place of a name in the path when its parent object is a LinkableHashMap.
|
WeavePath — The current WeavePath object.
|
state | () | method |
public function state(... relativePath_state):WeavePath
Sets the session state of the object at the current path or relative to the current path. Any existing dynamically created objects that do not appear in the new state will be removed.
Parameters
... relativePath_state — An optional Array (or multiple parameters) specifying descendant names relative to the current path.
A child index number may be used in place of a name in the path when its parent object is a LinkableHashMap.
|
WeavePath — The current WeavePath object.
|
toString | () | method |
public function toString():String
Provides a human-readable string containing the path.
ReturnsString |
trace | () | method |
public function trace(... args):WeavePath
Calls weaveTrace() in Weave to print to the log window.
Parameters
... args — A list of parameters to pass to weaveTrace().
|
WeavePath — The current WeavePath object.
|