You have taken out the looping which is why it works. This is not
what I wanted. I wanted to loop a set number of times and stop under
a given condition to display my own window. Example, I want to read
in lines from a file and check the lines for errors. If an error is
found I want to popup a window with the bad record and have the user
click a button to continue. It appears this can not
be done without inserting another Win32::GUI::Dialog(). If I use this
method, after enough error windows are displayed the program complains
that it can't find a particular file.
> oops...that's odd, because i was sure i had gotten it to work...oh,
> well...how about this:
>
> ====================================================
>
> use Win32::GUI;
>
> $i=0;
>
> $Win = new Win32::GUI::Window(
> -left => 341,
> -top => 218,
> -width => 300,
> -height => 213,
> -name => "Win",
> -text => "Window Title"
> );
>
>
>
> $Win->AddButton(
> -text => "Loop",
> -name => "Loop",
> -left => 104.5,
> -top => 102,
> -width => 95,
> -height => 28,
> );
>
> $Win2 = new Win32::GUI::Window(
> -left => 391,
> -top => 238,
> -width => 200,
> -height => 183,
> -name => "Win2",
> -title => "New Window",
> );
>
> $Win2->AddLabel(
> -text => "",
> -name => "Label",
> -left => 60,
> -top => 30,
> -width => 20,
> -height => 20,
> );
>
> $Win2->AddButton(
> -text => "OK",
> -name => "OK",
> -left => 50,
> -top => 102,
> -width => 95,
> -height => 28,
> );
>
> $Win->Show();
>
> Win32::GUI::Dialog();
>
> sub Win_Terminate {
> return -1;
> }
>
> sub OK_Click {
> $Win2->Hide();
> $i++;
> }
>
> sub Loop_Click {
> &Show_Win2($i);
>
> }
>
> sub Show_Win2 {
> my $num = shift;
>
> $Win2->Label->Text($num);
> $Win2->Show();
> $Win2->Update();
>
> }
>