2
- (BOOL)applicationShouldHandleReopen:(NSApplication *)theApplication hasVisibleWindows:     (BOOL)flag
{
[self showWindow:self];
return YES;
}

how to convert this method to MacRuby ?

I tried

def applicationShouldHandleReopen(the_application, k)   
    @window.makeKeyAndOrderFront
end

but not works

xhan
  • 6,057
  • 4
  • 33
  • 47
fake name
  • 47
  • 7

1 Answers1

2

You need to use the selector syntax for the 2nd argument, e.g.:

def applicationShouldHandleReopen(the_application, hasVisibleWindows:k)
    ...
end

See http://www.macruby.org/documentation/tutorial.html for more on this exact topic.

jkh
  • 3,246
  • 16
  • 13