:: Documentation >>

AW.System.Object

Generic base class (root object).

Constructor

 var obj = new AW.System.Object; 

Hierarchy

Parent Classes:
None

Methods

cloneCreates an object clone.
initInitializes the object.
setTimeoutCalls the function after the specified delay.
toStringConverts object to string.

Example

AW is built using standard javascript prototype-based inheritance but it also uses several conventions to provide additional functionality to AW classes.

// create new constructor function (MyClass)
var MyClass = AW.System.Object.subclass();

// define prototype initialization function
MyClass.create = function(){

    // get reference to the class prototype
    var obj = this.prototype;

    // define new property
    obj.value = 0;

    // define new method
    obj.method = function(){
        // ...
    }
}

// create new object
var myObj = new MyClass;

// use it!
myObj.method();

Remarks

AW classes are defined with a call to subclass() method of the parent class. The subclass() method returns a default empty constructor function (= new class) and copies all helper methods into the new constructor. It also assignes a new instance of the parent class to the subclass prototype.

By default the new class prototype initialization is delayed until the first instance of the new class is created. When the new class constructor is called for the first time it will run create() method to initialize members of the prototype object.

Comments

clone jhon (1)

Documentation:

Recent changes:

2.6.4
2.6.3
2.6.2
2.6.1
2.6.1
2.6.0
2.5.0 - 2.5.6
2.5.6
2.5.0 - 2.5.5
2.5.5