in reply to Re^2: Grabbing Text widget's contents after MainLoop
in thread Grabbing Text widget's contents after MainLoop
I thought there might be a way to attach a callback sub (like the one in my reply) to the "Destroy" event for the text widget -- but I just tried that on my mac (where the "quartz" window manager puts its own frame with a "close" button around every X-windows-based Perl/Tk app), using $text->bind("<Destroy>", sub { ...} ); and it didn't work. :(
update: So, if the rest of your larger script is not GUI-based, and you're just popping up a window when some user input is needed, then yeah, I'd say "$main->destroy" instead of "exit(0)" in my callback on the Button widget, for sure.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Grabbing Text widget's contents after MainLoop
by GrandFather (Saint) on Jul 22, 2005 at 09:20 UTC |