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.
(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