Login  Register

Modal Dialogs

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options Options
Embed post
Permalink
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Modal Dialogs

Dr Keith A. Morneau
6 posts
Hello,

I am new to Pharo and I am trying to figure out a way to do modal AlertDialogWindow. The documentation I noticed says - someMorph openModal: aSystemWindow. Well, I can not seem to get the the Alert to be modal to my main window. Is there an easy way to do this?

Thanks,
Keith

_______________________________________________
Pharo-users mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Modal Dialogs

Stan Shepherd
277 posts
Hi Keith, welcome.

Have you tried something like

World world openModal: AlertDialogWindow new

Seems like what you are after.

...Stan

Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Modal Dialogs

Stéphane Ducasse
17193 posts
In reply to this post by Dr Keith A. Morneau
Dear Keith

We know that the documentation is not the one we would like.
Now I will try to explain inn three sentences how you can find the answer to your question now.

- Open the message name tools (in tools) type modal, modal:

- Have a look at implementors of openModal:
- Have a look at senders of openModal:

Morph>>openModal: aSystemWindow
        "Open the given window locking the receiver until it is dismissed.
        Answer the system window.
        Restore the original keyboard focus when closed."


here is an example


MCMergeResolutionRequest>>viewPatchMerger
        "Open a modal diff tools browser to perform the merge."

        |m modalMorph|
        m := (PSMCMergeMorph forMerger: self merger)
                fromDescription: 'Working copy' translated;
                toDescription: messageText.
        modalMorph := (UIManager default respondsTo: #modalMorph)
                ifTrue: [UIManager default modalMorph]
                ifFalse: [World].
        modalMorph openModal: (
                m newWindow
                        title: messageText).
        ^m merged

So there are ways to find information.
Now do not hesitate to ask any question to the list.

Stef

PS: BTW I did not either how to open a model widget. Now I know :)



On Feb 18, 2010, at 11:57 PM, Dr. Keith A. Morneau wrote:

> Hello,
>
> I am new to Pharo and I am trying to figure out a way to do modal AlertDialogWindow. The documentation I noticed says - someMorph openModal: aSystemWindow. Well, I can not seem to get the the Alert to be modal to my main window. Is there an easy way to do this?
>
> Thanks,
> Keith
> _______________________________________________
> Pharo-users mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users


_______________________________________________
Pharo-users mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users