<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Instead of (@class ns-mutable-array), you can just write ns:ns-mutable-array, e.g.,<div><br></div><div><div><div><div>(let* ((my-array (#/arrayWithCapacity: ns:ns-mutable-array 10)))</div><div> (...))</div><div><br></div><div>See also:</div><div><a href="http://clozure.com/pipermail/openmcl-devel/2009-March/009009.html">http://clozure.com/pipermail/openmcl-devel/2009-March/009009.html</a></div><div><br></div><div>This needs to be fixed, obviously, but the @class thing is sort of obsolete usage, so nobody's really taken a look. I will see about updating the example as soon as I can.</div><div><br></div><div><br></div><div>On Apr 27, 2009, at 12:31 PM, Paul Krueger wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">I recently upgraded to: Clozure Common Lisp Version 1.3-r11966M (DarwinPPC32).<div><br></div><div>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:</div><div><br></div><div><pre><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px; white-space: normal;">? (setf *my-dict*
(#/dictionaryWithObject:forKey: (@class ns-mutable-dictionary)
*my-app* #@"NSNibOwner"))</span></font></pre><pre><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px; white-space: normal;">When I do this I get the following:</span></font></pre><pre><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px; white-space: normal;">> Error: Unknown type specifier: (@METACLASS "NSMutableDictionary") </span></font></pre><pre><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px; white-space: normal;">> While executing: %%TYPEP, in process Listener(6).</span></font></pre><pre><span class="Apple-style-span" style="font-family: Helvetica; font-size: 12px; white-space: normal; ">Investigating further I did:</span></pre><pre><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px; white-space: normal;"><pre><pre><font class="Apple-style-span" face="Helvetica"><span class="Apple-style-span" style="white-space: normal;">? (macroexpand-1 '(@class ns-mutable-dictionary)) </span></font></pre><pre><font class="Apple-style-span" face="Helvetica"><span class="Apple-style-span" style="white-space: normal;">(THE (@METACLASS "NSMutableDictionary") (%OBJC-CLASS-CLASSPTR #S(OBJC-CLASS-DESCRIPTOR :NAME "NSMutableDictionary" :CLASSPTR #<OBJC:OBJC-CLASS NS:NS-MUTABLE-DICTIONARY (#xA015289C)>))) </span></font></pre><pre><font class="Apple-style-span" face="Helvetica"><span class="Apple-style-span" style="white-space: normal;">T</span></font></pre><pre><font class="Apple-style-span" face="Helvetica"><span class="Apple-style-span" style="white-space: normal;">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.</span></font></pre><pre><font class="Apple-style-span" face="Helvetica"><span class="Apple-style-span" style="white-space: normal;">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.</span></font></pre><pre><font class="Apple-style-span" face="Helvetica"><span class="Apple-style-span" style="white-space: normal;">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?</span></font></pre><pre><font class="Apple-style-span" face="Helvetica"><span class="Apple-style-span" style="white-space: normal;"><br></span></font></pre><pre><font class="Apple-style-span" face="Helvetica"><span class="Apple-style-span" style="white-space: normal;">Thanks, Paul</span></font></pre></pre></span></font></pre></div></div>_______________________________________________<br>Openmcl-devel mailing list<br><a href="mailto:Openmcl-devel@clozure.com">Openmcl-devel@clozure.com</a><br>http://clozure.com/mailman/listinfo/openmcl-devel<br></blockquote></div><br></div></div></body></html>