put put

Dave Cragg dave.cragg at lacscentre.co.uk
Tue Dec 8 11:08:36 EST 2009


Malte, I think there may be a few minor changes in the version shipping with Rev 4. (But nothing that obviously changes previous working.)

In your code, I'd suggest you split the following line:

> put URL tPath into URL ("binFile:"& tTempPath)

into two parts, and add error checking after each part.

put URL tPath into tData
if the result is not empty then
  answer the result -- or whatever
else
  put tData into URL ("binFile:"& tTempPath)
  if the result is not empty then
      answer the result -- or whatever
  end if
end if

In that way you can see if the problem concerns the download or saving to file.

Cheers
Dave



On 8 Dec 2009, at 15:18, Malte Pfaff-Brill wrote:

> I think something is fishy with libURL in Rev 4. Some script that used to work in previous versions now breaks with the current engine.
> 
> local tPath, tTempPath
>    put getServerUrl()&"test.pdf" into tPath
>    put the tempname & ".pdf" into tTempPath
>    libURLSetStatusCallback "dataupdate",the long id of sb 1 of stack "progressupdate"
>    send "init" to stack "progressUpdate"
>    set the filetype to "prvwPDF "
>    put URL tPath into URL ("binFile:"& tTempPath)
>    libURLSetStatusCallback
>    close stack "progressUpdate"
>    launch document tTempPath
> 
> This works sometimes(on Windows XP), most of the time it does not and we end up with half downloaded files or 0 byte files. Rather strange, because until now it used to work. Has anyone else seen strangeness with put? Any workarounds we could try?
> 
> Cheers,
> 
> Malte
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the Use-livecode mailing list