From: Jeremy A. <bc...@te...> - 2001-04-23 20:22:16
Attachments:
singletransferp.pl
|
Hello all I can't get my script to work with the gui windows, when the gui sub routine gets called and the windows gets created, the program freezes and script does not continue I have not done win32::Gui programming before so your help is always appreciated. See the script attached. Thankyou Jeremy |
From: Jeremy B. <Sco...@ya...> - 2001-04-24 13:21:23
|
When the gui window is created the program enters a messaging loop. It processes events that the gui window fires off. If you create a gui window but don't fire off any events the program won't do anything. You need to fire off an event so that your script can process the rest of your script. You fire events by clicking on things (buttons, labels), resizing the window, closing the window, etc., etc. So you can either put a button on the gui window that when clicked runs the ftp transfer, or I believe there is an _Activate event so that when the window is created you can start the ftp transfer. Hopefully, that explains what is happening. Jeremy Blonde -----Original Message----- From: per...@li... [mailto:per...@li...]On Behalf Of Jeremy Aiyadurai Sent: Monday, April 23, 2001 4:18 PM To: per...@li... Subject: [perl-win32-gui-users] Gui-program problem Hello all I can't get my script to work with the gui windows, when the gui sub routine gets called and the windows gets created, the program freezes and script does not continue I have not done win32::Gui programming before so your help is always appreciated. See the script attached. Thankyou Jeremy _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com |
From: Anthony C. G. <ag...@em...> - 2001-04-24 13:29:22
|
Also a code segment is always helpful :) >tony ----- Original Message ----- From: "Jeremy Blonde" <Sco...@ya...> To: <per...@li...> Sent: Tuesday, April 24, 2001 9:26 AM Subject: RE: [perl-win32-gui-users] Gui-program problem > When the gui window is created the program enters a messaging loop. It > processes events that the gui window fires off. If you create a gui window > but don't fire off any events the program won't do anything. You need to > fire off an event so that your script can process the rest of your script. > You fire events by clicking on things (buttons, labels), resizing the > window, closing the window, etc., etc. So you can either put a button on > the gui window that when clicked runs the ftp transfer, or I believe there > is an _Activate event so that when the window is created you can start the > ftp transfer. > > Hopefully, that explains what is happening. > > Jeremy Blonde > > -----Original Message----- > From: per...@li... > [mailto:per...@li...]On Behalf Of > Jeremy Aiyadurai > Sent: Monday, April 23, 2001 4:18 PM > To: per...@li... > Subject: [perl-win32-gui-users] Gui-program problem > > > > Hello all > > I can't get my script to work with the gui windows, when the gui sub > routine gets called and the windows gets created, the program freezes and > script does not continue > > I have not done win32::Gui programming before so your help is always > appreciated. > > See the script attached. > > Thankyou > > Jeremy > > > _________________________________________________________ > Do You Yahoo!? > Get your free @yahoo.com address at http://mail.yahoo.com > > > _______________________________________________ > Perl-Win32-GUI-Users mailing list > Per...@li... > http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users > > |
From: Anthony C. G. <ag...@em...> - 2001-04-24 15:13:23
|
doh! didn't see the attachment from the webclient I was using! sorry... >tony ----- Original Message ----- From: "Anthony C. George" <ag...@em...> To: <per...@li...> Sent: Tuesday, April 24, 2001 9:28 AM Subject: Re: [perl-win32-gui-users] Gui-program problem > Also a code segment is always helpful :) > > >tony > > ----- Original Message ----- > From: "Jeremy Blonde" <Sco...@ya...> > To: <per...@li...> > Sent: Tuesday, April 24, 2001 9:26 AM > Subject: RE: [perl-win32-gui-users] Gui-program problem > > > > When the gui window is created the program enters a messaging loop. It > > processes events that the gui window fires off. If you create a gui > window > > but don't fire off any events the program won't do anything. You need to > > fire off an event so that your script can process the rest of your script. > > You fire events by clicking on things (buttons, labels), resizing the > > window, closing the window, etc., etc. So you can either put a button on > > the gui window that when clicked runs the ftp transfer, or I believe there > > is an _Activate event so that when the window is created you can start the > > ftp transfer. > > > > Hopefully, that explains what is happening. > > > > Jeremy Blonde > > > > -----Original Message----- > > From: per...@li... > > [mailto:per...@li...]On Behalf Of > > Jeremy Aiyadurai > > Sent: Monday, April 23, 2001 4:18 PM > > To: per...@li... > > Subject: [perl-win32-gui-users] Gui-program problem > > > > > > > > Hello all > > > > I can't get my script to work with the gui windows, when the gui sub > > routine gets called and the windows gets created, the program freezes and > > script does not continue > > > > I have not done win32::Gui programming before so your help is always > > appreciated. > > > > See the script attached. > > > > Thankyou > > > > Jeremy > > > > > > _________________________________________________________ > > Do You Yahoo!? > > Get your free @yahoo.com address at http://mail.yahoo.com > > > > > > _______________________________________________ > > Perl-Win32-GUI-Users mailing list > > Per...@li... > > http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users > > > > > > > > _______________________________________________ > Perl-Win32-GUI-Users mailing list > Per...@li... > http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users > > |
From: Johan L. <jp...@bo...> - 2001-04-24 14:00:35
|
Jeremy wrote: >I can't get my script to work with the gui windows, when the gui sub >routine gets called and the windows gets created, the program freezes and >script does not continue After a quick look, this is the problem: In the sub CreateProgressWin you create the window and then call Win32::GUI::Dialog(); It kind of looks like it's a remnant from Perl Builder :) The call to Dialog() will make the script enter the main event loop. Anything from there (like your FTP stuff) has to be triggered by an event (e.g. a button click, a window being resized, or a timer) until the event loop is terminated (by returning -1 in an event handler). The thing is, you don't have to call Win32::GUI::Dialog() for the window to function, you can do that manually by calling Win32::GUI::DoEvents() as often as possible. And you already do that in the RecieveTransfer loop, so if you just remove the call to Dialog() it will work fine. The downside: the GUI response will be sluggish when you do it like this, but the alternative is to do your application stuff in another process or thread, and that is a lot more work. I'd love to see a stable framework for doing that though. >I have not done win32::Gui programming before so your help is always >appreciated. You use \ instead of \\ as directory separator in a few places. Most of the time / works very well on the Windows platform. And, you might want to change the password on whichever server that is ;) Hope That Helps, /J -- Johan Lindström, Sourcerer, Boss Casinos Ltd, Antigua jp...@bo... |