Structural Informatics Group (SIG) logo
Home | Projects | Demos | Downloads | Publications | Local Info | About Us | New site
Go to the first, previous, next, last section, table of contents.

:show

:show

type: message selector
location: built-in
source file: xlobj.c
Common LISP compatible: no
supported on: all machines

SYNTAX

(send <object> :show)
        <object>        -       an existing object

DESCRIPTION

The :SHOW message selector attempts to find the 'show' method in the specified <object>'s class. Since the :SHOW message selector is built-in in the root class (CLASS), this is always a valid message selector. The object must already exist.

EXAMPLES

(setq my-class                          ; create MY-CLASS with STATE
        (send class :new '(state)))     ;
(send my-class :answer :isnew '()       ; set up initialization
        '((setq state nil) self))
(send my-class :answer :set-it '(value) ; create :SET-IT message
        '((setq state value)))  
(setq my-obj (send my-class :new))      ; create MY-OBJ of MY-CLASS
(send my-obj :show)                     ; returns object state including
                                        ;   STATE = NIL
(send my-obj :set-it 5)                 ; STATE is set to 5
(send new-obj :show)                    ; error: unbound variable


Go to the first, previous, next, last section, table of contents.