Re: NSBeginAlertSheet not waiting for button to be pushed
"Adam R. Maxwell" <[email protected]>
| Newsgroups | gmane.comp.macosx.devel |
|---|---|
| Message-ID | <[email protected]> |
On Feb 7, 2010, at 3:29 PM, Chad Leigh -- ObjectWerks Inc wrote: > > On Feb 7, 2010, at 4:01 PM, Christiaan Hofman wrote: > >> >> >> Again, if that function does not have the window context, it should not use a sheet but a panel. > > Again, in this case, it does not matter since there is only ever one window and there is no way for a system window to get popped up or any other window or panel. This is not the problem why the routine is falling through. Not that it helps much, but I was able to display a sheet with NSBeginAlertSheet on utility windows in an app I wrote, back about the time you wrote yours. I just added a didEndSelector argument to it, and it was called after dismissing the sheet. Are you sure yours isn't being called? As Christiaan just pointed out, NSBeginAlertSheet will return immediately, and your callbacks will only be invoked after the sheet is dismissed. Sheets only block input to a single window, so that function has to return immediately.