@doc alias="obj" hierarchy="GMLDOM">
The ultimate superclass of all objects that are not persistent.
Instances of Object or any of its derived classes are transient objects that only exist in memory.
(c) SAP AG 2003-2006. All rights reserved.
///////////////////////////////////////////////////////////////////////
// CLASS HEADER
Class Object;
///////////////////////////////////////////////////////////////////////
// PROPERTIES
<@prop name="Class" type="@Class!" access="RO" static="yes">Gets the object's Class
///////////////////////////////////////////////////////////////////////
// METHODS
<@method name="isa">
Tests whether this object is an instance of one or more specified classes
A variable list of qualified class names to test
The test result
<@doc>
Gets the value of a specified property
Gets an object's own property
The name of the property to get
Gets an object's aspect property
The qualified aspect role name
The name of the property to get
The requested property value
override method getProperty(name)
if (arguments.length == 2) {
name = $DOM.getAspect$Name(arguments[0], arguments[1]);
}
if (this.hasOwnProperty(name)) return this[name];
var P=this.Class.properties[name];
return (P && P.isProperty) ? P.value : null;
end
<@doc>
Sets the value of a specified property
Sets an object's own property
The name of the property to set
The property's new value. If omitted, the property will be reset to its default value.
Sets an object's aspect property
The qualified aspect role name
The name of the property to set
The property's new value. If omitted, the property will be reset to its default value.
This object
override method setProperty(name, value)
if (arguments.length == 3) {
name = $DOM.getAspect$Name(arguments[0], arguments[1]);
value = arguments[2];
}
var C=this.Class, P=C.properties[name];
if (!P || P.isReadonly) return this;
if (P.isStatic) { C.prototype[name] = value; return this; }
if (value === undefined) delete this[name]; else this[name] = value;
return this;
end
<@doc>
Invokes an overridden method on the superclass
The overridden method arguments. If omitted, the arguments passed to the invoking method will be used
The invoked method return value
method supercall()
try {
var caller = arguments.callee.caller;
var ancestor = caller.Class.superclass;
if (ancestor) {
var args = (arguments.length == 0 ? caller.arguments : arguments);
var func = ancestor.prototype[caller.name];
if (func) return func.apply(this, args);
}
} catch(e) {
var msg1='#TEXT[XMSG_METHOD]';
var msg2='supercall failed\:';
#LOG[4, msg1+' '+caller.name+' '+msg2+' '+e.description]
}
end
<@doc>
Invokes an overridden method on an ancestor class (including indirect ancestor classes and prototypes from which this class is derived)
The name of the ancestor class/prototype to invoke
The overridden method arguments. If omitted, the arguments passed to the invoking method will be used
The invoked method return value
method protocall(ancestorName)
try {
var caller = arguments.callee.caller;
var ancestor = caller.Class.precedents[ancestorName];
if (ancestor) {
var args = caller.arguments;
if (arguments.length > 1 ) {
for (var i=1, len=arguments.length, args=[]; i