XLISP > XLISP 2.0  -  Contents  -  Reference  -  Previous | Next

:show


Type:   -   message selector
Source:   -   xlobj.c

Syntax

(send object :show)
object - an existing object
returns - the object

Description

The ':show' message selector attempts to find the 'show' method in the specified objects class. Since the ':show' message selector is built-in in the root class, this is always a valid message selector. The object must already exist.

Examples

(setq my-class (send class :new '(state)))              ; create MY-CLASS with 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

See the :show message selector in the XLISP 2.0 manual.

  Back to Top


XLISP > XLISP 2.0  -  Contents  -  Reference  -  Previous | Next