[Openmcl-devel] how to access non NS classes

Gary Byers gb at clozure.com
Sat Oct 31 00:34:41 PDT 2009


Some frameworks (Apple calls them "umbrella frameworks") contain
several related subframeworks; loading the parent is supposed to
initialize all of the children (and their dependencies) correctly, 
so I believe that you generally want to do:

(objc:load-framework "Quartz" :quartz)

On a 64-bit CCL, that'll define the IKImagePicker class (the name
translation rules will call it NS:I-K-IMAGE-PICKER ...) and other
classes that're declared in the interfaces and defined in the framework's

It's a long story, but we're still distributing Tiger interfaces for
32-bit platforms, so doing the OBJC:LOAD-FRAMEWORK call above in a 32-bit
CCL  won't find declarations for things introduced in 10.5

On Fri, 30 Oct 2009, Alexander Repenning wrote:

> There is a really handy class to get images from the build in camera
> called IKPictureTaker class
> http://developer.apple.com/mac/library/documentation/GraphicsImaging/Reference/IKImagePicker_Class/IKImagePicker_Reference.html#//apple_ref/doc/uid/TP40004670-CH3-743333
> I cannot access it.
> (eval-when (:compile-toplevel :load-toplevel :execute)
>   (ccl:use-interface-dir :quartz)
>   (open-shared-library "/System/Library/Frameworks/Quartz.framework/
> Versions/A/Frameworks/ImageKit.framework/ImageKit"))
> seems to find something
> but
> ns::IK-Picture-Taker , i.e., the class, is not bound
> ImageKit is part of Quartz which is part of the x86 headers. Could
> this be a version problem? IKPictureTaker is available in Mac OS X
> v10.5 and later. Strangely, the methods of IKImagePicker are
> available, e.g., (#/
> popUpRecentsMenuForView:withDelegate:didEndSelector:contextInfo:  ...)
> I am guessing I just doing something silly when trying to access the
> class but what?
> Alex
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/mailman/listinfo/openmcl-devel

More information about the Openmcl-devel mailing list