modal windows in VW

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

modal windows in VW

david.long
Hello everyone,

I would like to know how to open a Window in VisualWorks and make it modal?

Any suggestions?

thanks,

David

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: modal windows in VW

Karsten Kusche
Hi David,

just make your application model a subclass of SimpleDialog. 
Add an accept and cancel button to it and you should be done. When you open it, you'll have a modal dialog. 

Kind regards
Karsten

--
Karsten Kusche - Dipl. Inf. - [hidden email]
Georg Heeg eK - Köthen
Handelsregister: Amtsgericht Dortmund A 12812

Am Donnerstag, 27. September 2012 um 02:02 schrieb [hidden email]:

Hello everyone,

I would like to know how to open a Window in VisualWorks and make it modal?

Any suggestions?

thanks,

David

_______________________________________________
vwnc mailing list
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: modal windows in VW

Nowak, Helge
In reply to this post by david.long
Look at SimpleDialog

HTH
Helge

-----Ursprüngliche Nachricht-----
Von: [hidden email] [mailto:[hidden email]] Im Auftrag von [hidden email]
Gesendet: Donnerstag, 27. September 2012 02:03
An: [hidden email]
Betreff: [vwnc] modal windows in VW

Hello everyone,

I would like to know how to open a Window in VisualWorks and make it modal?

Any suggestions?

thanks,

David

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: modal windows in VW

andre
In reply to this post by Karsten Kusche

On 27.09.2012, at 09:13, Karsten Kusche wrote:

> just make your application model a subclass of SimpleDialog.
> Add an accept and cancel button to it and you should be done. When you open it, you'll have a modal dialog.

This is not always desirable. I for one would need to open any ApplicationModel with modal status when needed. It is something I never really figured out how to do. If anyone knows, please share your wisdom.

Nowadays modal interaction should be embedded into the main application window anyway. The single-window design is increasingly getting popular for a reason.

Andre



_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: modal windows in VW

Steven Kelly
At its most general, you can open your normal ApplicationModel as a
dialog like this:

MyAppModel class>>openAsDialog
        | appModel |
        appModel := self new.
        appModel openDialogInterface: #windowSpec.

MyAppModel>>openDialogInterface: aSymbol

        | theDialog result |
        theDialog := SimpleDialog new.
        theDialog
                preBuildBlock: [:sd :bldr |
                        self builder: bldr.
                        self preBuildWith: bldr];
                postBuildBlock: [:sd :bldr |
                        self postBuildWith: bldr];
                postOpenBlock: [:sd :bldr |
                        self postOpenWith: bldr].
        result := theDialog openFor: self interface: aSymbol.
        self noticeOfWindowClose: self builder window.
        ^result

Steve

> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]] On
> Behalf Of andre
> Sent: 27. syyskuuta 2012 15:06
> To: Karsten Kusche
> Cc: [hidden email]; [hidden email]
> Subject: Re: [vwnc] modal windows in VW
>
>
> On 27.09.2012, at 09:13, Karsten Kusche wrote:
>
> > just make your application model a subclass of SimpleDialog.
> > Add an accept and cancel button to it and you should be done. When
> you open it, you'll have a modal dialog.
>
> This is not always desirable. I for one would need to open any
> ApplicationModel with modal status when needed. It is something I
never
> really figured out how to do. If anyone knows, please share your
wisdom.
>
> Nowadays modal interaction should be embedded into the main
application
> window anyway. The single-window design is increasingly getting
popular

> for a reason.
>
> Andre
>
>
>
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: modal windows in VW

andre
On 27.09.2012, at 14:40, Steven Kelly wrote:

> At its most general, you can open your normal ApplicationModel as a
> dialog like this: [...]

Wow. Great! Thanks for this invaluable tip, Steve. I must have missed this completely, or VisualWorks documentation is lacking it.

Andre


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: modal windows in VW

askoh
Administrator
In reply to this post by Steven Kelly
I would like to make a dialog window modal to a parent window only and not block other windows from user interactions.

Thanks,
Aik-Siong Koh
Reply | Threaded
Open this post in threaded view
|

Re: modal windows in VW

askoh
Administrator
I decided to look into the doc VW7.9 GUIDevGuide.pdf to see what it has to say about modal windows. Apparently, since 7.1, modal windows specific to an application were implemented in VW.

Page 3-6 says:
Prior to 7.1, each window stored a queue of events sent to it, and
processing of events was directed by a single instance of
ControlManager, named ScheduledControllers. Accordingly, there was
only a single UI process, the one run by ScheduledControllers. To allow
for multiple UI processes, this mechanism was changed in 7.1.
Each window now has a WindowManager that holds an event queue,
representing a single UI process. Each WindowManager can manage
the events for one or more windows. Usually, only closely related
windows, such as windows in master/slave relation, or windows and
dialogs they raise, share a manager. Note that a dialog blocks only
the those windows sharing its window manager.
Reply | Threaded
Open this post in threaded view
|

Re: modal windows in VW

Terry Raymond
This is not quite accurate. It is correct for the smalltalk code but not the
VM.
We have been waiting for over 10 years for the VM to get updated.

Terry

===========================================================
Terry Raymond
Crafted Smalltalk
80 Lazywood Ln.
Tiverton, RI  02878
(401) 624-4517      [hidden email]
===========================================================


> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]] On
> Behalf Of askoh
> Sent: Wednesday, April 03, 2013 9:24 PM
> To: [hidden email]
> Subject: Re: [vwnc] modal windows in VW
>
> I decided to look into the doc VW7.9 GUIDevGuide.pdf to see what it has to
> say about modal windows. Apparently, since 7.1, modal windows specific to
> an application were implemented in VW.
>
> Page 3-6 says:
> Prior to 7.1, each window stored a queue of events sent to it, and
processing
> of events was directed by a single instance of ControlManager, named
> ScheduledControllers. Accordingly, there was only a single UI process, the
> one run by ScheduledControllers. To allow for multiple UI processes, this
> mechanism was changed in 7.1.
> Each window now has a WindowManager that holds an event queue,
> representing a single UI process. Each WindowManager can manage the
> events for one or more windows. Usually, only closely related windows,
such
> as windows in master/slave relation, or windows and dialogs they raise,
> share a manager. Note that a dialog blocks only the those windows sharing
its

> window manager.
>
>
>
> --
> View this message in context: http://forum.world.st/modal-windows-in-VW-
> tp4649197p4679521.html
> Sent from the VisualWorks mailing list archive at Nabble.com.
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc



_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: modal windows in VW

Andres Valloud-6
Terry, I know there are some ARs with keywords that you mention below.
So that I can sort out whether I'm thinking about the same problem, can
you elaborate on what is the inaccuracy and the bits that you see
missing in the VM?

On 4/4/13 5:49 AM, Terry Raymond wrote:

> This is not quite accurate. It is correct for the smalltalk code but not the
> VM.
> We have been waiting for over 10 years for the VM to get updated.
>
> Terry
>
> ===========================================================
> Terry Raymond
> Crafted Smalltalk
> 80 Lazywood Ln.
> Tiverton, RI  02878
> (401) 624-4517      [hidden email]
> ===========================================================
>
>
>> -----Original Message-----
>> From: [hidden email] [mailto:[hidden email]] On
>> Behalf Of askoh
>> Sent: Wednesday, April 03, 2013 9:24 PM
>> To: [hidden email]
>> Subject: Re: [vwnc] modal windows in VW
>>
>> I decided to look into the doc VW7.9 GUIDevGuide.pdf to see what it has to
>> say about modal windows. Apparently, since 7.1, modal windows specific to
>> an application were implemented in VW.
>>
>> Page 3-6 says:
>> Prior to 7.1, each window stored a queue of events sent to it, and
> processing
>> of events was directed by a single instance of ControlManager, named
>> ScheduledControllers. Accordingly, there was only a single UI process, the
>> one run by ScheduledControllers. To allow for multiple UI processes, this
>> mechanism was changed in 7.1.
>> Each window now has a WindowManager that holds an event queue,
>> representing a single UI process. Each WindowManager can manage the
>> events for one or more windows. Usually, only closely related windows,
> such
>> as windows in master/slave relation, or windows and dialogs they raise,
>> share a manager. Note that a dialog blocks only the those windows sharing
> its
>> window manager.
>>
>>
>>
>> --
>> View this message in context: http://forum.world.st/modal-windows-in-VW-
>> tp4649197p4679521.html
>> Sent from the VisualWorks mailing list archive at Nabble.com.
>> _______________________________________________
>> vwnc mailing list
>> [hidden email]
>> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>
>
>
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: modal windows in VW

Steven Kelly
In reply to this post by Terry Raymond
I don't think it's accurate even for the Smalltalk code, since there's only a single global #modalWindowChain, rather than one per WindowManager (or possibly one per set of WindowManagers, which might well be what would actually be wanted).

In any case, I think the modern way to handle the case for which the multiple modalWindowChain part of MultiProcUI was envisaged would be to use multiple VW instances, since that also allows each to have its own core.

Steve

> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]] On
> Behalf Of Terry Raymond
> Sent: Thursday, April 4, 2013 3:50 PM
> To: 'askoh'; [hidden email]
> Subject: Re: [vwnc] modal windows in VW
>
> This is not quite accurate. It is correct for the smalltalk code but
> not the
> VM.
> We have been waiting for over 10 years for the VM to get updated.
>
> Terry
>
> ===========================================================
> Terry Raymond
> Crafted Smalltalk
> 80 Lazywood Ln.
> Tiverton, RI  02878
> (401) 624-4517      [hidden email]
> ===========================================================
>
>
> > -----Original Message-----
> > From: [hidden email] [mailto:[hidden email]] On
> > Behalf Of askoh
> > Sent: Wednesday, April 03, 2013 9:24 PM
> > To: [hidden email]
> > Subject: Re: [vwnc] modal windows in VW
> >
> > I decided to look into the doc VW7.9 GUIDevGuide.pdf to see what it
> has to
> > say about modal windows. Apparently, since 7.1, modal windows
> specific to
> > an application were implemented in VW.
> >
> > Page 3-6 says:
> > Prior to 7.1, each window stored a queue of events sent to it, and
> processing
> > of events was directed by a single instance of ControlManager, named
> > ScheduledControllers. Accordingly, there was only a single UI process,
> the
> > one run by ScheduledControllers. To allow for multiple UI processes,
> this
> > mechanism was changed in 7.1.
> > Each window now has a WindowManager that holds an event queue,
> > representing a single UI process. Each WindowManager can manage the
> > events for one or more windows. Usually, only closely related windows,
> such
> > as windows in master/slave relation, or windows and dialogs they
> raise,
> > share a manager. Note that a dialog blocks only the those windows
> sharing
> its
> > window manager.
> >
> >
> >
> > --
> > View this message in context: http://forum.world.st/modal-windows-in-
> VW-
> > tp4649197p4679521.html
> > Sent from the VisualWorks mailing list archive at Nabble.com.
> > _______________________________________________
> > vwnc mailing list
> > [hidden email]
> > http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>
>
>
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: modal windows in VW

Terry Raymond
The original intent was for one dialog chain per window manager. However,
when
I discovered that the VM would not support multiple dialog chains, as I
recall it
is something to do with the message queue for windows, I had to go with the
global chain.

The multiprocUI was intended to allow multiple applications to act
independently
within one image.

Terry

===========================================================
Terry Raymond
Crafted Smalltalk
80 Lazywood Ln.
Tiverton, RI  02878
(401) 624-4517      [hidden email]
===========================================================


> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]] On
> Behalf Of Steven Kelly
> Sent: Thursday, April 04, 2013 9:02 AM
> To: [hidden email]
> Subject: Re: [vwnc] modal windows in VW
>
> I don't think it's accurate even for the Smalltalk code, since there's
only a
> single global #modalWindowChain, rather than one per WindowManager (or
> possibly one per set of WindowManagers, which might well be what would
> actually be wanted).
>
> In any case, I think the modern way to handle the case for which the
multiple

> modalWindowChain part of MultiProcUI was envisaged would be to use
> multiple VW instances, since that also allows each to have its own core.
>
> Steve
>
> > -----Original Message-----
> > From: [hidden email] [mailto:[hidden email]] On
> > Behalf Of Terry Raymond
> > Sent: Thursday, April 4, 2013 3:50 PM
> > To: 'askoh'; [hidden email]
> > Subject: Re: [vwnc] modal windows in VW
> >
> > This is not quite accurate. It is correct for the smalltalk code but
> > not the VM.
> > We have been waiting for over 10 years for the VM to get updated.
> >
> > Terry
> >
> >
> ==========================================================
> =
> > Terry Raymond
> > Crafted Smalltalk
> > 80 Lazywood Ln.
> > Tiverton, RI  02878
> > (401) 624-4517      [hidden email]
> >
> ==========================================================
> =
> >
> >
> > > -----Original Message-----
> > > From: [hidden email] [mailto:[hidden email]]
> On
> > > Behalf Of askoh
> > > Sent: Wednesday, April 03, 2013 9:24 PM
> > > To: [hidden email]
> > > Subject: Re: [vwnc] modal windows in VW
> > >
> > > I decided to look into the doc VW7.9 GUIDevGuide.pdf to see what it
> > has to
> > > say about modal windows. Apparently, since 7.1, modal windows
> > specific to
> > > an application were implemented in VW.
> > >
> > > Page 3-6 says:
> > > Prior to 7.1, each window stored a queue of events sent to it, and
> > processing
> > > of events was directed by a single instance of ControlManager, named
> > > ScheduledControllers. Accordingly, there was only a single UI
> > > process,
> > the
> > > one run by ScheduledControllers. To allow for multiple UI processes,
> > this
> > > mechanism was changed in 7.1.
> > > Each window now has a WindowManager that holds an event queue,
> > > representing a single UI process. Each WindowManager can manage the
> > > events for one or more windows. Usually, only closely related
> > > windows,
> > such
> > > as windows in master/slave relation, or windows and dialogs they
> > raise,
> > > share a manager. Note that a dialog blocks only the those windows
> > sharing
> > its
> > > window manager.
> > >
> > >
> > >
> > > --
> > > View this message in context:
> > > http://forum.world.st/modal-windows-in-
> > VW-
> > > tp4649197p4679521.html
> > > Sent from the VisualWorks mailing list archive at Nabble.com.
> > > _______________________________________________
> > > vwnc mailing list
> > > [hidden email]
> > > http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
> >
> >
> >
> > _______________________________________________
> > vwnc mailing list
> > [hidden email]
> > http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc



_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: modal windows in VW

askoh
Administrator
In reply to this post by askoh
Thanks for the feedback. So VW cannot have a window modal to a parent window only. It must be modal to the entire image. Right?

How can I create a window that is modal to a parent only? Is it possible? Any advice would be appreciated.

Thanks,
Aik-Siong Koh

Reply | Threaded
Open this post in threaded view
|

Re: modal windows in VW

jarober
Well, it seems to me that if you:

-- make the window a "slave" to the parent (see the doc for master/slave setup)
-- while the slave is open, simply ignore all events headed to the master window (at the controller)

You could get what you want


On Apr 17, 2013, at 10:21 PM, askoh wrote:

> Thanks for the feedback. So VW cannot have a window modal to a parent window
> only. It must be modal to the entire image. Right?
>
> How can I create a window that is modal to a parent only? Is it possible?
> Any advice would be appreciated.
>
> Thanks,
> Aik-Siong Koh
>
>
>
>
>
> --
> View this message in context: http://forum.world.st/modal-windows-in-VW-tp4649197p4682226.html
> Sent from the VisualWorks mailing list archive at Nabble.com.
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

James Robertson
http://www.jarober.com
[hidden email]




_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: modal windows in VW

askoh
Administrator
How does the Master wait for the modal Slave to return?

Thanks,
Aik-Siong