API Documentation | All Packages | All Classes | Index | Frames | ![]() |
Weave | Properties | Methods | Constants | |
Property | Defined By | ||
---|---|---|---|
beta : Boolean = false [static] | Weave | ||
history : SessionStateLog
The session history
| Weave | ||
root : ILinkableHashMap
The root object in the session state
| Weave |
Method | Defined By | ||
---|---|---|---|
Weave() | Weave | ||
AS(object:Object, type:Class):* [static]
| Weave | ||
classInfo(info:Object):Function [static]
Decorator-generator for registering a class. | Weave | ||
className(def:Object):String [static]
Gets the qualified class name from a class definition or an object instance. | Weave | ||
combineDiff(baseDiff:Object, diffToAdd:Object):Object [static]
Shortcut for WeaveAPI.SessionManager.combineDiff()
| Weave | ||
computeDiff(oldState:Object, newState:Object):Object [static]
Shortcut for WeaveAPI.SessionManager.computeDiff()
| Weave | ||
[static]
Shortcut for WeaveAPI.SessionManager.copySessionState()
| Weave | ||
detectChange(observer:Object, linkableObject:ILinkableObject, ... moreLinkableObjects):Boolean [static]
This function is used to detect if callbacks of a linkable object were triggered since the last time this function
was called with the same parameters, likely by the observer. | Weave | ||
disposableChild(disposableParent:Object, disposableChildOrType:Object):* [static]
Shortcut for WeaveAPI.SessionManager.newDisposableChild() and WeaveAPI.SessionManager.registerDisposableChild()
| Weave | ||
dispose():void | Weave | ||
dispose(object:Object):void [static]
Shortcut for WeaveAPI.SessionManager.disposeObject()
| Weave | ||
[static]
Shortcut for WeaveAPI.SessionManager.getPath()
| Weave | ||
[static]
Shortcut for WeaveAPI.SessionManager.getObject()
| Weave | ||
[static]
Finds the closest ancestor of a descendant given the ancestor type. | Weave | ||
getAsyncInstanceHandler(type:Class):Function [static]
Gets the function that was passed in to registerAsyncClass() for a given type. | Weave | ||
[static]
Shortcut for WeaveAPI.SessionManager.getCallbackCollection()
| Weave | ||
getDefinition(name:String, throwIfNotFound:Boolean = false):* [static]
Looks up a static definition by name. | Weave | ||
getDescendants(object:ILinkableObject, filter:Class = null):Array [static]
Shortcut for WeaveAPI.SessionManager.getLinkableDescendants()
| Weave | ||
getObject(... path):ILinkableObject
Gets the ILinkableObject at a specified path. | Weave | ||
[static]
Shortcut for WeaveAPI.SessionManager.getLinkableOwner()
| Weave | ||
[static]
Gets a WeavePath from an ILinkableObject. | Weave | ||
[static]
Finds the root ILinkableHashMap for a given ILinkableObject. | Weave | ||
getState(linkableObject:ILinkableObject):Object [static]
Shortcut for WeaveAPI.SessionManager.getSessionState()
| Weave | ||
[static]
Finds the Weave instance for a given Object. | Weave | ||
id(arg:*):* [static]
Shortcut for DebugUtils.debugId() and DebugUtils.debugLookup()
| Weave | ||
IS(object:Object, type:Class):Boolean [static]
| Weave | ||
isAsyncClass(type:Class):Boolean [static]
Checks if a class is or extends one that was registered through registerAsyncClass(). | Weave | ||
isBusy(object:ILinkableObject):Boolean [static]
Shortcut for WeaveAPI.SessionManager.linkableObjectIsBusy()
| Weave | ||
isLinkable(objectOrClass:Object):Boolean [static]
Checks if an object or class implements ILinkableObject
| Weave | ||
lang(text:String, ... parameters):String [static]
This is a convenient global function for retrieving localized text. | Weave | ||
linkableChild(linkableParent:Object, linkableChildOrType:Object, callback:Function = null, useGroupedCallback:Boolean = false):* [static]
Shortcut for WeaveAPI.SessionManager.newLinkableChild() and WeaveAPI.SessionManager.registerLinkableChild()
| Weave | ||
[static]
Shortcut for WeaveAPI.SessionManager.linkSessionState()
| Weave | ||
macro(name:String, ... params):*
For backwards compatibility, may be temporary solution
| Weave | ||
Creates a WeavePath object. | Weave | ||
privateLinkableChild(linkableParent:Object, linkableChildOrType:Object, callback:Function = null, useGroupedCallback:Boolean = false):* [static]
Shortcut for WeaveAPI.SessionManager.newLinkableChild() and WeaveAPI.SessionManager.registerLinkableChild() except the child will not be included in the session state. | Weave | ||
registerAsyncClass(type:Class, instanceHandler:Function):void [static]
Registers a class that must be instantiated asynchronously. | Weave | ||
registerClass(definition:Class, qualifiedName:Object, additionalInterfaces:Array = null, displayName:String = null):void [static]
Registers an ILinkableObject class for use with Weave.className() and Weave.getDefinition(). | Weave | ||
removeObject(path:Array):void
Removes an object at the given path. | Weave | ||
requestObject(path:Array, type:Class):ILinkableObject
Requests that an object be created if it doesn't already exist at the given path. | Weave | ||
setClassInfo(definition:Class, info:Object):Object [static]
Registers a class. | Weave | ||
setState(linkableObject:ILinkableObject, newState:Object, removeMissingDynamicObjects:Boolean = true):void [static]
Shortcut for WeaveAPI.SessionManager.setSessionState()
| Weave | ||
stringify(value:*, replacer:Function = null, indent:* = null, json_values_only:Boolean = false):String [static]
Generates a deterministic JSON-like representation of an object, meaning object keys appear in sorted order. | Weave | ||
[static]
Shortcut for WeaveAPI.SessionManager.unlinkSessionState()
| Weave | ||
wasDisposed(object:Object):Boolean [static]
Shortcut for WeaveAPI.SessionManager.objectWasDisposed()
| Weave |
Constant | Defined By | ||
---|---|---|---|
FRAME_INTERVAL : Number = 33.333333333333336 [static] | Weave | ||
HISTORY_SYNC_DELAY : int = 100 [static] | Weave |
beta | property |
public static var beta:Boolean = false
history | property |
public var history:SessionStateLog
The session history
root | property |
public var root:ILinkableHashMap
The root object in the session state
Weave | () | Constructor |
public function Weave()
AS | () | method |
public static function AS(object:Object, type:Class):*
Parameters
object:Object | |
type:Class |
* — (object as type)
|
classInfo | () | method |
public static function classInfo(info:Object):Function
Decorator-generator for registering a class.
Parameters
info:Object — An object containing the class info.
|
Function — A function which takes a definition and applies the supplied info.
|
className | () | method |
public static function className(def:Object):String
Gets the qualified class name from a class definition or an object instance.
Parameters
def:Object |
String |
combineDiff | () | method |
public static function combineDiff(baseDiff:Object, diffToAdd:Object):Object
Shortcut for WeaveAPI.SessionManager.combineDiff()
Parameters
baseDiff:Object | |
diffToAdd:Object |
Object |
computeDiff | () | method |
public static function computeDiff(oldState:Object, newState:Object):Object
Shortcut for WeaveAPI.SessionManager.computeDiff()
Parameters
oldState:Object | |
newState:Object |
Object |
copyState | () | method |
public static function copyState(source:ILinkableObject, destination:ILinkableObject):void
Shortcut for WeaveAPI.SessionManager.copySessionState()
Parameters
source:ILinkableObject | |
destination:ILinkableObject |
detectChange | () | method |
public static function detectChange(observer:Object, linkableObject:ILinkableObject, ... moreLinkableObjects):Boolean
This function is used to detect if callbacks of a linkable object were triggered since the last time this function was called with the same parameters, likely by the observer. Note that once this function returns true, subsequent calls will return false until the callbacks are triggered again. It's a good idea to specify a private object or function as the observer so no other code can call detectChange with the same observer and linkableObject parameters.
Parameters
observer:Object — The object that is observing the change.
| |
linkableObject:ILinkableObject — The object that is being observed.
| |
... moreLinkableObjects — More objects that are being observed.
|
Boolean — A value of true if the callbacks for any of the objects have triggered since the last time this function was called
with the same observer for any of the specified linkable objects.
|
disposableChild | () | method |
public static function disposableChild(disposableParent:Object, disposableChildOrType:Object):*
Shortcut for WeaveAPI.SessionManager.newDisposableChild() and WeaveAPI.SessionManager.registerDisposableChild()
Parameters
disposableParent:Object | |
disposableChildOrType:Object |
* |
See also
dispose | () | method |
public function dispose():void
dispose | () | method |
public static function dispose(object:Object):void
Shortcut for WeaveAPI.SessionManager.disposeObject()
Parameters
object:Object |
findPath | () | method |
public static function findPath(root:ILinkableObject, descendant:ILinkableObject):Array
Shortcut for WeaveAPI.SessionManager.getPath()
Parameters
root:ILinkableObject | |
descendant:ILinkableObject |
Array |
followPath | () | method |
public static function followPath(root:ILinkableObject, path:Array):ILinkableObject
Shortcut for WeaveAPI.SessionManager.getObject()
Parameters
root:ILinkableObject | |
path:Array |
ILinkableObject |
getAncestor | () | method |
public static function getAncestor(descendant:ILinkableObject, ancestorType:Class):ILinkableObject
Finds the closest ancestor of a descendant given the ancestor type.
Parameters
descendant:ILinkableObject — An object with ancestors.
| |
ancestorType:Class — The Class definition used to determine which ancestor to return.
|
ILinkableObject — The closest ancestor of the given type.
|
See also
getAsyncInstanceHandler | () | method |
public static function getAsyncInstanceHandler(type:Class):Function
Gets the function that was passed in to registerAsyncClass() for a given type.
Parameters
type:Class |
Function |
getCallbacks | () | method |
public static function getCallbacks(linkableObject:ILinkableObject):ICallbackCollection
Shortcut for WeaveAPI.SessionManager.getCallbackCollection()
Parameters
linkableObject:ILinkableObject |
ICallbackCollection |
getDefinition | () | method |
public static function getDefinition(name:String, throwIfNotFound:Boolean = false):*
Looks up a static definition by name.
Parameters
name:String | |
throwIfNotFound:Boolean (default = false )
|
* |
getDescendants | () | method |
public static function getDescendants(object:ILinkableObject, filter:Class = null):Array
Shortcut for WeaveAPI.SessionManager.getLinkableDescendants()
Parameters
object:ILinkableObject | |
filter:Class (default = null )
|
Array |
getObject | () | method |
public function getObject(... path):ILinkableObject
Gets the ILinkableObject at a specified path.
Parameters
... path — An Array (or multiple parameters) 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.
|
ILinkableObject |
getOwner | () | method |
public static function getOwner(child:ILinkableObject):ILinkableObject
Shortcut for WeaveAPI.SessionManager.getLinkableOwner()
Parameters
child:ILinkableObject |
ILinkableObject |
getPath | () | method |
public static function getPath(object:ILinkableObject):WeavePath
Gets a WeavePath from an ILinkableObject.
Parameters
object:ILinkableObject — An ILinkableObject.
|
WeavePath — A WeavePath, or null if the object is not registered with a Weave instance.
|
getRoot | () | method |
public static function getRoot(object:ILinkableObject):ILinkableHashMap
Finds the root ILinkableHashMap for a given ILinkableObject.
Parameters
object:ILinkableObject — An ILinkableObject.
|
ILinkableHashMap — The root ILinkableHashMap.
|
getState | () | method |
public static function getState(linkableObject:ILinkableObject):Object
Shortcut for WeaveAPI.SessionManager.getSessionState()
Parameters
linkableObject:ILinkableObject |
Object |
getWeave | () | method |
public static function getWeave(object:Object):Weave
Finds the Weave instance for a given Object.
Parameters
object:Object — An Object.
|
Weave — The Weave instance, or null if the object was not registered as an ancestor of any instance of Weave.
|
id | () | method |
public static function id(arg:*):*
Shortcut for DebugUtils.debugId() and DebugUtils.debugLookup()
Parameters
arg:* (default = NaN )
|
* |
IS | () | method |
public static function IS(object:Object, type:Class):Boolean
Parameters
object:Object | |
type:Class |
Boolean — (object is type)
|
isAsyncClass | () | method |
public static function isAsyncClass(type:Class):Boolean
Checks if a class is or extends one that was registered through registerAsyncClass().
Parameters
type:Class |
Boolean |
isBusy | () | method |
public static function isBusy(object:ILinkableObject):Boolean
Shortcut for WeaveAPI.SessionManager.linkableObjectIsBusy()
Parameters
object:ILinkableObject |
Boolean |
isLinkable | () | method |
public static function isLinkable(objectOrClass:Object):Boolean
Checks if an object or class implements ILinkableObject
Parameters
objectOrClass:Object |
Boolean |
lang | () | method |
public static function lang(text:String, ... parameters):String
This is a convenient global function for retrieving localized text. Sample syntax: Weave.lang("hello world") You can also specify a format string with parameters which will be passed to StandardLib.substitute(): Weave.lang("{0} and {1}", first, second)
Parameters
text:String — The original text or format string to translate.
| |
... parameters — Parameters to be passed to StandardLib.substitute() if the text is to be treated as a format string.
|
String |
linkableChild | () | method |
public static function linkableChild(linkableParent:Object, linkableChildOrType:Object, callback:Function = null, useGroupedCallback:Boolean = false):*
Shortcut for WeaveAPI.SessionManager.newLinkableChild() and WeaveAPI.SessionManager.registerLinkableChild()
Parameters
linkableParent:Object | |
linkableChildOrType:Object | |
callback:Function (default = null )
| |
useGroupedCallback:Boolean (default = false )
|
* |
See also
linkState | () | method |
public static function linkState(primary:ILinkableObject, secondary:ILinkableObject):void
Shortcut for WeaveAPI.SessionManager.linkSessionState()
Parameters
primary:ILinkableObject | |
secondary:ILinkableObject |
macro | () | method |
public function macro(name:String, ... params):*
For backwards compatibility, may be temporary solution
Parameters
name:String | |
... params |
* |
path | () | method |
public function path(... basePath):WeavePath
Creates a WeavePath object. WeavePath objects are immutable after they are created. This is a shortcut for "new WeavePath(weave, basePath)".
Parameters
... basePath — An optional Array (or multiple parameters) 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.
|
WeavePath — A WeavePath object.
|
See also
privateLinkableChild | () | method |
public static function privateLinkableChild(linkableParent:Object, linkableChildOrType:Object, callback:Function = null, useGroupedCallback:Boolean = false):*
Shortcut for WeaveAPI.SessionManager.newLinkableChild() and WeaveAPI.SessionManager.registerLinkableChild() except the child will not be included in the session state.
Parameters
linkableParent:Object | |
linkableChildOrType:Object | |
callback:Function (default = null )
| |
useGroupedCallback:Boolean (default = false )
|
* |
See also
registerAsyncClass | () | method |
public static function registerAsyncClass(type:Class, instanceHandler:Function):void
Registers a class that must be instantiated asynchronously. Dynamic items in the session state that extend this class will be replaced with LinkablePlaceholder objects that can be replaced with actual instances later.
Parameters
type:Class | |
instanceHandler:Function |
registerClass | () | method |
public static function registerClass(definition:Class, qualifiedName:Object, additionalInterfaces:Array = null, displayName:String = null):void
Registers an ILinkableObject class for use with Weave.className() and Weave.getDefinition().
Parameters
definition:Class — The class definition.
| |
qualifiedName:Object — Either a single String or an Array of Strings which are qualified class names under which to register the class definition.
| |
additionalInterfaces:Array (default = null ) — An Array of interfaces (Class objects) that the definition implements in addition to ILinkableObject.
| |
displayName:String (default = null ) — An optional display name for the class definition.
|
removeObject | () | method |
public function removeObject(path:Array):void
Removes an object at the given path.
Parameters
path:Array — The path
|
requestObject | () | method |
public function requestObject(path:Array, type:Class):ILinkableObject
Requests that an object be created if it doesn't already exist at the given path.
Parameters
path:Array — The path
| |
type:Class — The type
|
ILinkableObject — Either an instance of the requested type, or null if the object could not be created or a LinkablePlaceholder was created.
|
setClassInfo | () | method |
public static function setClassInfo(definition:Class, info:Object):Object
Registers a class.
Parameters
definition:Class — The class definition.
| |
info:Object — An object containing the class info.
|
Object — The same info object passed in as a parameter.
|
setState | () | method |
public static function setState(linkableObject:ILinkableObject, newState:Object, removeMissingDynamicObjects:Boolean = true):void
Shortcut for WeaveAPI.SessionManager.setSessionState()
Parameters
linkableObject:ILinkableObject | |
newState:Object | |
removeMissingDynamicObjects:Boolean (default = true )
|
stringify | () | method |
public static function stringify(value:*, replacer:Function = null, indent:* = null, json_values_only:Boolean = false):String
Generates a deterministic JSON-like representation of an object, meaning object keys appear in sorted order.
Parameters
value:* — The object to stringify.
| |
replacer:Function (default = null ) — A function like function(key:String, value:: | |
indent:* (default = null ) — Either a Number or a String to specify indentation of nested values
| |
json_values_only:Boolean (default = false ) — If this is set to true, only JSON-compatible values will be used (NaN/Infinity/undefined -> null)
|
String |
unlinkState | () | method |
public static function unlinkState(first:ILinkableObject, second:ILinkableObject):void
Shortcut for WeaveAPI.SessionManager.unlinkSessionState()
Parameters
first:ILinkableObject | |
second:ILinkableObject |
wasDisposed | () | method |
public static function wasDisposed(object:Object):Boolean
Shortcut for WeaveAPI.SessionManager.objectWasDisposed()
Parameters
object:Object |
Boolean |
FRAME_INTERVAL | Constant |
public static const FRAME_INTERVAL:Number = 33.333333333333336
HISTORY_SYNC_DELAY | Constant |
public static const HISTORY_SYNC_DELAY:int = 100