[Openmcl-devel] Specifying data types for calls via the Obj-C bridge with a variable number of arguments
pbpublist at comcast.net
Sat Apr 28 16:19:25 EDT 2007
OK, got it. Thanks for the explanation.
On Apr 28, 2007, at 2:37 AM, Gary Byers wrote:
> On Sat, 28 Apr 2007, Phil wrote:
>> Ah... thanks! Am I correct in assuming you meant (objc:send
>> (objc:@class "NSString") :string-with-format #@"Testing: %@" (:id
>> "one two three four")) as an example of using a Lisp string?
>> (i.e. it appears to work but seems a little weird as %@ is used in
>> the format string.)
> No, I meant to say (:id #@"one two three four").
> SEND does some coercion of lisp strings to NSStrings, but I'm not
> sure that it does so in the case of non-fixed arguments, and I'm not
> sure that it's a good idea (who releases that consed-up NSString and
> when does this happen ? In the case of a string constant, does
> the ability to sometimes skip the #@ buy you much in terms of
> readability ?)
> "%@" in an ObjC format string basically means "use the printable
> representation of the next arg, which should be an ObjC object."
> #@"one, two, three, four" is an ObjC object ...
More information about the Openmcl-devel