On 29 Oct 2010, at 06:58, Ludovic Thébault wrote:
> Hello,
>
> Under Revolution 4, this script work like a charm :
>
> on mouseup
> ...
> libURLDownloadToFile theUrl, theDestUrl, "Downloaded"
> wait 0 milliseconds with messages
> ShowInfo theUrl
>
> end mouseup
>
> on ShowInfo pUrl
> local tStatus,tResult
> put URLStatus(pUrl) into tStatus
> switch
> case tStatus....
> ....
> end switch
> send "ShowInfo" && pUrl to me in 10 milliseconds
> end ShowInfo
>
>
> But with liveCode i've haven't the status and nothing seem to happen.
>
> What is wrong ?
I'm not sure, but perhaps this has something to do with the new asynchronous
behavior of the hostNameToAddress function. It seems that urlStatus will now
return empty for a short period between issuing the load command and the point
after it has obtained the IP address of the host. (previously this stage was
done synchronously)
Are you checking for tStatus = empty in your switch? Does your switch control
do anything that stops the load continuing in that situation?
As an alternative, you could try this (probably not reliable as a permanent
solution, but it might confirm that this is the problem ) :
on mouseup
...
libURLDownloadToFile theUrl, theDestUrl, "Downloaded"
send "ShowInfo theUrl" to me in 100 milliseconds
end mouseup
If you want to track the status during the download, libUrlSetStatusCallback
may be a better option.
Dave _______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution