Sheets overstaying their welcome
Sheets overstaying their welcome
- Subject: Sheets overstaying their welcome
- From: John Lombardo <email@hidden>
- Date: Thu, 16 Oct 2003 10:48:43 +0800
Has anyone encountered the issue of a sheet not automatically retracting
after doing the whole stopModal/endSheet/orderOut routine. Instead, the user
has to interact in some way with the GUI before the sheet retracts. After
some debugging, I've found this happens:
- (void)beginQuerySheet
{
/* ... stuff ... */
[NSApp runModalForWindow:[queryView querySheet]];
// I know that [NSApp stopModal] is being called in another function...
// But this is where we sit until the user clicks something.
[NSApp endSheet:[queryView querySheet]];
[[queryView querySheet] orderOut:self];
}
I've tried forcing the window to close directly after the stopModal message,
but even though that enables the controls on the main window, the
Close/Minimize/Zoom buttons are disabled.
I'm guessing there's some stuff about modal states that I don't know about.
Cheers,
john
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.