Objectclasssystype.h[37], misc.t[1762], reflect.t[235]

The root object class. All objects descend from this class.

Modified in misc.t[1762]:
Add some methods to the base Object that make it *somewhat* interchangeable with lists and vectors. Certain operations that are normally specific to the collection types have obvious degenerations for the singleton case. In particular, a singleton can be thought of as a collection consisting of one value, so operations that iterate over a collection degenerate to one iteration on a singleton.

Modified in reflect.t[235]:
Modify the basic Object class to provide a to-symbol mapping

intrinsic class Object :

Superclass Tree   (in declaration order)

Object

Subclass Tree  

Object
        BigNumber
        ByteArray
        CharacterSet
        Collection
                List
                LookupTable
                        WeakRefLookupTable
                Vector
                        AnonFuncPtr
        Date
        Dictionary
        File
        FileName
        GrammarProd
        HTTPRequest
        HTTPServer
        IntrinsicClass
        Iterator
                IndexedIterator
                LookupTableIterator
        RexPattern
        String
        StringComparator
        TadsObject
        TemporaryFile
        TimeZone

Global Objects  

(none)

Summary of Properties  

(none)

Summary of Methods  

callInherited  cf  checkDisplay  createIterator  createLiveIterator  display  displayAlt  forEach  getPropList  getPropParams  getSuperclassList  isClass  isTransient  mapAll  ofKind  propDefined  propInherited  propType  valToSymbol 

Properties  

(none)

Methods  

callInherited (cl, prop, [args])misc.t[1799]

Call an inherited method directly. This has the same effect that calling 'inherited cl.prop' would from within a method, but allows you to do this from an arbitrary point *outside* of the object's own code. I.e., you can say 'obj.callInherited(cl, &prop)' and get the effect that 'inherited c.prop' would have had from within an 'obj' method.

cf (func)misc.t[1808]
Call a function by calling this method. This allows us to write code in embedded expressions it mught otherwise be tricky to write, e.g. "<<(cf{: myProp = nil })>>".

checkDisplay (prop)misc.t[1899]
Check whether displaying prop could possibly produce any output. The only tests we apply here are that prop has been defined and is not defined as nil.

createIterator ( )misc.t[1776]
create an iterator

createLiveIterator ( )misc.t[1786]
create a live iterator (this allows 'foreach' to be used with an arbitrary object, iterating once over the loop with the object value)

display (prop)misc.t[1816]
Attempt to display prop appropriately according to its data type (single-quoted string, double-quoted string, integer or code). The prop parameter must be provided as a property pointer.

displayAlt (prop, altMsg?)misc.t[1864]
Attempt to display the message defined in the property prop, and return true if anything is displayed. Otherwise, if the altMsg parameter is supplied (either as a single-quoted string or as a property pointer) display it instead, and then in any case return nil to tell the caller that nothing was displayed by prop.

This method is primarily for use with properties such as smellDesc and listenDesc on Thing for which alternatives may need to be displayed if they don't display anything, but custom classes and objects created by game authors may wish to use it for their own purposes.

forEach (func)misc.t[1770]
forEach on an object simply calls the function on the object

getPropList ( )systype.h[60]
Get a list of my directly-defined properties. When called on intrinsic class objects, this returns a list of properties defined for instances of the class, as well as static properties of the class.

getPropParams (prop)systype.h[70]
get parameter list information for the given method - returns a list: [minimumArgc, optionalArgc, varargs], where minimumArgc is the minimum number of arguments, optionalArgc is the number of additional optional arguments, and varargs is true if the function takes a varying number of arguments greater than or equal to the minimum, nil if not.

getSuperclassList ( )systype.h[46]
get the list of direct superclasses of this object

isClass ( )systype.h[76]
determine if I'm a "class" object - returns true if the object was defined with the "class" keyword, nil otherwise

isTransient ( )systype.h[87]
determine if this instance is transient

mapAll (func)misc.t[1764]
mapAll for an object simply applies a function to the object

ofKind (cls)systype.h[43]
Determine if I'm an instance or subclass of the given class 'cls'. Note that x.ofKind(x) returns true - an object is of its own kind.

propDefined (prop, flags?)systype.h[49]
determine if a property is defined or inherited by this object

propInherited (prop, origTargetObj, definingObj, flags?)systype.h[84]
Determine if a property is inherited further from the given object. definingObj is usually the value of the 'definingobj' pseudo-variable, and origTargetObj is usually the value of the 'targetobj' pseudo-variable.

propType (prop)systype.h[52]
get the type of a property defined for this object

valToSymbol ( )reflect.t[236]
no description available

Adv3Lite Library Reference Manual
Generated on 26/02/2025 from adv3Lite version 2.2