Put Put

Dan Friedman dan at clearvisiontech.com
Mon Dec 7 13:34:49 EST 2009


Hiya...

Isn't the "put" command blocking?  I find that if I call a 'put' to write to a server twice in fast succession, the second 'put' is handled BEFORE the first one is complete.  For example:

I made a new stack with this script:

on doSave
  put "ftp://admin:password@123.456.789.012/UploadTest.txt" into ftpPath  --use a valid path
  put "This is a test" into url ftpPath
  if the result <> "" then
    answer the result
  end if
end doSave

Then, I added a menu with a Command-S "Save" option with this script:

on menuPick pWhich
  switch pWhich
  case "Save"
    doSave
    break
  case "Quit"
    --Insert script for Quit menu item here
    break
  end switch
end menuPick

Then, type Command-S twice - quickly.  POOF!  You get "error Previous request not complete".  Shouldn't the first Save complete before the second one is even dealt with?  What am I doing wrong?

Thanks in advance,
-Dan


More information about the Use-livecode mailing list