I'm working through the PragProg Core Data book, and have encountered an issue 
passing contextInfo to NSOpenPanel.beginSheetForDirectory

This issue was discussed on the list previously by Dr. Nic: 
http://www.mail-archive.com/[email protected]/msg00330.html

The problem is that there doesn't seem to be a way to cast an object pointer to 
a void pointer in Macruby, but when openPanel calls the callback assigned in 
didEndSelector it does cast the pointer passed in contextInfo to a void 
pointer, leading to a type error when the callback is called:

{{{
2010-01-08 23:44:49.580 GrokkingRecipesRuby[34059:10b] expected instance of 
Pointer of type `v', got `@'
}}}

I tried assigning my object to a Pointer.new('^v') and Pointer.new(:uchar) but 
this also caused type errors.

is there any workaround for this? 

Cheerio,

Michael Johnston
[email protected]




_______________________________________________
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

Reply via email to