Can _One_ Tcl/Tk script run _Two_ displays? 
Author Message
 Can _One_ Tcl/Tk script run _Two_ displays?

I want use a couple of X tubes to display status for visitors.  It would be
great if one wish script could have two toplevel windows on different
displays.  Can this be done?

I have a work around with multiple occurances of the main application with a
gaggle of supporting shell scripts and wish scripts doing sends.  But it's
not pretty.

A related question, can a wish script set it's own display?  I kept having to
wrap the wish script in a shell script to get the display environment variable
set.

Thanks for any help you can give.

--
--jhon

jhon honce                  MIME welcomed here      NASA/GSFC -- SEWP BOWL



Mon, 16 Dec 1996 03:12:28 GMT  
 Can _One_ Tcl/Tk script run _Two_ displays?

Quote:
>I want use a couple of X tubes to display status for visitors.  It would be
>great if one wish script could have two toplevel windows on different
>displays.  Can this be done?

toplevel .t -screen display:# will give you a toplevel on any display
Quote:
>Thanks for any help you can give.

>--
>--jhon

>jhon honce                  MIME welcomed here      NASA/GSFC -- SEWP BOWL




Tue, 17 Dec 1996 03:25:05 GMT  
 Can _One_ Tcl/Tk script run _Two_ displays?

|> I want use a couple of X tubes to display status for visitors.  It would be
|> great if one wish script could have two toplevel windows on different
|> displays.  Can this be done?

Yes: just use the "-screen" option for the toplevel widgets.  However,
the default bindings in tk.tcl are not written correctly to handle multiple
displays;  they don't keep separate state for the different displays.
This means that if users work simultaneously on different displays the
bindings will produce incorrect behavior.  Fixing this is on my list of
things to do for Tk 4.0, but there haven't been very many complaints about
this problem so it's low priority on the list.  Of course, you could probably
go in and fix the problems yourself too...

|>
|> I have a work around with multiple occurances of the main application with a
|> gaggle of supporting shell scripts and wish scripts doing sends.  But it's
|> not pretty.
|>
|> A related question, can a wish script set it's own display?  I kept having to
|> wrap the wish script in a shell script to get the display environment variable
|> set.
|>

Use the -display command-line option.



Wed, 18 Dec 1996 00:28:00 GMT  
 Can _One_ Tcl/Tk script run _Two_ displays?
What about having two displays for one widget?
example If I want a program to have the option to have more then
one person interact with it at a time.  When one person changes a
something all displays are updated to that changed.  

My example is for a program that a group in one school has made
but shipped to an other school.  When we try to talk on the phone
and run the program we have problems because it's hard to know whos
looking at what.  If the displays are the same each person would
be looking at the same thing.

The tcl variables would be updated for each machine but when I
create a top level widget say .home and pack it with .home.john I
have to copy code .john to say .johnremote in order to pack the
display .remote with .remote.johnremote.  If the top level widget
was able to take more then one screen name for the screen command
say maybe -screen home:0.0 remote:0.0 NULL.  Or if I was was able
to pack the .john it to more then one widget say .home.john and
.remote.john .

Thank You



Thu, 19 Dec 1996 00:42:57 GMT  
 Can _One_ Tcl/Tk script run _Two_ displays?

|> What about having two displays for one widget?
|> example If I want a program to have the option to have more then
|> one person interact with it at a time.  When one person changes a
|> something all displays are updated to that changed.  
|>
|> My example is for a program that a group in one school has made
|> but shipped to an other school.  When we try to talk on the phone
|> and run the program we have problems because it's hard to know whos
|> looking at what.  If the displays are the same each person would
|> be looking at the same thing.
|>
|> The tcl variables would be updated for each machine but when I
|> create a top level widget say .home and pack it with .home.john I
|> have to copy code .john to say .johnremote in order to pack the
|> display .remote with .remote.johnremote.  If the top level widget
|> was able to take more then one screen name for the screen command
|> say maybe -screen home:0.0 remote:0.0 NULL.  Or if I was was able
|> to pack the .john it to more then one widget say .home.john and
|> .remote.john .
|>

I agree that having a single data value displayed (and editable) on
multiple displays would be very useful.  Unfortunately, doing it is
pretty difficult (e.g. the displays might have different fonts and
colors and resolutions).  Over the long term I hope to modify both
texts and canvases so that there can be multiple windows on the same
information (and those multiple windows can potentially be on different
displays).  Unfortunately, none of this is going to be in Tk 4.0.



Mon, 23 Dec 1996 00:31:02 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Running a TK script using wish80.exe within a tcl script

2. Two parts: Email and Tcl/Tk and executing a tcl script

3. problems running tk-script with tcl/tk 8.3.3

4. Running wish/tk scripts to remote display

5. Tcl script exec'd from VMS tcl script doesn't display puts o/p

6. xelem: Tcl/Tk script to display the periodic table

7. run Tcl/TK script from within Vim?

8. Tcl/Tk scripts run inside C program

9. How to run Tcl/Tk scripts with windows ?

10. running tcl/tk script

11. One application, two toplevel windows, different X displays????

12. How to replace one or two words with one word with one line of awk code

 

 
Powered by phpBB® Forum Software