Re: [perl-win32-gui-users] The cancel cross (upper right) in GUI
Nahum Marc wrote: > How to manage the the cancel cross (upper right) in GUI to do > an exit ? , not a window exit , but a script exit ... pick a sample script, anyone will do, from the samples directory and study it. supposing your window is named Window, add this line to your script: sub Window_Terminate { -1 } cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
Re: [perl-win32-gui-users] The cancel cross (upper right) in GUI
I do this too ... but it's close the window , and not all the script ... I can see the process yet in task manager (under NT4) off course , i hide the dos box so , i need kill the process - Original Message - From: "Aldo Calpini" <[EMAIL PROTECTED]> To: "Nahum Marc" Sent: Wednesday, February 14, 2001 12:01 PM Subject: Re: [perl-win32-gui-users] The cancel cross (upper right) in GUI > Nahum Marc wrote: > > How to manage the the cancel cross (upper right) in GUI to do > > an exit ? , not a window exit , but a script exit ... > > pick a sample script, anyone will do, from the samples directory > and study it. > > > supposing your window is named Window, add this line to your > script: > sub Window_Terminate { -1 } > > > > cheers, > Aldo > > __END__ > $_=q,just perl,,s, , another ,,s,$, hacker,,print; > > > > ___ > Perl-Win32-GUI-Users mailing list > Perl-Win32-GUI-Users@lists.sourceforge.net > http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users >
Re: [perl-win32-gui-users] The cancel cross (upper right) in GUI
Nahum Marc wrote: > I do this too ... but it's close the window , and not all the > script ... I can see the process yet in task manager (under NT4) > > off course , i hide the dos box so , i need kill the process there must be some error in your script. can you post a piece of your code that includes at least the window creation, the Win32::GUI::Dialog() call and the Terminate event? also, please report which version of Win32::GUI and Perl and operating system you're using. cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
Re: [perl-win32-gui-users] The cancel cross (upper right) in GUI
Win32::GUI version 0.0.502 perl version Binary build 522 OS : Windows NT4 wks , SP5 Sincerly, Marc Nahum - Original Message - From: "Aldo Calpini" <[EMAIL PROTECTED]> To: "Nahum Marc" Sent: Wednesday, February 14, 2001 2:57 PM Subject: Re: [perl-win32-gui-users] The cancel cross (upper right) in GUI > Nahum Marc wrote: > > I do this too ... but it's close the window , and not all the > > script ... I can see the process yet in task manager (under NT4) > > > > off course , i hide the dos box so , i need kill the process > > there must be some error in your script. can you post a piece of > your code that includes at least the window creation, the > Win32::GUI::Dialog() call and the Terminate event? > > also, please report which version of Win32::GUI and Perl and > operating system you're using. > > > cheers, > Aldo > > __END__ > $_=q,just perl,,s, , another ,,s,$, hacker,,print; > > > > ___ > Perl-Win32-GUI-Users mailing list > Perl-Win32-GUI-Users@lists.sourceforge.net > http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users > script.pl Description: Binary data
Re: [perl-win32-gui-users] The cancel cross (upper right) in GUI
On 14 Feb 2001, at 11:20, Nahum Marc wrote: > How to manage the the cancel cross (upper right) in GUI to do an exit > ? = , not a window exit , but a script exit ... I think I found your problem: When Win32::GUI::Dialog() returns -1, control returns to the script. After that, you have a bunch of subs and then your 'suite' section. One of the commands in 'suite' is 'goto debut', so it jumps back up there, and runs through that part of the script again. Place an 'exit' after your Win32::GUI::Dialog(), and the script should terminate before getting to 'suite'.
Re: [perl-win32-gui-users] The cancel cross (upper right) in GUI
Nahum Marc wrote: > Win32::GUI version 0.0.502 > perl version Binary build 522 > OS : Windows NT4 wks , SP5 c'est tres simple :-) your window is called 'Win' (-name => "Win"), but your event is called Window_Terminate. should be Win_Terminate instead! BTW, you have an horrible use of goto in your script. I haven't investigated much, but I've seen a lot of possible problems here and there (for example, returning to 'debut' will create another copy of your windows, which is something you should not do!). cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;