[Openmcl-devel] Carbon FFI: How can I debug this?
David Steuber
david at david-steuber.com
Wed Dec 29 10:43:26 PST 2004
On Dec 29, 2004, at 9:53 AM, Takehiko Abe wrote:
> David Steuber wrote:
>
>> If I have a MACPTR that holds a CFStringRef, how can I get a MACPTR
>> that holds the CFStringRef* that points to it?
>
> (rlet ((ptr :pointer))
> (%put-ptr ptr macptr-for-cfstring)
> ...)
>
> or
>
> (rlet ((ptr :pointer macptr-for-cfstring)) ...)
This put me on the right track:
(with-cfstring (text (format nil "~,2F" travel-time))
(rlet ((&text (:* :<cfs>tring<r>ef) text))
(#_SetControlData (ccl::%get-ptr travel-time-field)
#$kControlEntireControl #$kControlEditTextCFStringTag
(ccl::%foreign-type-or-record-size
:<cfs>tring<r>ef :bytes) &text)))
works!!!!!
Thank you! You made my whole day.
More information about the Openmcl-devel
mailing list