The 'send-super' function sends the specified arguments 'args' to the 'message' specified method of the superclass. It is necessary for 'send-super' to be executed from within a method being performed on an object. It will return the result of sending the message. If 'send-super' is performed outside of a method an error will result.
error: not in a method
(setq a-class (send class :new '())) ; create A-CLASS (send a-class :answer :show '() ; set up special SHOW method '((print "nobody here") self)) (setq an-obj (send a-class :new)) ; create AN-OBJ of A-CLASS (send an-obj :show) ; prints "nobody here" (send a-class :answer :myshow '() ; set up MYSHOW method which '((send-super :show ))) ; calls :SHOW in superclass (send an-obj :myshow) ; prints Object is ...
See the
send-super
function in the