[info-mcl] Strings in CCL
R. Matthew Emerson
rme at clozure.com
Mon Oct 5 12:43:06 CDT 2009
On Oct 5, 2009, at 8:29 AM, Keith L. Downing wrote:
> Whereas the old version seemed ok with strings being passed to cocoa
> methods (or at least it did display them), I'm now getting error
> messages to the effect that
> a MACPTR is expected instead of a string.
> Does anyone have a simple piece of code that I can wrap around all
> strings to create MACPTRs? I had trouble finding a good example in
> the CCL documentation. Should
> I be using make-cstring (which my Listener doesn't seem to
> recognize :) ).
(ccl::with-autoreleased-nsstrings ((s1 "foo") (s2 "bar"))
;; your code here...
(#/arrayWithObjects: ns:ns-array s1 s2 +null-ptr+))
(not sure if that's in 1.3, but it's in the trunk and will be in 1.4)
More information about the info-mcl