[Openmcl-devel] How to send a message to the objc super-class ?

mikel evins mevins at mac.com
Sun Feb 3 20:26:22 UTC 2008


On Feb 3, 2008, at 11:11 AM, Didier Verna wrote:

>
>       Hello,
>
> I would like to implement the equivalent of this in Lisp:
>
> - (void)drawWithFrame:(NSRect)cellFrame inView:(NSView*)controlView
> {
>  [super drawWithFrame:cellFrame inView:controlView];
> }
>
>
> However, this doesn't work:
>
> (objc:defmethod (#/drawWithFrame:inView: :void)
>    ((self outline-cell) frame view)
>  (ccl::send-super self :draw-with-frame frame :in-view view))
>
> I get the following message:
>
> 2008-02-03 18:10:39.925 iOwn[78010:10b] Lisp exception: Undefined
> function OBJC:SEND-SUPER called with arguments (#<OUTLINE-CELL
> <OutlineCell: 0x17707f20> (#x17707F20)> :DRAW-WITH-FRAME
> #<NS-OUTLINE-VIEW <NSOutlineView: 0x9b8800> (#x9B8800)> :IN-VIEW #<A
> Foreign Pointer #x4>) .
>
>
> What am I doing wrong ?

We're working on it; in the meantime, can you use ccl::define-objc- 
method instead of objc:defmethod?

See:

http://openmcl.clozure.com/Doc/index.html#CCL_003b_003bDEFINE_002dOBJC_002dMETHOD

for documentation of ccl::define-objc-method

--me




More information about the Openmcl-devel mailing list