October Portland Smalltalk Users Group Meeting

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

October Portland Smalltalk Users Group Meeting

Eric Winger
We're going to be holding our next Portland Smalltalk Users group  
meeting next week, October 10th at 7pm. Details are here:

http://www.cincomsmalltalk.com/userblogs/eric/blogView?
showComments=true&entry=3337289535

All are welcome.

Eric

Reply | Threaded
Open this post in threaded view
|

[Pollock]How to disable a window temporarily?

Carl Gundel
I'm implementing a simulation of parent/child modality, using a regular
application window to stand in for a dialog box.  It's pretty trivial to pop
up the child window when someone clicks on the parent window, but what I
would really like to implement is for the parent to become unresponsive to
mouse clicks as long as the child is still open.  It would be probably be
good enough if I could just disable the client area of the window.

Any ideas?

-Carl Gundel, author of Liberty BASIC
http://www.libertybasic.com 


Reply | Threaded
Open this post in threaded view
|

Re: [Pollock]How to disable a window temporarily?

Mark Pirogovsky-3
Take a look ot the Class Notice and methods>>showNotice: aString
complete: anInteger while: aBlock title: titleString.

Note the line:

InputState default grabInputFor: noticeModel builder window.
       
and somewhere at the end is ungrab.

Even though this Grab/ungrab business is not documented it appears that
it allows one to simulate the dialog behavior.

HTH

--Mark



Carl Gundel wrote:

> I'm implementing a simulation of parent/child modality, using a regular
> application window to stand in for a dialog box.  It's pretty trivial to
> pop up the child window when someone clicks on the parent window, but
> what I would really like to implement is for the parent to become
> unresponsive to mouse clicks as long as the child is still open.  It
> would be probably be good enough if I could just disable the client area
> of the window.
>
> Any ideas?
>
> -Carl Gundel, author of Liberty BASIC
> http://www.libertybasic.com
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: [Pollock]How to disable a window temporarily?

Samuel S. Shuster <sames@interaccess.com>
Mark & Carl:

>InputState default grabInputFor: noticeModel builder window.

Indeed, for VisualWorks in general, this is the only way, and it doesn't work
perfectly.

That said, for Pollock, you'd use:

InputState default grabInputFor: myUserInterface mainWindow.

And don't forget to ungrab when you're done, or no mouse activity will be seen
to "other" windows.

                                And So It Goes
                                     Sames
______________________________________________________________________

Samuel S. Shuster [|]
VisualWorks Engineering, GUI Project
Smalltalk Enables Success -- What Are YOU Using?

Reply | Threaded
Open this post in threaded view
|

Re: [Pollock]How to disable a window temporarily?

Carl Gundel
>>InputState default grabInputFor: noticeModel builder window.
>
> Indeed, for VisualWorks in general, this is the only way, and it doesn't
> work
> perfectly.
>
> That said, for Pollock, you'd use:
>
> InputState default grabInputFor: myUserInterface mainWindow.
>
> And don't forget to ungrab when you're done, or no mouse activity will be
> seen
> to "other" windows.

Okay, I'm not using the latest version of Pollock but this doesn't appear to
do anything at all.  Ideas?

Here is a simple test class I created to show what I did to try and make
this work.

Smalltalk defineClass: #GrabInput
 superclass: #{Panda.UserInterface}
 indexedType: #none
 private: false
 instanceVariableNames: ''
 classInstanceVariableNames: ''
 imports: ''
 category: 'InputGrab'!

!GrabInput class methodsFor: 'interface opening'!

open
 | result |
 result := super open.
 InputState default grabInputFor: result.
 result when: Panda.Closed do: [ self ungrab: result ].
 ^result!

ungrab: aWindow
 Transcript nextPutAll: 'ungrabbing...';cr.
 InputState default ungrabInputFor: aWindow! !

-Carl Gundel, author of Liberty BASIC
http://www.libertybasic.com 


Reply | Threaded
Open this post in threaded view
|

Re: [Pollock]How to disable a window temporarily?

Samuel S. Shuster <sames@interaccess.com>
Carl,

>Okay, I'm not using the latest version of Pollock but this doesn't appear to
>do anything at all.  Ideas?

Nope, I'm afraid I'm all out. This is one of those things that has never been
supported in VisualWorks.

                                And So It Goes
                                     Sames
______________________________________________________________________

Samuel S. Shuster [|]
VisualWorks Engineering, GUI Project
Smalltalk Enables Success -- What Are YOU Using?

Reply | Threaded
Open this post in threaded view
|

Re: [Pollock]How to disable a window temporarily?

Carl Gundel
>>Okay, I'm not using the latest version of Pollock but this doesn't appear
>>to
>>do anything at all.  Ideas?
>
> Nope, I'm afraid I'm all out. This is one of those things that has never
> been
> supported in VisualWorks.

Thoughts about the future?  Are you planning to support this functionality
in Chagall?

-Carl Gundel, author of Liberty BASIC
http://www.libertybasic.com 


Reply | Threaded
Open this post in threaded view
|

Re: [Pollock]How to disable a window temporarily?

Samuel S. Shuster <sames@interaccess.com>
Carl,

> Thoughts about the future?  Are you planning to support this  
> functionality in Chagall?

Well, if not Chagall then in Peaches. But it's a long way away either  
way.

                                 And So It Goes
                                      Sames
______________________________________________________________________

Samuel S. Shuster [|]
VisualWorks Engineering, GUI Project
Smalltalk Enables Success -- What Are YOU Using?



Reply | Threaded
Open this post in threaded view
|

Re: [Pollock]How to disable a window temporarily?

Carl Gundel
I managed to make Pollock do what I need by subclassing EventDispatcher.
When I need to lock a window I simply short circuit out of dispatchEvent:.
It seems to work okay, but we'll see.  Hopefully it'll work as well on the
Mac and Linux as it does on Windows.  :-)

-Carl Gundel, author of Liberty BASIC
http://www.libertybasic.com

----- Original Message -----
From: "Samuel S. Shuster" <[hidden email]>
To: "Carl Gundel" <[hidden email]>
Cc: "VWNC" <[hidden email]>
Sent: Tuesday, October 17, 2006 6:57 PM
Subject: Re: [Pollock]How to disable a window temporarily?


> Carl,
>
>> Thoughts about the future?  Are you planning to support this
>> functionality in Chagall?
>
> Well, if not Chagall then in Peaches. But it's a long way away either
> way.
>
>                                 And So It Goes
>                                      Sames
> ______________________________________________________________________
>
> Samuel S. Shuster [|]
> VisualWorks Engineering, GUI Project
> Smalltalk Enables Success -- What Are YOU Using?
>
>
>
>
>
>