[q] Modal dialogs (not working ?)

Bob Arning arning at charm.net
Sun Sep 7 13:57:55 UTC 2003


On 07 Sep 2003 11:02:02 +0200 Martin Drautzburg <martin.drautzburg at web.de> wrote:
>Bob Arning  <arning at charm.net> writes:
>
>> On 07 Sep 2003 02:14:10 +0200 Martin Drautzburg <martin.drautzburg at web.de> wrote:
>> 
>> >FileList2 modalFileSelector opens a dialog, but I can do all sorts of
>> >other things like  raise a window or open the WorldMenu. I was
>> >thinking that "modal" means that this should not be possible. What am
>> >I missing ?
>> 
>> It means simply that whatever bit of code requested the dialog is suspended until an answer is received from the dialog. Everything else continues as normal.
>
>Okay I understand that the world menu works. But how can I block an
>"application" until the modal dialog has exited ? I mean like
>evenything that is in a SystemWindow.

Some possible answers are...

1. Don't. Ask yourself if you really need to prevent the user from doing these things. Without knowing your application, I cannot tell if this answer could work for you.

2. Define an application. If the various UI elements know what application they belong to, then it may be possible for the application to notify them when it is ok/not ok to do certain things.

3. Block everything. When you want a dialog to be truly modal, open a world-sized transparent morph beneath it and arrange for the transparent morph to consume all mouse clicks and key presses outside the dialog.

Cheers,
Bob



More information about the Squeak-dev mailing list