Greetings, I am having trouble with PERL/Tk gius and subroutines. I have a button that calls a subroutine using the "command" method. The subroutine is supposed to get a list of selected lines from a listbox in the first window and set up an array variable based on this list. It is then supposed to destroy the first window, and then display a new window foreach item in the array. My problem in that when the foreach loop runs, all of the "second" windows display at the same time instead of one at a time while the loop executes. Does anyone know what I am doing wrong? The structure of the loop seems OK, if I put other commands in there they execute one at a time like I would expect. I'm guessing the problem lies in the usage of Tk....
...subroutine called from button in "mw" window. sub pick_layers { my @dc_steps_list = $selected_lb->get(0, 'end'); $mw->destroy(); foreach my $dcl (@dc_steps_list) { $mw1 = MainWindow->new(); $mw1->minsize(500,500); $mw1->configure( -background => darkturquoise, -foreground => black, -relief => sunken, -cursor => hand1, -borderwidth => 2 ); $mw1->title("Date Code Options"); } } Best Regards, Robert Zielfelder .-. --.. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]