components and values. The components of an instance are:
Class Pointer This pointer shows to which class the current object instance belongs. It is through this link that the system finds the methods to execute for the received messages.
Instance Variables The Instance Variables (IVAR) component and Values lists what variables exist within the instance. The Instance Values component holds what the current values of the variables are. Instance Variables are used to hold state information for each instance. There will be a group of Instance Variables for each instance.
METHODS
There have been a few of the messages and methods in XLISP shown to this
point (:NEW and :SHOW). The following are the methods built into XLISP:
:ANSWER The :ANSWER method allows you to define or change methods within a class.
:CLASS The :CLASS method returns the class of an object.
:ISNEW The :ISNEW method causes an instance to run its initialization code. When the :ISNEW method is run on a class, it resets the class state. This allows you to re-define instance variables, class variables, etc.
:NEW The :NEW method allows you to create an instance when the :NEW message is sent to a user-defined class. The :NEW method allows you to create a new class (when the :NEW message is sent to the built-in CLASS).
:SHOW The :SHOW method displays the instance or class.
SENDING MESSAGES TO A SUPERCLASS
In addition to the SEND function, there is another function called
SEND-SUPER. The SEND-SUPER function causes the specified message to be
performed by the superclass method. This is a mechanism to allow
chaining of methods in a class hierarchy. This chaining behavior can be
achieved by creating a method for a class with the :ANSWER message.
Within the body of the method, you include a SEND-SUPER form. This
function is allowed only inside the execution of a method of an object.