Re: Handling a menu item in a modal dialog


James Walker
 

On 8/13/18 6:00 PM, Andy Lee via Groups.Io wrote:
On Aug 13, 2018, at 8:06 PM, James Walker <list2@...> wrote:
It's not a sheet, just a window being operated with -[NSApplication runModalForWindow:].
I forget the tweak to do this -- I think it has something to do with using your own run loop.

I'm pretty sure I've done what you describe.  If I can find how I'll post it here, but maybe the run loop hint will help you find it.

Interesting.  The window does have a little red close button, and once the dialog is closed one can quit normally, so maybe I should just live without it rather than using a custom run loop.

By the way, there are other menu items, implemented in the app delegate, that are enabled while the dialog is running.  Seems like there's something special about the Quit item.  Maybe that's related to the fact that Quit isn't in the menu nib, but gets added magically.

Join cocoa@apple-dev.groups.io to automatically receive all group messages.