[Openmcl-devel] @metaclass type definition
Paul Krueger
plkrueger at comcast.net
Mon Apr 27 09:31:52 PDT 2009
I recently upgraded to: Clozure Common Lisp Version 1.3-r11966M
(DarwinPPC32).
I'm trying to run through the NIB loading examples as described in the
file: ".../ccl/examples/cocoa/nib-loading/HOWTO.html". I did NOT try
these on any previous release. Part of one of the examples does the
following while in the ccl package:
? (setf *my-dict* (#/dictionaryWithObject:forKey: (@class ns-mutable-
dictionary) *my-app* #@"NSNibOwner"))
When I do this I get the following:
> Error: Unknown type specifier: (@METACLASS "NSMutableDictionary")
> While executing: %%TYPEP, in process Listener(6).
Investigating further I did:
? (macroexpand-1 '(@class ns-mutable-dictionary))
(THE (@METACLASS "NSMutableDictionary") (%OBJC-CLASS-CLASSPTR #S(OBJC-
CLASS-DESCRIPTOR :NAME "NSMutableDictionary" :CLASSPTR #<OBJC:OBJC-
CLASS NS:NS-MUTABLE-DICTIONARY (#xA015289C)>)))
T
So clearly the class was found and it's the @METACLASS type assertion
that is causing the problem (just as the first error message said). I
just bypassed the type declaration and got the example to work just
fine.
The @class macro seems to be used in several places, so I hunted all
over to see if I could discover how (@metaclass ...) should have been
turned into a valid type specifier, but couldn't find it. The closest
I came was the function "get-objc-class-from-declaration" which as
near as I can tell is only called in one place that didn't seem to be
relevant to all the different ways that @class is used, but maybe I
missed something there.
Can anyone clarify for me whether the example should have worked as
written and if so what might be wrong? How does the @class macro
defined in objc-runtime.lisp ever work?
Thanks, Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clozure.com/pipermail/openmcl-devel/attachments/20090427/9d8dc594/attachment.htm>
More information about the Openmcl-devel
mailing list