[Openmcl-devel] iSight code?
R. Matthew Emerson
rme at clozure.com
Sun Jan 27 19:26:12 PST 2008
On Jan 27, 2008, at 7:35 PM, Ron Garret wrote:
> On Jan 27, 2008, at 4:20 PM, Ron Garret wrote:
>> The problem I'm having right now is trying to figure out how to
>> classes that aren't loaded into the Cocoa app by default (like
>> QCView). I've built and loaded the :quartz interface directory, but
>> the analog of (make-instance 'ns:ns-view) still doesn't work. I'm
>> digging through the sources to try to figure out how ns:ns-view gets
>> set up to try to do something analogous for qc:qc-view.
> Hm, I really would have expected this work, but it doesn't:
> ? (use-interface-dir :quartz)
> #<INTERFACE-DIR :QUARTZ #P"quartz/" #x300041B793AD>
> ? (ccl::use-interface-dir :quartzcore)
> #<INTERFACE-DIR :QUARTZCORE #P"quartzcore/" #x300041B832AD>
> ? (ccl::make-objc-instance "QCView")
>> Error: ObjC class QCView not found
>> While executing: CCL::LOOKUP-OBJC-CLASS, in process Listener(93).
>> Type :POP to abort, :R for a list of available restarts.
>> Type :? for other options.
You need to load the appropriate shared libraries, too.
? (objc:load-framework "Quartz" :quartz)
? (make-instance 'ns:q-c-view)
#<Q-C-VIEW <QCView: 0x1845e1e0> (#x1845E1E0)>
OBJC:LOAD-FRAMEWORK is mentioned in the release notes.
The Objective-C bridge consults a built-in list of special words that
when it's deciding what the lispy name of an Objective-C class should
be. At the moment, it doesn't know about the QC prefix, so the lispy
name ends up being "q-c-view".
See ccl:objc-bridge;name-translation.lisp for the current list of
special words. I suppose we should consider adding "QT", "QC", and
"CA" at least.
More information about the Openmcl-devel