27 Apr
2009
27 Apr
'09
3:50 a.m.
On Apr 26, 2009, at Apr 26, 7:14 PM, Laurent Sansonetti wrote:
http://developer.apple.com/documentation/Cocoa/Conceptual/ObjCRuntimeGuide/A...
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