urlProgress |
Type | message |
Dictionary | LCS |
Library | LiveCode Script |
Syntax | urlProgress <pUrl>, <pStatus>, [<pMessage>, [<pBytesTotal>]]
|
Summary | Sent when updates on ongoing url requests are communicated.
|
Introduced | 4.6.1 |
OS | ios, android, web |
Platforms | mobile, desktop |
Parameters | Name | Type | Description |
---|
pUrl | | The name of the url for which a message is being sent.
|
pStatus | | The type of update message being sent "contacted": The server has been contacted.
"requested": A request was made to the URL.
"loading": Data is being downloaded.
"uploading": Data is being uploaded to the server.
"downloaded": Data has finished downloading.
"uploaded": Data has finished uploading.
"error": An error occurred.
|
pMessage | | A message sent with some of the status parameters "bytesReceived": Sent when the status parameter is either 'loading' or 'uploading'.
"erroMessage": Sent when the status parameter is 'error'.
|
pBytesTotal | | Empty if the web server does not send the total data size.
|
|
Example | on urlProgress pUrl, pStatus
if pStatus is "downloaded" then
answer "Finished downloading" with "Okay"
end if
end urlProgress
on urlProgress pUrl, pStatus, pMessage
if pStatus is "error" then
answer "Encountered Error:" && pMessage with "Okay"
end if
end urlProgress
|
Related | Command: put, post, load
Glossary: message
|
Description | Sent when updates on ongoing url requests are communicated. This message
is periodically sent to the object whose script initiated the operation.
Warning: The urlProgress message is not part of the libUrl or tsNet
libraries. It is instead implemented in the mobile engine, whose
network-related functionality can not be used together with those
libraries in a standalone. Adding either of the "Internet" or "tsNet"
Inclusions will result in them overriding/replacing any network-related
functionality that is implemented in the mobile engine, including the
urlProgress message.
To use the urlProgress message in a mobile standalone, ensure that
the "Internet" and "tsNet" Inclusions are not added in the standalone
settings.
|