I'm really, really sorry. Everytime I write a new program I always make
some stupid mistake that screws everything up. Usually I catch it but this
time I didn't. I'm an idiot and I'm sorry for wasting everyones time.
Thanks,
Joe
Peter Eisengrein <[EMAIL PROTECTED]>@lists.sourceforge.net on
09/04/2001 04:27:21 PM
Sent by: [EMAIL PROTECTED]
To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>,
[email protected]
cc:
Subject: RE: [perl-win32-gui-users] Running user functions after terminate
window
Between sub Dropdown_Change and sub GetFiles there's a statement of
'GetFiles($s);' That's what's doing it. Was that a typ-o?
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: 04 September 2001 12:09
> To: [email protected]
> Subject: [perl-win32-gui-users] Running user functions after terminate
> window
>
>
> Hello,
>
> I have a strange problem with my code. After I terminate my
> window. The
> program runs my user defined functions again. Why is it
> doing this and how
> do I stop it. I've included my code but I took everything out but the
> print statements which show the function running after the I
> terminate the
> gui window, below the code is the output.
>
> -----------CODE-----------
> # WebDeploy v2.0.0
>
> use Win32::GUI;
> use File::Copy;
> use Win32::File;
>
> print "#Before CreateWindow()\n";
> CreateWindow();
> print "#After CreateWindow(), Before Show()\n";
> $Window->Show();
> print "#After Show(), Before Dialog\n";
> Win32::GUI::Dialog();
> print "#After Dialog\n";
> print "#Finished\n";
>
> #=====================
> sub CreateWindow {
> print "#Start of CreateWindow()\n";
> $Window = new GUI::Window(
> -name => "Window",
> -text => "Web Deploy v2.0.0",
> -width => 800,
> -height => 700,
> -left => 25,
> -top => 25,
> );
>
>
>
> $CBdropdown = $Window->AddCombobox(
> -name => "Dropdown",
> -left => 10,
> -top => 500,
> -width => 250,
> -height => 100,
> -style => WS_VISIBLE | 2 | WS_NOTIFY,
> );
> $CBdropdown->InsertItem("samples");
> $CBdropdown->InsertItem("Ops");
> $CBdropdown->InsertItem("Timesheet");
>
> print "#End of CreateWindow()\n";
> }
>
> #====================
> sub Dropdown_Change {
> print "#Start of Dropdown_Change\n";
> my $s = $CBdropdown->SelectedItem;
> print "#Before GetFiles()\n";
> GetFiles($s);
> print "#After GetFiles(), End of Dropdown_Change\n"
> }
>
> #=====================
> GetFiles($s);
> #=====================
> sub GetFiles {
> print "#Start of GetFiles()\n";
> print "#Before InsertListItem\n";
> InsertListItem();
> print "#After InsertListItem\n";
> print "#End of GetFiles()\n";
> }
>
> #====================
> sub InsertListItem {
> print "#Start of InsertListItem\n";
> print "#End of InsertListItem\n";
> }
>
> #=====================
> sub Window_Terminate {
> print "#In Window_Terminate\n";
> return -1;
> }
>
> -----------OUTPUT---------------
> D:\code>webdeploy2.pl
> #Before CreateWindow()
> #Start of CreateWindow()
> #End of CreateWindow()
> #After CreateWindow(), Before Show()
> #After Show(), Before Dialog
> #Start of Dropdown_Change
> #Before GetFiles()
> #Start of GetFiles()
> #Before InsertListItem
> #Start of InsertListItem
> #End of InsertListItem
> #After InsertListItem
> #End of GetFiles()
> #After GetFiles(), End of Dropdown_Change
> #In Window_Terminate
> #After Dialog
> #Finished
> #Start of GetFiles()
> #Before InsertListItem
> #Start of InsertListItem
> #End of InsertListItem
> #After InsertListItem
> #End of GetFiles()
>
> D:\code>
>
> What I did was start the program (The output goes to '#After
> Show(), Before
> Dialog'). Then I select something from the dropdown box
> (output goes to '
> #After GetFiles(), End of Dropdown_Change'). Then click on the 'X' to
> close the window. Now after "#Finished" shouldn't the
> program end and not
> run my user functions again?
>
> Please help.
>
> Thanks,
>
> Joe
>
>
>
>
>
> _______________________________________________
> Perl-Win32-GUI-Users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
>
_______________________________________________
Perl-Win32-GUI-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users