urlstatus question

Alex Tweedly alex at tweedly.net
Wed Oct 28 14:55:26 EDT 2009


I haven't noticed a reply to this .... if there was one and I just 
missed it, then I offer my apologies (especially if i contradict that 
answer ;-)

I haven't look at the user guide - this is info from the documentation 
(dictionary).

The last parameter to libURLDownloadToFile is a status callback called 
only when the operation is complete (whether it succeeds or fails). To 
get a periodic status callback, you need to call libURLSetStatusCallback 
- see the dictionary entry for it and for libURLDownloadToFile

-- Alex

ron barber wrote:
> Greetings,
>
> I am downloading a file from the web to my HD using
> libURLDownloadToFile. I copied the scripts in Rev's user guide which
> also says:
>
> "As the URLStatus changes periodically throughout the download
> process, the button's
> showStatus handler is executed repeatedly. Each time a showStatus
> message is sent, the
> handler places the new status in a field. The user can check this
> field at any time during
> the file transfer to see whether the download has started, how much of
> the file has been
> transferred, and whether there has been an error. "
>
>
> This sounds like the showstatus message is sent without any further
> coding from me but I am not getting any intermediate messages, simply
> 'downloaded' at the end of the download. I've tried 'sending' and
> 'repeating' but I'm missing something.
>
> My script (basically copied from the guide)
>
> on mouseUp
>    put specialFolderPath("desktop")&"/newfile.zip" into newfile
>    set the fileType to "????zip "
>    --set the fileType to "ddskdevi"
>     libURLDownloadToFile myfile,newfile,"showStatus"
> end mouseUp
>
> on showStatus theURL
>    put the URLStatus of theURL into field "status"
> end showStatus
>
> Thanks,
> Ron
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>   




More information about the use-livecode mailing list