[Openmcl-devel] Re: Status of Cocoa under Tiger?

Tord Kallqvist Romstad romstad at math.uio.no
Sat May 14 03:44:39 PDT 2005

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.

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:


The system definition file is bosco/my-example.asd, the source code is
in bosco/examples/my-example/my-example.lisp, and the NIB file is

In order to build the program, type the following:

./build.sh -p 4005 -f cocoa -c MY-APPLICATION -b ./bin/my-application.app -a Foo -s ./my-application.asd

Start the program, use SLIME to connect to the running Lisp process,
and type the following:

CL-USER> (in-package :ccl)
#<Package "CCL">
CCL> (setf *wc* (create-window))
#<MY-WINDOW-CONTROLLER <MyWindowController: 0x2821600> (#x2821600)>

A window with a push button and a text field is displayed.  If you
inspect the Foo.nib file and the Lisp code in my-example.lisp, you
will see that the slot TEXT-FIELD in the MY-WINDOW-CONTROLLER object
*WC* is supposed to point to the text field in the window.
Unfortunately, it doesn't:

CCL> (text-field *wc*)
#<A Null Mac Pointer>

Tord Romstad

More information about the Openmcl-devel mailing list