Packageorg.spicefactory.parsley.view
Classpublic class ParentContext
InheritanceParentContext Inheritance Object

API for finding the nearest Context in the view hierarchy above the specified DisplayObject. This is an asynchronous operation, hence a callbacks must be specified with one parameter of type Context.



Public Methods
 MethodDefined By
  
available(handler:Function):ParentContext
The handler to invoke when the parent Context has been found in the view hieararchy.
ParentContext
  
complete(handler:Function):ParentContext
The handler to invoke when the parent Context has finished its initialization.
ParentContext
  
error(handler:Function):ParentContext
The handler to invoke when the parent Context could not be found in the view hierarchy.
ParentContext
  
Applies all handlers and configuration that have been specified and waits for the first child Context to be created in the view.
ParentContext
  
view(view:DisplayObject):ParentContext
[static] The view to use for looking up the nearest Context in the hierarchy above.
ParentContext
Method Detail
available()method
public function available(handler:Function):ParentContext

The handler to invoke when the parent Context has been found in the view hieararchy. At this point the configured or initialized events may not have been dispatched yet.

The function must accept a parameter of type Context.

Parameters

handler:Function — the handler to invoke when the parent Context has been found

Returns
ParentContext — this instance for method chaining
complete()method 
public function complete(handler:Function):ParentContext

The handler to invoke when the parent Context has finished its initialization. At this point all non-lazy singletons have been created and configured and the Context had fired its initialized event.

The function must accept a parameter of type Context.

Parameters

handler:Function — the handler to invoke when the parent Context has finished its initialization

Returns
ParentContext — this instance for method chaining
error()method 
public function error(handler:Function):ParentContext

The handler to invoke when the parent Context could not be found in the view hierarchy.

The function must not accept any parameters.

Parameters

handler:Function — the handler to invoke when the parent Context could not be found in the view hierarchy

Returns
ParentContext — this instance for method chaining
execute()method 
public function execute():ContextLookup

Applies all handlers and configuration that have been specified and waits for the first child Context to be created in the view.

Returns
ContextLookup — a lookup instance that allows to cancel the operation
view()method 
public static function view(view:DisplayObject):ParentContext

The view to use for looking up the nearest Context in the hierarchy above.

Parameters

view:DisplayObject — the view to use for looking up the nearest Context in the hierarchy above

Returns
ParentContext — a new ParentContext instance for specifying various callbacks