in reply to Toplevel Window References in Perl Tk
To be honest, I can't figure out what you are trying to do? :-) I've never seen code like this:
So I'm wondering what you are trying to do?if(! Exists($obj->{mw})) { $obj = bless {mw => $wind->Toplevel()}; $obj->{mw}->title("Child Window");
Anyways, to get the reference to a Toplevel, just save it somewhere.
You seem to be trying to track windows, by setting their Titles, but I may not understand your code. You should save them in hashes or arrays.my %toplevels; $toplevel{$count}{'toplevel'} = $wind->Toplevel();
Anyways, add warnings to your script, fix the warnings problem, and straighten out your hashes. Sorry, this code is too convoluted for me to understand.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Toplevel Window References in Perl Tk
by lara26 (Initiate) on Sep 11, 2008 at 08:38 UTC | |
by zentara (Cardinal) on Sep 11, 2008 at 14:00 UTC |