How to tell is an "answer file" dialog is up?

Mark Schonewille m.schonewille at economy-x-talk.com
Fri Oct 5 03:52:03 EDT 2007


Richard,

I use the suspend message to disable the menubar before the answer or  
ask dialog shows up. I have modified the ask and answer dialogs to  
send a resume message to the topstack when they close and enable the  
menubar again when the resume message is received. (No modification  
is needed to have the suspend message sent.)

Best regards,

Mark Schonewille

--

Economy-x-Talk Consulting and Software Engineering
http://economy-x-talk.com
http://www.salery.biz

Quickly extract data from your HyperCard stacks with DIFfersifier.  
http://differsifier.economy-x-talk.com


Op 5-okt-2007, om 6:10 heeft Richard Gaskin het volgende geschreven:

> 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
>



More information about the use-livecode mailing list