|
From: Jonathan P. <jp...@dc...> - 2006-02-07 22:25:09
|
On 7 Feb 2006, at 19:49, Yvon Thoraval wrote: > something strange : i'm able to open and close a sheet but after > having closed it i've no more acces to the mainWindow buttons even > the main menu quit... > > here is the way i open it : > > def prefsSheetOpen(sender) > OSX::NSApp > ().beginSheet_modalForWindow_modalDelegate_didEndSelector_contextInfo( > @prefsSheet, @mainWindow, self, nil, nil) > OSX::NSApp().runModalForWindow(@prefsSheet) > end Don't call 'runModalForWindow' and it should work. A sheet implicitly grabs focus from the window it is a sheet for. Other windows in the application continue to respond. 'runModalForWindow' grabs focus from all windows in the application to the chosen one (and is rarely needed), and can only be stopped using stopModal and friends (see the documentation). Hope that helps, Jonathan |