Read Me - Common Public License V1.0 - Copyright Notice(©)

request


>>-request(classid)--------------------------------------------><

Returns an object of the [classid] class, or the Nil object if the request cannot be satisfied.

This method first compares the identity of the object's class (see the [id] method of the Class class in ) to [classid] . If they are the same, the receiver object is returned as the result. Otherwise, [request] tries to obtain and return an object satisfying [classid] by sending the receiver object the conversion message make with the string [classid] appended (converted to uppercase). For example, a request("string") message causes a [makeString] message to be sent. If the object does not have the required conversion method, [request] returns the Nil object.

The conversion methods cause objects to produce different representations of themselves. The presence or absence of a conversion method defines an object's capability to produce the corresponding representations. For example, lists can represent themselves as arrays, because they have a [makeArray] method, but they cannot represent themselves as directories, because they do not have a [makeDirectory] method. Any conversion method must return an object of the requested class. For example, [makeArray] must return an array. The language processor uses the [makeString] method to obtain string values in certain contexts; see .

Read Me - Common Public License V1.0 - Copyright Notice(©)