Uize.Class.mChildObjectEventBindings mixin implements features to provide a declarative approach to wiring Uize events on instances and their child objects (such as widget and child widget events), as well as other types of events on other types of objects (such as DOM events on DOM nodes for widgets).
DEVELOPERS: Ben Ilegbodu, original code contributed by Zazzle Inc.
There are no dedicated showcase example pages for the
SEARCH FOR EXAMPLES
Use the link below to search for example pages on the UIZE Web site that reference the
1.2. Implementation Info
Uize.Class.mChildObjectEventBindings module defines the
Uize.Class.mChildObjectEventBindings object under the
1.2.1. Features Introduced in This Module
1.2.2. Features Overridden in This Module
No features have been overridden in this module.
1.2.3. Features Inherited From Other Modules
This module has no inherited features.
1.2.4. Modules Directly Under This Namespace
There are no modules directly under this namespace.
1.2.5. Unit Tests
Uize.Class.mChildObjectEventBindings module is unit tested by the
Uize.Test.Uize.Class.mChildObjectEventBindings test module.
Lets you conveniently declare the type of event bindings to declare on the class.
childObjectEventBindingsPropertiesOBJ parameter supports the following properties...
declaration - the name of the actual child object event bindings declaration
function to create (such as
instanceProperty - the name of the instance property that contains the references to the child objects (such as
addedInstanceProperty - the name of the
Uize.Class instance property that contains state about which child objects have been added (such as
'addedChildren' for =Uize.Widget.mEventBindings)
additionalTypes - an
object of additional type name =string=s to type definition =object=s
additionalTypes supports the following properties...
namePrefix - a
string representing the prefix indicating that a source object name is of the given type (such as
'#' for node events for
wireWhenever - a condition
function indicating when to wire up the event bindings (such as
'wired' for node events for
Uize.Widget.mEventBindings). Default value is
undefined, meaning the events will be wired immediately upon construction of the instance.
getObjectMethod - the name of he instance method that returns the object given the object's name (such as
'getNode' for nodes for
wireObjectMethod - the name of the instance method that wires the object, given an event name and handler
function (such as
'wireNode' for nodes for
defaultFireIf - a default condition
function indicating under what conditions the instance must be in order to call an event handler if an explicit condition is unspecified in the event bindings (such as
'enabledInherited,!busyInherited' for nodes for
| ||An assumption is made that for non-"regular" types (i.e. those that specify |
namePrefix) that if the object is removed from the instance unwiring will happen automatically or will otherwise be taken care of (such as when nodes are removed from a widget, they are also unwired)