[Openmcl-devel] where is send-super?

Gary Byers gb at clozure.com
Thu Oct 16 02:29:14 PDT 2008



On Thu, 16 Oct 2008, Arthur W Cater wrote:

> I've just rebuilt my ccl, and require'd COCOA-APPLICATION, but the SEND-SUPER macro
> is not present. Please advise what I should do to locate it or its replacement. Has it been renamed
> as one of the following?

I don't think that anything's changed in the last year or so. 
OBJC:SEND-SUPER is still there (as an exported symbol); it has
never had a global definition.

? (fboundp 'call-next-method)
NIL

(Neither does CL:CALL-NEXT-METHOD, for much the same reason.)

Just like CALL-NEXT-METHOD isn't globally defined (and usually only
makes sense inside a CL:DEFMETHOD form), OBJC:SEND-SUPER works
with (and only makes sense in the context of) an ObjC method defined
with OBJC:DEFINE-OBJC-METHOD.  (e.g., if it doesn't appear inside
a method definition, what's the "super" or "next" method ?)

OBJC:DEFINE-OBJC-METHOD (and various flavors of SEND) are still
supported, but for the last year and a half or so there have been
alternatives: OBJC:DEFMETHOD, CALL-NEXT-METHOD, and the #/ function-call
syntax.  The newer constructs deal better with cases where methods
that have different type signatures are introduced at runtime and
may offer some other advantages.

> And btw, why does apropos sometimes find the same symbol twice?

CLHS says that this is

"Because a symbol might be available by way of more than one
inheritance path, apropos might print information about the same
symbol more than once, or apropos-list might return a list containing
duplicate symbols."

For example, the symbol named "SEND-SUPER" is an external symbol
in the OBJC package and also an internal symbol in the CCL package.

If this is unclear, Ron Garret (aka Erann Gat) has written a tutorial
that may help:

<http://www.flownet.com/gat/packages.pdf>



>
> Thanks for any advice,
> Arthur
>
> Welcome to Clozure Common Lisp Version 1.2-r11101M  (DarwinPPC32)!
> ? (apropos "send-super")
> OBJC:OBJC-MESSAGE-SEND-SUPER, Def: MACRO FUNCTION
> OBJC:OBJC-MESSAGE-SEND-SUPER, Def: MACRO FUNCTION
> OBJC:OBJC-MESSAGE-SEND-SUPER-STRET, Def: MACRO FUNCTION
> OBJC:OBJC-MESSAGE-SEND-SUPER-STRET, Def: MACRO FUNCTION
> CCL::OBJC-MESSAGE-SEND-SUPER-STRET-WITH-SELECTOR, Def: MACRO FUNCTION
> CCL::OBJC-MESSAGE-SEND-SUPER-WITH-SELECTOR, Def: MACRO FUNCTION
> OBJC:SEND-SUPER 
> OBJC:SEND-SUPER/STRET
> OBJC:SEND-SUPER/STRET
>>


More information about the Openmcl-devel mailing list