[Openmcl-devel] Application bundles and the interface database

Gary Byers gb at clozure.com
Thu Oct 27 22:40:09 UTC 2005



On Thu, 27 Oct 2005, Tord Kallqvist Romstad wrote:

> Gary Byers <gb at clozure.com> writes:
>
>> So, if you can use the CCLDefaultDirectory/RESET-CCL-DIRECTORY
>> mechanism, you could (for instance) install darwin-headers/cocoa/*.cdb
>> in YourApp.app/Contents/Resources/, set the "CCLDefaultDirectory"
>> key in the Info.plist file to "Contents/Resources/", and (knock wood)
>> that should enable the lisp to find the .cdb files.
>
> Thanks!  I had some success doing this.  At least the application now
> crashes slightly later during the initialisation process.  Immediately
> after startup, it loads several .dfsl files.  It crashes during my
> first Objective-C class definition:
>
> (defclass application-controller (ns:ns-object)
>  ()
>  (:metaclass ns:+ns-object))
>
> While trying to load this top-level form, I get:
>
>> Error: Class #<A Mac Pointer #xA28816FC> isn't recognized.
>> While executing: CANONICALIZE-REGISTERED-METACLASS

A function called CCL::REVIVE-OBJC-CLASSES - defined in "ccl:examples;
objc-runtime.lisp" - is supposed to run whenever a saved image is
started, by virtue of being on the list CCL::*LISP-SYSTEM-POINTER-FUNCTIONS*.

Can you tell if it's there before the image is saved ?

If it runs at startup time - and if the ObjC class hierarchy had been
examined before the image was saved - I'm not sure how that error
could occur.

Can you print the value of (FIND-CLASS 'NS:+NS-OBJECT) earlier in
the .dfsl file (before the class definition ?)





More information about the Openmcl-devel mailing list