How to tell is an "answer file" dialog is up?
Richard Gaskin
ambassador at fourthworld.com
Fri Oct 5 00:10:27 EDT 2007
Michael Binder wrote:
>> In one of my apps I'm taking advantage of Rev 2.8.1's improved menu
>> updating to revise how I handle menu enabling and disabling.
>>
>> It's all working swell, with one exception: What do I do when a file
>> selection dialog is up, such as with "answer file" and "ask file"?
>
> This is a problem I have encountered also. By the way... why do we
> even need to deal with this? In most (all?) apps on the Mac, when a
> modal is up the menus are all disabled. I assume this is a HIG thing.
> I always thought that the definition of a modal was that nothing could
> be done except deal with the modal. In rev, modals are not literally
> modals if the menus are still available.
Sheets and modals differ, with sheets keeping some things like the
Window and Help menus available, along with the New and Open items in
the File since those don't affect the document. And of course "ask
file" needs to leave at least the first few items of the Edit menu
available to support Undo, Cut, Copy, Paste, and Select All for the file
name.
Modals generally do lock up the whole menubar, and interestingly Rev
does that automatically when you use "ask file" or "answer file". I
wonder if we should submit a request to have menu disabling be automatic
for modals.
That said, I just noticed that Apple's TextEdit keeps some items
available when using the fully modal getfile dialog, such as Help and
Show Fonts. Help isn't a problem since it opens another app, but Show
Fonts is kinda weird, opening under the dialog yet it can still be
interacted with. Bug? Design decision? Hard to say.
Maybe this is why Rev doesn't handle the disabling automatically,
leaving it up to the developer to determine if an items may still be
useful in a modal situation.
Writing the disabling stuff was the easy part. Harder is to determine
when a system dialog is sheeted over a document window. For the moment
I put in a kludgy workaround, but I wonder if perhaps what's needed is a
new stack property in the engine so we can know if a window is available
of full of sheet.
--
Richard Gaskin
Fourth World Media Corporation
___________________________________________________________
Ambassador at FourthWorld.com http://www.FourthWorld.com
More information about the use-livecode
mailing list