Re: [perl-win32-gui-users] FTP-Status download Gui-program

At 04:33 PM 24/04/2001 -0400, you wrote:
Johan,
Thankyou for your help so far....it was a careless error that nothing to do
with the gui aspect...I got the download status working..
I have readded the DoEvents(), but i cannot get the cancel button "kill" to
work.
the kill should work in the middle of the transfer...eg...the while(1) loop.
I don't know how to do this with the dialog() call, because this call
causes everything to freeze until a button is pressed.
putting dialog() in the middle of the while loop will not work.
is there a way for it to listen while it downloads for the cancel event?
>Jeremy wrote:
>>I still cannot 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
>>
>>As suggested by some I have gotten rid of the Dialog() call,
>
>There is one more place where it should be removed from i think (depends on=
=20
>what you want). Try that.
>
>
>>and have replaced the DoEvents() call with Update();
>
>Not sure about this one. You need the DoEvents() call if you want people to=
=20
>be able to abort. The ProgressBar is presumably updated with the SetPos()
call.
>
>
>>this is the only thing that happens, then my program exits mysteriously
>>without entering the while(1) loop which is the download progress of the
file.
>>I am left with a file-to-be of "0" bytes.
>
>Put print statements in your code to tell you exactly how far it goes and=
=20
>where, what values variables have etc. Data::Dumper is very nice if you=20
>have data structures to display.
>
>Also, coding Perl without "use strict;" and warnings are unnecessarily=20
>difficult and error prone. Just a tip.
>
>
>Hope That Helps,
>
>/J
>
>--
>Johan Lindstr=F6m, Sourcerer, Boss Casinos Ltd, Antigua
>jpl@...
>
>
>_______________________________________________
>Perl-Win32-GUI-Users mailing list
>Perl-Win32-GUI-Users@...
>http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
>

Thread view

Hello all
I still cannot 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
As suggested by some I have gotten rid of the Dialog() call, and have
replaced the DoEvents() call with Update();
as you can see in the script, the empty file-to-be is created.....
this is the only thing that happens, then my program exits mysteriously
without entering the while(1) loop which is the download progress of the file.
I am left with a file-to-be of "0" bytes.
Try it running the script yourself configuring it to your own ftp and see
what you can make of problem. It's fairly straitforward to setup
I have not done win32::Gui programming before so your help is always
appreciated.
See the script attached.
Thankyou
Jeremy

Jeremy wrote:
>I still cannot 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
>
>As suggested by some I have gotten rid of the Dialog() call,
There is one more place where it should be removed from i think (depends on
what you want). Try that.
>and have replaced the DoEvents() call with Update();
Not sure about this one. You need the DoEvents() call if you want people to
be able to abort. The ProgressBar is presumably updated with the SetPos() call.
>this is the only thing that happens, then my program exits mysteriously
>without entering the while(1) loop which is the download progress of the file.
>I am left with a file-to-be of "0" bytes.
Put print statements in your code to tell you exactly how far it goes and
where, what values variables have etc. Data::Dumper is very nice if you
have data structures to display.
Also, coding Perl without "use strict;" and warnings are unnecessarily
difficult and error prone. Just a tip.
Hope That Helps,
/J
--
Johan Lindström, Sourcerer, Boss Casinos Ltd, Antigua
jpl@...

At 04:33 PM 24/04/2001 -0400, you wrote:
Johan,
Thankyou for your help so far....it was a careless error that nothing to do
with the gui aspect...I got the download status working..
I have readded the DoEvents(), but i cannot get the cancel button "kill" to
work.
the kill should work in the middle of the transfer...eg...the while(1) loop.
I don't know how to do this with the dialog() call, because this call
causes everything to freeze until a button is pressed.
putting dialog() in the middle of the while loop will not work.
is there a way for it to listen while it downloads for the cancel event?
>Jeremy wrote:
>>I still cannot 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
>>
>>As suggested by some I have gotten rid of the Dialog() call,
>
>There is one more place where it should be removed from i think (depends on=
=20
>what you want). Try that.
>
>
>>and have replaced the DoEvents() call with Update();
>
>Not sure about this one. You need the DoEvents() call if you want people to=
=20
>be able to abort. The ProgressBar is presumably updated with the SetPos()
call.
>
>
>>this is the only thing that happens, then my program exits mysteriously
>>without entering the while(1) loop which is the download progress of the
file.
>>I am left with a file-to-be of "0" bytes.
>
>Put print statements in your code to tell you exactly how far it goes and=
=20
>where, what values variables have etc. Data::Dumper is very nice if you=20
>have data structures to display.
>
>Also, coding Perl without "use strict;" and warnings are unnecessarily=20
>difficult and error prone. Just a tip.
>
>
>Hope That Helps,
>
>/J
>
>--
>Johan Lindstr=F6m, Sourcerer, Boss Casinos Ltd, Antigua
>jpl@...
>
>
>_______________________________________________
>Perl-Win32-GUI-Users mailing list
>Perl-Win32-GUI-Users@...
>http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
>