Hi Yehuda,
Laurent kindly responded to a similar query from me :
His reply (Novemebr 24th):
In order to use these methods I introduced in trunk a class named
Pointer. You allocate a Pointer object by using the #new_with_type
method in which you pass the Objective-C type encoding. @ is for
pointers, i for integers, d for doubles, etc...
# This is not very intuitive, I will implement the RubyCocoa way to
deal with pointers as well.
You use it like that:
errorp = Pointer.new_with_type('@')
urlData = NSURLConnection.sendSynchronousRequest(urlRequest,
returningResponse:response, error:errorp)
if urlData.nil?
error = errorp[0]
puts "error: #{error.description}"
end
With trunk of last week it worked fine for me with:
errorp = Pointer.new_with_type('@')
response = Pointer.new_with_type("@")
urlData = NSURLConnection.sendSynchronousRequest(urlRequest,
returningResponse:response, error:errorp)
Hope that helps,
cheers,
J
On Dec 1, 2008, at 8:30 , Yehuda Katz wrote:
I'm trying to figure out a way to make an NSError** object that is a
required parameter to the PSFeed#refresh: method. What's the correct
mechanism?
--
Yehuda Katz
Developer | Engine Yard
(ph) 718.877.1325
_______________________________________________
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel