Methods
-
$class(definition) → {Class}
-
Define a class using the given definition.
Parameters:
Name Type Description definition
Object The class body which defines object's states and behaviors.
- Since:
-
- 2.0.0
Throws:
Will throw an error if the given $namespace property is already used by another.
Returns:
A defined class.
- Type
- Class
Example
$class({ $namespace: 'caph.test.TestClass', // declares class namespace $extends: caph.test.BaseClass, // inherits another class. $mixins: [object1, object2, object3], // appends the abilities of the given objects to the class instance. (do not overwrite the previous one.) // defines constructor. $constructor: function() { }, // defines class static properties. $statics: { staticVariable: 0, staticMethod: function() { } }, method: function() { this.$super(); // if want to use extended class method. } });
-
callbackOperationSucceeded(node)
-
is a form of the callback function invoked by tree operation functions such as addChild.
Parameters:
Name Type Description node
Object A node which has been successfully handled.