Progress Bar Updates

Bill Vlahos bvlahos at mac.com
Thu Nov 5 13:31:07 EST 2009


I've successfully used libURLSetStatusCallback for getting the status  
when downloading from a web server and updating a progress bar.  
However, when I try it for opening a file from a file server it  
doesn't work. Below is the code for the file server open in a button.

global vSyslogFile

on mouseUp
    answer file "Open Syslog File:"
    if it is not empty then
       libURLSetStatusCallback "myProgress",the long ID of me
       show sb 1 -- progress bar
       put URL ("file:" & it) into vSyslogFile
       hide sb 1
    end if
end mouseUp

on myProgress theURL,theStatus
   if "loading" is item 1 of theStatus then set the thumbpos of sb 1  
to (item 2 of theStatus/item 3 of theStatus)*(the endvalue of sb 1- 
startvalue of sb 1)
end myProgress

Does this not work for these kinds of put URL commands?

Bill Vlahos
_________________
InfoWallet (http://www.infowallet.com): Remember the important details  
of life.




More information about the use-livecode mailing list