Re: Custom sheets without going application modal?
Re: Custom sheets without going application modal?
- Subject: Re: Custom sheets without going application modal?
- From: email@hidden (Simon Fraser)
- Date: Mon, 30 Dec 2002 15:14:35 -0800
Mike Ferris wrote:
I do not think you want to call -runModalForWindow: at all. The
-beginSheet method should be used instead of -runModalForWindow:, not in
addition to. Also, you should call -endSheet: or -endSheet:returnCode:
when the sheet is finished (usually from the action method of an
OK/Cancel button... where you're calling -stopModal now).
The old deprecated API -runModalForWindow: showed the window as a sheet
but put the app into the modal runloop mode and was therefore kind of
half way between a real app-modal panel and a real sheet. The newer
recommended -beginSheet:/-endSheet: API does not put the app into modal
run loop mode and therefore acts like a sheet should.
But what if you want an app-modal sheet, say if you're in
applicationShouldTerminate: and want to ask the user if it's
safe to quit, based on what's going on in one of the windows?
Simon
_______________________________________________
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.