Re: [MacRuby-devel] Out parameters with MacRuby

2009-04-27 Thread Laurent Sansonetti
On Apr 27, 2009, at 2:23 PM, Brian Marick wrote: On Apr 26, 2009, at 12:09 PM, rebotfc wrote: errorp = Pointer.new_with_type("@") result = NSXMLDocument.alloc.initWithData(data, options:NSXMLDocumentValidate, error:errorp) # access error errorp[0] So the RubyCocoa style of having by-ref

Re: [MacRuby-devel] Out parameters with MacRuby

2009-04-27 Thread Brian Marick
On Apr 26, 2009, at 12:09 PM, rebotfc wrote: errorp = Pointer.new_with_type("@") result = NSXMLDocument.alloc.initWithData(data, options:NSXMLDocumentValidate, error:errorp) # access error errorp[0] So the RubyCocoa style of having by-reference arguments returned as extra return values

Re: [MacRuby-devel] Out parameters with MacRuby

2009-04-26 Thread Alex Vollmer
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> framewor

Re: [MacRuby-devel] Out parameters with MacRuby

2009-04-26 Thread Laurent Sansonetti
Hi Alex, On Apr 26, 2009, at 6:20 PM, Alex Vollmer wrote: On Apr 26, 2009, at Apr 26, 10:09 AM, rebotfc wrote: errorp = Pointer.new_with_type("@") result = NSXMLDocument.alloc.initWithData(data, options:NSXMLDocumentValidate, error:errorp) # access error errorp[0] Ah cool. Thanks for t

Re: [MacRuby-devel] Out parameters with MacRuby

2009-04-26 Thread Alex Vollmer
On Apr 26, 2009, at Apr 26, 10:09 AM, rebotfc wrote: errorp = Pointer.new_with_type("@") result = NSXMLDocument.alloc.initWithData(data, options:NSXMLDocumentValidate, error:errorp) # access error errorp[0] Ah cool. Thanks for the response. Is there any documentation on the possible val

Re: [MacRuby-devel] Out parameters with MacRuby

2009-04-26 Thread rebotfc
errorp = Pointer.new_with_type("@") result = NSXMLDocument.alloc.initWithData(data, options:NSXMLDocumentValidate, error:errorp) # access error errorp[0] On 26 Apr 2009, at 16:36, Alex Vollmer wrote: Is it possible to use "out" parameters with MacRuby, such as NSError? In my particular c