[Openmcl-devel] Re: Status of Cocoa under Tiger?
Gary Byers
gb at clozure.com
Sat May 14 04:25:29 PDT 2005
On Sat, 14 May 2005, Tord Kallqvist Romstad wrote:
> Gary Byers <gb at clozure.com> writes:
>>>>>> Error: value #<A Dead Mac Pointer> is not of the expected type MACPTR.
>>>>>> While executing: CCL::OBJC-SUBCLASS-P
>>>>
>>
>> I think that I found the "Dead Mac Pointer" bug a few minutes ago.
>> I saved an OpenMCL.app on Panther, copied it to a Tiger system, and it
>> ran.
>
> Thanks. I just downloaded the new bleeding-edge OpenMCL and tried the
> Bosco Cocoa example application again, and this time it worked.
Good.
>
> However, there is a problem when I try to load a NIB file using a
> subclass of NSWindowController. It seems that the outlets of my
> window controller object are not initialized correctly. When the NIB
> file is loaded and the window is displayed on the screen, all the
> outlets contain the value #<A Null Mac Pointer>, even though the
> outlets are connected to user interface objects in the NIB file.
>
> I added a small example to Bosco's source code in order to illustrate
> the problem:
>
> http://www.math.uio.no/~romstad/bosco-0.6.1.tar.gz
I probably won't have time to look at this for at least a few days.
If anyone does have time and interest to look into it, the thing that's
probably most worth looking at is whether the ObjC class created by
DEFCLASS has it ObjC instance variables in the right place(s) and with
the right (ObjC) names.
Following that advice: I just looked at the function %MAKE-OBJC-IVARS
(in "ccl:examples;objc-clos.lisp"). The form:
(setq offset
(ash (foreign-direct-slot-definition-offset dslotd) 3))
looks like it should be:
(setq offset
(ash (foreign-direct-slot-definition-offset dslotd) -3))
(the lisp FOREIGN-DIRECT-SLOT-DEFINITION's OFFSET field contains a bit
offset; the ObjC ivar's :objc_ivar.ivar_offset wants a byte offset,
and even though it's about 5:30 AM, I'm pretty sure that you divide by
8 (shift right by 3) rather than multiply to convert a bit offset to a
byte offset.)
More information about the Openmcl-devel
mailing list