Netscape DevEdge

Skip to: [content] [navigation]

Class xbObject

Synopis

class xbObject
{
  // constructor
  xbObject();
   
  // methods
  void init();
  void destroy();
  Variant parentMethod(String methodName, ...);
  
  // properties
  String isa;
  Object classRef;
}
  

Source

xbObjects.js

Uses

See Also

Description

xbObject is the root of the Class hierarchy. It serves as a means of guaranteeing that all classes have the minimal support required. It also is a means of quickly adding new features to all classes. xbObject is not intended to be instantiated.

Properties

isa

readonly String - Class Name.

classRef

readonly Object - reference to the entry for this class in the _classes object.

Methods

xbObject()

Constructs an instance of the xbObject class.

Returns

nothing

Exceptions

None

destroy()

Destroy instances of a class. Javascript does not automatically call destructors and relies totally upon garbage collection. You must explicitly call destroy if an instance of a class requires destroying. Destructors are especially important in long running scripts that make use of self referential data structures which are never automatically garbage collected. To chain destructors, perform any finalization of the current class and then call the parent's destroy method last.

Returns

Nothing

Exceptions

None

parentMethod(String methodName, ....)

Call an overridden method of a parent class. The first argument is the name of the method to be called with the remaining arguments corresponding to the parent's method's arguments. If the parent method returns a value, parentMethod will return the value as well.

Returns

Variant What ever the parent method returns.

Exceptions

What ever the parent method throws

A+R