Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Tk - is MainWindow robust?

by rinceWind (Monsignor)
on Dec 01, 2005 at 11:17 UTC ( [id://513237]=note: print w/replies, xml ) Need Help??


in reply to Tk - is MainWindow robust?

I would use local for tweaking the environment variable:

use strict; use Tk; my @Displays = qw"node1:0 node2:0"; my $top = MainWindow->new(); my %top; foreach (@Displays) { local $ENV{'DISPLAY'} = $_; if (eval {$top{$_} = MainWindow->new()}) { print "MainWindow opened on $_\n"; } else { print "MainWindow failed to open on $_\n"; $top{$_} = 0; } } MainLoop;

--

Oh Lord, won’t you burn me a Knoppix CD ?
My friends all rate Windows, I must disagree.
Your powers of persuasion will set them all free,
So oh Lord, won’t you burn me a Knoppix CD ?
(Missquoting Janis Joplin)

Replies are listed 'Best First'.
Re^2: Tk - is MainWindow robust?
by matt.tovey (Beadle) on Dec 01, 2005 at 13:35 UTC
    Good tip - thanks.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://513237]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2024-03-29 15:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found