how to bring up a modal window?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

how to bring up a modal window?

Ralph Boland
I need to create a modal window to which I will add a number of
additional morphs.
I did in an old project (Squeak 3.11 I think) that used classes
MorphicDialogModel and MorphicMessageBox among others and so tried to
port them to my Squeak 5.3 image.
But these didn't seem to work.

Perhaps I can track down the difficulties in getting these classes to work
but perhaps the best thing for me to do is to not use them and create
my modal morphs in the appropriate way for  Squeak 5.3.

But I don't know the right way to create a modal window using Squeak 5.3.

Can someone inform me?

Hopefully this is an easy question.

Pointing me in the direction as to what/where I should read the right
documentation
would also be very helpful.

Any help much appreciated.

Ralph Boland
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: how to bring up a modal window?

marcel.taeumel
Hi Ralph! :-)

You could try to customize DialogWindow. That dialog's center piece can hold any kind of morph composition. Take a look at FileSaveDialog and its #buildWith: methods to learn how it works. (It's ToolBuilder territory. :-)

If you want to go more basic and implement your own "window morph", I suggest using the HandMorph's #mouseFocus via #newMouseFocus:. From there, you can handle all unser interaction within our without that window's bounds. Here are some more code pointers to look at for this:

- Senders of #newMouseFocus:, filtered after "DialogWindow" or "MenuMorph"
- The implementor DialogWindow >> #processFocusEvent:using:.
- The implementor MenuMorph >> #processFocusEvent:using:.

So, in terms of "modality" Squeak's dialog windows and pop-up menus provide that kind of affordance to its users. BUT dialog windows might be what you are looking for because you have more control over the control flow via DialogWindow >> #getUserResponse, which only returns after the user finished that interaction.

Best,
Marcel

Am 05.04.2020 01:11:43 schrieb Ralph Boland <[hidden email]>:

I need to create a modal window to which I will add a number of
additional morphs.
I did in an old project (Squeak 3.11 I think) that used classes
MorphicDialogModel and MorphicMessageBox among others and so tried to
port them to my Squeak 5.3 image.
But these didn't seem to work.

Perhaps I can track down the difficulties in getting these classes to work
but perhaps the best thing for me to do is to not use them and create
my modal morphs in the appropriate way for Squeak 5.3.

But I don't know the right way to create a modal window using Squeak 5.3.

Can someone inform me?

Hopefully this is an easy question.

Pointing me in the direction as to what/where I should read the right
documentation
would also be very helpful.

Any help much appreciated.

Ralph Boland
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners