[Openmcl-devel] Sending Variable-Arity Cocoa Messages

markus64 at gmx.ch markus64 at gmx.ch
Wed Mar 2 10:17:32 PST 2005

Hi. I'm trying to send variable-arity Cocoa messages using OpenMCL 
0.14.2-p1 on OS X, but I just don't seem to succeed. I did read section 
10.3.3 of the manual, and the stringWithFormat example does work, but I 
can't seem to get anything else to work :-)

How would I, for example, create a NSArray using +arrayWithObjects? 
(ccl::send (find-class 'ns:ns-array) :objects (:double-float foo 
:double-float bar)) gives me "Undefined function :DOUBLE-FLOAT" errors. 
Using (DEFINE-VARIABLE-ARITY-MESSAGE "arrayWithObjects:") didn't help 
either (same error), although I would think that shouldn't be necessary 
anyway, since the manual claims that "The standard variable arity 
messages in Cocoa are predeclared by the bridge".

I have the same problem when trying to send other variable-arity 
messages from OpenMCL, e.g. NSDictionary's 
+dictionaryWithObjectsAndKeys. How am I supposed to do this?

Any help is appreciated,

Regards, Markus

More information about the Openmcl-devel mailing list