urlstatus question

Ron runrevron at gmail.com
Wed Oct 28 22:23:17 EDT 2009


As you know Andre, I'm a complete rookie when it comes to web stuff  
but I have benefitted greatly from the contributions of list members.  
Rev enables me to go to places I could not have gone before - like the  
web - but I need the help of others and this list is a great source of  
help.

Thanks All,
Ron


On Oct 29, 2009, at 10:34 AM, Andre Garzia wrote:

> You know Ron, I code network apps every day and every single day I  
> make the
> exact same mistake. I first use that callback, then I get frustrated  
> that it
> is sent only on errors or transfer complete and then I remember
> liburlsetstatuscallback and then I am happy again.
>
> I must have done this like a dozen times!
>
> On Wed, Oct 28, 2009 at 10:58 PM, Ron <runrevron at gmail.com> wrote:
>
>> Thank you Alex,
>> No one had replied yet so I kept looking. I found some similar code  
>> in a
>> project from someone else and realized they were using
>> libURLSetStatusCallback so once I found that, I could do the coding  
>> myself.
>> The pdf docs certainly give the impression that  
>> libURLDownloadToFile is
>> sufficient without the libURLSetStatusCallback but with this, I am  
>> getting
>> the update I need and can set the progress bar etc.
>>
>> Thanks again for the reply,
>> Ron
>>
>>
>>
>> On Oct 29, 2009, at 3:55 AM, Alex Tweedly wrote:
>>
>> 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
>>>>
>>>>
>>>>
>>> _______________________________________________
>>> 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
>>>
>>
>> _______________________________________________
>> 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
>>
>
>
>
> -- 
> http://www.andregarzia.com All We Do Is Code.
> _______________________________________________
> 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