Mastering TS Net

Sannyasin Brahmanathaswami brahma at hindu.org
Mon Jul 2 10:16:28 EDT 2018


Charles: Mysteries

I booted Livecode fresh the morning, and used the same script. But I no longer get 

tResult      --        tsneterr: ID already in use.

Dictionary script works as expected "File downloaded" 

local tHeaders, tResult

on mouseup
   tsNetCloseConn "1"
   put empty into tResult
   put fld aURL into pURL
   put empty into fld "fldHTTPHeader"
   put empty  into fld "tHTMLfield"
   set the itemDel to "/" 
   put item -1 of pURL into tFileName
   put ("/Users/brahmanathaswami/Desktop/"&tFileName) into tLocalFile
   put tsNetGetFile("1",tLocalFile,pURL,tHeaders,"transferComplete") into tResult
  
   --  put libURLLastHTTPHeaders() into fld "fldHTTPHeader"
   
end mouseup

on transferComplete pID, pResult, pBytes, pCurlCode
   
   if pCurlCode is not 0 then
      answer tsNetRetrError(pID)
   else
      answer "File has been downloaded"
      put tHeaders into fld "fldHTTPHeader"
   end if
   tsNetCloseConn pID
end transferComplete

    ># variable watcher
        > 
        > tResult      --        tsneterr: ID already in use



More information about the use-livecode mailing list