AW: AW: AW: need help for decompress URL

Dave Cragg dave.cragg at lacscentre.co.uk
Fri Nov 28 06:41:04 EST 2008


On 28 Nov 2008, at 11:06, Tiemo Hollmann TB wrote:

> Yes, decompressing the same lokal file with:
> put decompress(URL ("binfile:" & it)) into URL ("binfile:" & tFile)
> works like a charme.
> But uploading this file to the internet and doing
> load pURL
> put decompress(url pUrl) into tData
> where pUrl is something like: "http://www.mydomain/myBinFile.gz"
> I get this "not compressed data". So it must something be with the URL
> syntax, but I don't see it


Tiemo

"load url" works in the background and you need to use a callback  
message to get the data. Something like this:

on myHandler
-- whatever
   load URL pUrl with message "loaded"
end myHandler

on loaded pUrl, pStatus
   if pStatus is "cached" then
     put decompress(url pUrl) into url (whatever)
   else
     answer "download failed" -- or other error handling
    end if
   unload url pUrl -- assuming y0u no longer need it
end loaded


Cheers
Dave



More information about the use-livecode mailing list