At 09:43 PM 9/22/02 +0300, Martin Roos wrote: > anyway, is there any hope to get this working ? > i need an external thread to update the main window from time to time. > but it seems a bit hard to do when i can't access the window that has been >created :( > maybe some kind of a back hand reference thingy could/may work ? > i already played around with some references and stuff but didn't work that >easily :(
Tk is (to my knowledge, someone correct me if I'm wrong) ready for threads. This means it will probably work with a threaded Perl, but only as long as all the Tk events are handled by the same thread. But there are reliable signals now in Perl. This means that you can have an external process (or thread if your on Linux and want to use Thread::Signal) send a signal to have alter_title() called when you need it. Only passing parameters may be a bit troublesome ;-) You might need POSIX::sigaction (see the POSIX.pm pod) to make sure that the signal is served at all times (rather than after a system routine times out). Just setting %SIG just doesn't cut it in some cases... Hope this helps, Liz