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

[MacRuby-devel] experimental branch: status update

2009-04-26 Thread Laurent Sansonetti
A status update on the recent progresses on the experimental branch! Last week did not see a status update, mea culpa. - A new C/Objective-C dispatcher has been written. The idea is to use LLVM to compile stubs instead of using libffi. The previous libffi- based implementation is no longer u

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

[MacRuby-devel] Out parameters with MacRuby

2009-04-26 Thread Alex Vollmer
Is it possible to use "out" parameters with MacRuby, such as NSError? In my particular case I'd like to capture errors that result from parsing XML with NSXMLDocument using the initWithData:options:error: method. I tried (naively) just instantiating an NSError instance and handing it to tha