Re: How to enable the close window button while showing a modal sheet?
Re: How to enable the close window button while showing a modal sheet?
- Subject: Re: How to enable the close window button while showing a modal sheet?
- From: Jim McGowan <email@hidden>
- Date: Thu, 10 Jan 2013 18:46:11 +0800
Doc link is here:
https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/ApplicationKit/Classes/NSApplication_Class/Reference/Reference.html
The quote is from the Discussion section of the beginSheet:modalForWindow:modalDelegate:didEndSelector:contextInfo: method of NSApplication.
Jim
On 10 Jan, 2013, at 18:38 , Uli Kusterer <email@hidden> wrote:
> On Jan 10, 2013, at 2:25 AM, Jim McGowan <email@hidden> wrote:
>> On 9 Jan, 2013, at 6:11, Oleg Krupnov <email@hidden> wrote:
>>> I don't want to start a HIG flame on this, but just want to know if
>>> it's technically possible to enable the close button of a window while
>>> showing a modal sheet (NSApp beginSheet:modalForWindow:…) on it?
>>
>> The answer is in the documentation for that method:
>> "While the application is in the run loop, it does not respond to any other events (including mouse, keyboard, or window-close events) unless they are associated with the sheet."
>
> I'd file a bug against that documentation (link?). Because the zoom and minimize boxes certainly still work, the path popup when command-clicking the window title too, as does resizing a window using the grow box or the window edges, depending on which MacOS version you're running under.
>
> Try it: Open an RTF file in TextEdit, choose "Make Plain Text" from the "Format" menu, then try what you can do to the window.
>
> That said, I doubt there's any supported (not to mention documented) way to make the close box work while a sheet is up. If someone finds out, I'd love to know how I can do that. I have a custom window where I'd want to achieve standard behaviour by making my (fake) zoom and minimize boxes work while a sheet is up.
>
> Cheers,
> -- Uli Kusterer
> "The Witnesses of TeachText are everywhere..."
> http://www.zathras.de
>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden