Multiple Mainloops? 
Author Message
 Multiple Mainloops?

I've just started with perl/tk 2 weeks ago to write a queue management
tool. Now I'm wondering how it might be possible to have severals
Mainloops after each other, or better: Mainwindows.
My problem is to have a window with an Entry open to get one special
variable and _after that_ open the 'real' Mainwindow which is built
in dependance of that variable. If I use 'normal' windows they will be
built the same time and the variable evaluation through Entry comes too
late. Is it so?
Perhaps there is a quite easy way to do what I want, but I don't find
it... And if I use 2 Mainloops I get lots of messages that
   Subroutine Tk::toplevel redefined at
usr/local/gnu/lib/perl5/Tk/MainWindow.pm line 65535
  and so on, which seems to mean that a second mainwindow isn't allowed.

I'd appreciate any help from more experienced users!
---------

***************************************************************
*  Homepage: http://www.*-*-*.com/ ~langc/my_homepage.html  *
*  ADFC    : http://www.*-*-*.com/ ~langc/adfc/adfc.html    *
***************************************************************



Tue, 22 Dec 1998 03:00:00 GMT  
 Multiple Mainloops?

Quote:

> I've just started with perl/tk 2 weeks ago to write a queue management
> tool. Now I'm wondering how it might be possible to have severals
> Mainloops after each other, or better: Mainwindows.
> My problem is to have a window with an Entry open to get one special
> variable and _after that_ open the 'real' Mainwindow which is built
> in dependance of that variable. If I use 'normal' windows they will be
> built the same time and the variable evaluation through Entry comes too
> late. Is it so?
> Perhaps there is a quite easy way to do what I want, but I don't find
> it... And if I use 2 Mainloops I get lots of messages that
>    Subroutine Tk::toplevel redefined at
> usr/local/gnu/lib/perl5/Tk/MainWindow.pm line 65535
>   and so on, which seems to mean that a second mainwindow isn't allowed.

It is supposed to work.  I think it started to work Tk-b9 or so.
Tk-b*/two_main shows two MainWindows.
I thought I had had multiple MainLoops as well.
You probably have to be a little careful with the "scope" of the
MainWindow variable - keeping a perl reference about after window
has gone may confuse things.


Wed, 23 Dec 1998 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Mainloop and Tk::Mainloop

2. Mainloop

3. command to update the mainloop during longrunning subs?

4. Undefined pTk's mainloop in package

5. Running MainLoop in background?

6. BEGIN and MAINLOOP

7. MainLoop and errors

8. How to leave the MainLoop

9. Modifying widgets outside of MainLoop

10. Exiting the MainLoop?

11. (fwd) Re: How does mainloop work?

12. (fwd) Re: How does mainloop work?

 

 
Powered by phpBB® Forum Software