Hi Linan,

This is currently not implemented. It is not planned for the upcoming release mostly because I don't think it's that important, since all block methods in Cocoa also have methods dealing with function pointers, which will be supported.

If you have any need for such a feature we can tentatively implement it for the release.

Laurent

On Sep 15, 2009, at 4:28 PM, Linan Wang wrote:

Hi,
I'm playing with the new block syntax of objc recently. I tried to call a ruby block from an objc block-ish methods but failed. The code snippet:

@implementation BlockTest
...
-(void)testBlock:(void^(int i))block
{
  block(self.x);
}
...
@end;

MacRuby codes:

b.testBlock do |x|
 puts x
end

Anything wrong with my codes? or it's not supported yet? (if so, any plan to do it?)

Best wishes
Linan
_______________________________________________
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

Reply via email to