Hi Pavlos, You simply pass a Proc object. handler = Proc.new do |result| if result == … ... end oPanel.beginSheetModalForWindow self.window, completionHandler: handler Make sure you installed the latest BridgeSupport preview before, available from http://www.macruby.org/files. Laurent On May 6, 2011, at 5:38 PM, Pavlos Vinieratos wrote:
hello. how can I write this in macruby? [oPanel beginSheetModalForWindow:[self window]
completionHandler:^(NSInteger result) {
if (result == NSFileHandlingPanelOKButton) {
for (NSURL *fileURL in [oPanel URLs]) {
// do something with fileURL
}
}
}];
the second arg is a handler..
thank you
-- Pavlos Vinieratos _______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel