Skip navigation.
 
mlModal dialogs and system edit menu items
FROM : Tim Gogolin
DATE : Mon Jun 05 21:02:05 2006

In my Cocoa based app, The edit menu item "Special Characters..." 
automatically disables when a modal dialog is present.

So I checked a few other Cocoa apps to see if this was normal... Many 
Cocoa apps successfully avoid app-modal dialogs by using sheets 
(which is nice), but Safari uses a modal File Picker dialog when you 
press Cmd-O (File/Open), and reproduces the same behavior (bug?), so 
I'm assuming this is a Cocoa problem.

Some observations (that apply to both my app and Safari's Open Panel):
If I bring up the "Special Characters" floating window before I bring 
up the modal dialog, the Special Characters seems to work fine; I 
haven't tested extensively, but I can select from popup menus, select 
tab controls, double click to insert characters, etc.

The Edit Menu: "Edit/Spelling/Spelling..." is NOT disabled and brings 
up the Spelling palette, which doesn't work at all.

Is the system behaving as expected with regards to disabling the 
"Special Characters" menu item (even though the Special Characters 
floater appears to function correctly?)

I can only assume the Spelling dialog *should* be disabled (contrary 
to current behavior), since it doesn't appear to receive events in 
this state.

Am I supposed to do some NSRunLoop magic in order to get the Special 
Characters item to be enabled while running a modal dialog?

--
Tim Gogolin
Adobe Systems

Related mailsAuthorDate
No related mails found.