Packageweavejs.core
Classpublic class LinkablePlaceholder
InheritanceLinkablePlaceholder Inheritance LinkableVariable Inheritance CallbackCollection Inheritance Object

Represents an object that must be instantiated asynchronously.



Public Properties
 PropertyDefined By
 InheritedcallbacksAreDelayed : Boolean
[read-only]
CallbackCollection
 Inherited_linkableObject : ILinkableObject
CallbackCollection
 Inheritedlocked : Boolean
[read-only] This is set to true when lock() is called.
LinkableVariable
 Inheritedstate : Object
LinkableVariable
 InheritedtriggerCounter : uint
[read-only]
CallbackCollection
 InheritedwasDisposed : Boolean
[read-only] This flag becomes true after dispose() is called.
CallbackCollection
Protected Properties
 PropertyDefined By
 Inherited_bypassDiff : Boolean = true
If true, session states will be altered to bypass the diff calculation on DynamicState Arrays.
LinkableVariable
 Inherited_locked : Boolean = false
This is set to true when lock() is called.
LinkableVariable
 Inherited_preCallback : Function = null
This is the function that gets called immediately before every callback.
CallbackCollection
 Inherited_primitiveType : Boolean = false
This is true if the _sessionStateType is a primitive type.
LinkableVariable
 Inherited_sessionStateExternal : * = undefined
Available externally via getSessionState()
LinkableVariable
 Inherited_sessionStateInternal : * = undefined
Cannot be modified externally because it is not returned by getSessionState()
LinkableVariable
 Inherited_sessionStateType : Class = null
Type restriction passed in to the constructor.
LinkableVariable
 Inherited_sessionStateWasSet : Boolean = false
This is true if the session state has been set at least once.
LinkableVariable
 Inherited_verifier : Function = null
This function is used to prevent the session state from having unwanted values.
LinkableVariable
Public Methods
 MethodDefined By
  
LinkablePlaceholder(classDef:Class)
LinkablePlaceholder
 Inherited
addDisposeCallback(relevantContext:Object, callback:Function, allowDelay:Boolean = false):void
CallbackCollection
 Inherited
addGroupedCallback(relevantContext:Object, groupedCallback:Function, triggerCallbackNow:Boolean = false, delayWhileBusy:Boolean = true):void
CallbackCollection
 Inherited
addImmediateCallback(relevantContext:Object, callback:Function, runCallbackNow:Boolean = false, alwaysCallLast:Boolean = false):void
CallbackCollection
 Inherited
CallbackCollection
 Inherited
This function may be called to detect change to a non-primitive session state in case it has been modified externally.
LinkableVariable
 Inherited
dispose():void
[override]
LinkableVariable
  
getClass():Class
LinkablePlaceholder
  
getClass(object:Object):Class
[static] A utility function for getting the class definition from LinkablePlaceholders as well as regular objects.
LinkablePlaceholder
  
LinkablePlaceholder
 Inherited
LinkableVariable
 Inherited
The type restriction passed in to the constructor.
LinkableVariable
 Inherited
lock():void
Call this function when you do not want to allow any more changes to the value of this sessioned property.
LinkableVariable
 Inherited
removeCallback(relevantContext:Object, callback:Function):void
CallbackCollection
  
[static]
LinkablePlaceholder
 Inherited
CallbackCollection
  
LinkablePlaceholder
  
setInstance(possiblePlaceholder:ILinkableObject, instance:ILinkableObject):void
[static] Replaces a LinkablePlaceholder with an instance of the expected type.
LinkablePlaceholder
  
setSessionState(value:Object):void
[override]
LinkablePlaceholder
 Inherited
CallbackCollection
 Inherited
verifyValue(value:Object):Boolean
This function will verify if a given value is a valid session state for this linkable variable.
LinkableVariable
  
whenReady(relevantContext:ILinkableObject, possiblePlaceholder:ILinkableObject, onReady:Function):void
[static] Calls a function after a placeholder has been replaced with an instance and the instance session state has been initialized.
LinkablePlaceholder
Protected Methods
 MethodDefined By
 Inherited
_runCallbacksImmediately(... preCallbackParams):void
This function runs callbacks immediately, ignoring any delays.
CallbackCollection
 Inherited
sessionStateEquals(otherSessionState:*):Boolean
This function is used in setSessionState() to determine if the value has changed or not.
LinkableVariable
Public Constants
 ConstantDefined By
 InheritedDEFAULT_TRIGGER_COUNT : uint = 1
[static] This is the default value of triggerCounter.
CallbackCollection
 InheritedSTACK_TRACE_TRIGGER : String = This is the stack trace from when the callbacks were last triggered.
[static]
CallbackCollection
Constructor Detail
LinkablePlaceholder()Constructor
public function LinkablePlaceholder(classDef:Class)



Parameters
classDef:Class
Method Detail
getClass()method
public function getClass():Class

Returns
Class
getClass()method 
public static function getClass(object:Object):Class

A utility function for getting the class definition from LinkablePlaceholders as well as regular objects.

Parameters

object:Object — An object, which may be null.

Returns
Class — The class definition, or null if the object was null.
getInstance()method 
public function getInstance():ILinkableObject

Returns
ILinkableObject
replaceInstanceWithPlaceholder()method 
public static function replaceInstanceWithPlaceholder(instance:ILinkableObject):void

Parameters

instance:ILinkableObject

setInstance()method 
public function setInstance(instance:ILinkableObject):void

Parameters

instance:ILinkableObject

setInstance()method 
public static function setInstance(possiblePlaceholder:ILinkableObject, instance:ILinkableObject):void

Replaces a LinkablePlaceholder with an instance of the expected type.

Parameters

possiblePlaceholder:ILinkableObject — A LinkablePlaceholder or the instance object if it has already been placed.
 
instance:ILinkableObject — An instance of the type of object that the placeholder is expecting.

setSessionState()method 
override public function setSessionState(value:Object):void

Parameters

value:Object

whenReady()method 
public static function whenReady(relevantContext:ILinkableObject, possiblePlaceholder:ILinkableObject, onReady:Function):void

Calls a function after a placeholder has been replaced with an instance and the instance session state has been initialized. The onReady function will be called immediately if possiblePlaceholder is not a LinkablePlaceholder.

Parameters

relevantContext:ILinkableObject — The relevantContext parameter passed to ICallbackCollection.addDisposeCallback().
 
possiblePlaceholder:ILinkableObject — Either a LinkablePlaceholder or another ILinkableObject.
 
onReady:Function — The function to call.