TadsObjectclass | systype.h[242], debug.t[322], signals.t[133]

The "TADS Object" intrinsic class. All objects that the program defines with the "class" or "object" statements descend from this class.

Modified in debug.t[322]:
Provide TadsObject with an objToString() method so that the EVALUATE command can display some kind of name of the object via the toString() function

`intrinsic class TadsObject : Object`

Superclass Tree (in declaration order)

`TadsObject`
`Object`

Subclass Tree

(none)

Global Objects

(none)

Summary of Properties

``

``

(none)

Summary of Methods

`createClone createInstance createTransientInstance dispatchSignal emit getMethod handle objToString setMethod setSuperclassList`

Inherited from `Object` :
`callInherited createIterator createLiveIterator forEach getPropList getPropParams getSuperclassList isClass isTransient mapAll ofKind propDefined propInherited propType valToSymbol`

Properties

(none)

Methods

`createClone ( )` | `systype.h[260]`

Create a clone of this object. This creates an exact copy, with the same property values, as the original. This does not call any constructors; it merely instantiates an exact copy of the original.

Note that the clone is a "shallow" copy, which means that any objects it references are not themselves cloned.

`createInstance (...)` | `systype.h[250]`

Create an instance of this object: in other words, create a new object whose superclass is this object. The arguments provided are passed to the new object's constructor. This method returns a reference to the new object.

`createTransientInstance (...)` | `systype.h[267]`

Create a transient instance of this object. This works just like createInstance(), but creates a transient instance instead of an ordinary (persistent) instance.

`dispatchSignal (sender, signal)` | `signals.t[151]`

no description available

`emit (signal, [args])` | `signals.t[135]`

Emit a signal

`getMethod (prop)` | `systype.h[330]`

Get a method value. If the property is a method, this returns a function pointer to the method; this does NOT evaluate the method. If the property is not a method, this returns nil.

The returned function pointer can be called like an ordinary function, but such a call will have no 'self' value, so the disembodied method won't be able to refer to properties or methods of 'self'. The main use of this method is to get a method of one object to assign as a method of another object using setMethod().

`handle (sender, signal)` | `signals.t[146]`

Handle a signal from sender; game code will need to override particular instances. Note that this is a catch-all handler for signals we don't recognize or for which more specific handlers haven't been defined.

`objToString ( )` | `debug.t[323]`

no description available

`setMethod (prop, func)` | `systype.h[341]`

Set a method value. Assigns the given function (which must be a function pointer value) to the given property of 'self'. This effectively adds a new method to the object.

The function can be an ordinary named function, or a method pointer retrieved from this object or from another object with getMethod(). Anonymous functions are NOT allowed here.

`setSuperclassList (scList)` | `systype.h[317]`

Set the superclass list. scList is a list giving the new superclasses. The superclasses must all be TadsObject objects, with one exception: the list [TadsObject] may be passed to create an object based directly on TadsObject. No other intrinsic classes can be used in the list, and objects of other types cannot be used in the list.

Adv3Lite Library Reference Manual
Generated on 12/09/2014 from adv3Lite version 1.4