My question is pretty obvious, I think.
Here is my download and feedback procedure:
Code: Select all
on mouseUp
put the short name of the target into theClickedObject
switch theClickedObject
case "cancelTheDownloadButton"
/* some code to cancel the ongoing download */
break
end switch
end mouseUp
on downloadTheBook
-- a bunch of control statements to decide whether to download the book
libUrlDownloadToFile theSource, theTarget
-- checking the file integrity of downloaded book
end downloadTheBook
on urlProgress pUrl, pStatus, pMessage, pTotalSize
switch
case pStatus contains "error"
set the unicodeText of field "feedbackField" to uniEncode(kErrorMessage, "utf8")
exit to top
break
case pStatus is "contacted"
case pStatus is "requested"
set the unicodeText of field "feedbackField" to uniEncode(kStartingMessage, "utf8")
break
case pStatus is "loading"
put (trunc(pMessage / 1024) & "kb / " & trunc(pTotalSize / 1024) & "kb") into field "feedbackField"
break
case pStatus is "downloaded"
put empty into field "feedbackField"
break
end switch
end urlProgress
I absolutely have no idea how to do this

Could anyone help me to figure this out?
Best,
~ Ender Nafi