[MacRuby-devel] Out parameters with MacRuby
Alex Vollmer
alex.vollmer at gmail.com
Sun Apr 26 20:50:17 PDT 2009
On Apr 26, 2009, at Apr 26, 7:14 PM, Laurent Sansonetti wrote:
> http://developer.apple.com/documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtTypeEncodings.html
>
> In the case of a C structure, you can call the #type class method on
> the struct class.
>
> $ macirb
> irb(main):001:0> framework 'Foundation'
> => true
> irb(main):003:0> NSRect.type
> => "{CGRect={CGPoint=dd}{CGSize=dd}}"
>
> The next version of MacRuby will have a better Pointer class which
> will accept symbols like :int, :object, etc., but in the meantime
> you need to pass the Objective-C types.
>
> HTH,
> Laurent
Thanks! That clarifies a bunch.
--Alex
----
Musings & Notes — http://alexvollmer.com
Track what you lend and borrow — http://moochbot.com
More information about the MacRuby-devel
mailing list