class Standard . Object (1) {
} inherits from NOTHING;
The class Object provides facilities common to all objects within an FARGOS/VISTA Object Management Environment. All classes must inherit from class Object, either directly or via a base class. The sole exception is class Thread, which describes the methods that can be invoked against any thread.
Object:addNotifyWhenModified(any object)
The addNotifyWhenModified method provides a facility by which an object can be monitored for modifications. It should be used whenever an application wants to react to changes in an object's state but does not have any control over when or how such state changes may occur. Any number of object Ids or service names may be specified as arguments. Duplicate / redundant subscriptions are automatically pruned.
Whenever an object's instance variables are modified and the modifying thread terminates, all subscribers are sent an objectModified message. The object Id of the modified object will be passed as the only argument. If an object is deleted, the subscribers are sent an objectDeleted message and passed the object Id of the now deleted object.Object:removeNotifyWhenModified(any object)
The removeNotifyWhenModified method removes subscriptions that were previously requested using addNotifyWhenModified. Any number of object Ids or service names may be specified.
Object:setMeta(oid metaObject)
The setMeta method takes a single argument that specifies the Id of the object that is to be set as the meta object for the object that is the target of the setMeta invocation. If metaObject is nil, any current association with a meta object is removed. This method does not return a value.
Object:deleteYourself()
The deleteYourself method is the means by which all objects are deleted. It takes no arguments and does not return a value.
Object:handleException(string exceptionName)
The handleException method is used to implement an exception handler. Applications that intend to do something intelligent with an exception will override the implementation of Object:handleException. The default implementation displays a dump of the offending thread frame on standard out. This method does not return a value.
Object:isOfClass()
The isOfClass method identifies an object's class.
Object:listAllowedMethods()
The listAllowedMethods method returns an array that identifies all of the outstanding methods that are allowed to be invoked against an object. The first record is stored in subscript 0. Each record is itself a three-element array:
This method is normally only used by applications that need to get an entire snapshot of an object's state (such as PersistenceService).
Object:describeInstanceVariables()
An definition of an object's instance variables and the corresponding inheritance tree of its class can be obtained by the describeInstanceVariables method. Note that the information provided is descriptive and has its origins in the declarations that were made in the source code of the class implementation. An object's current live data can be obtained via the extractInstanceVariables method.
The describeInstanceVariables method returns an array, subscripted starting at 0, that describes the instance variables of each inherited class. Subscript 0 will invariably hold information corresponding to class Object; the last element in the array will correspond to the class of the object being accessed.
Each record consists of a 4-element array, subscripted starting at 0:
Object:extractInstanceVariables()
The current state of all of an object's instance variables (the top level class and the corresponding inheritance tree) can be obtained by the extractInstanceVariables method.
The extractInstanceVariables method returns an array, subscripted starting at 0, that describes the instance variables of each inherited class. Subscript 0 will invariably hold information corresponding to class Object; the last element in the array will correspond to the class of the object being accessed.
Each record is itself an array, subscripted starting at 0, that holds the current state of each instance variable at the specified class level.
Object:encodeObject()
The encodeObject method encodes the current state of an object into a single string. The returned string can be used in an invocation of ObjectCreator:importObject or ObjectCreator:duplicateObject on any FARGOS/VISTA Object Management Environment.
Object:objectImported()
After an object is imported (by ObjectCreator:importObject) or duplicated (by ObjectCreator:duplicateObject) it is sent an objectImported message, which provides an opportunity to perform any needed work to reassociate the object with its new environment. The default implementation is a null method.