Editing library script with TSNet "running"

Mark Wieder ahsoftware at sonic.net
Thu Dec 21 22:39:30 EST 2017

On 12/21/2017 07:10 PM, Sannyasin Brahmanathaswami via use-livecode wrote:
> If I try to edit handlers in a global backscript that has some TSNet callback handlers… I always get
> stack "lib_SivaSiva": execution error at line 1547 (Object: can't set scxript while it is executing), char 1

There is, as far as I can tell, (and I've ranted about this before) no 
way out of the "can't set script while it is executing" error. You have 
to quit LC if you can and lose any unsaved work.

> I have no way now to change this script, except to exit, quit LC and edit by hand, then reboot… cmd period doesn't help us. the IDE just  beeps
> if I shut down and comment out my call back (which is set by another script/behavior that init's the whole framework)
> # command netWorkTransferStatus
> # put "transfer identifier,status,downloaded,total download,uploaded,total upload" into tNetStatusItems
> # # see dictionary entry for definitions these are the 6 params passed by TSNet to the call back.
> # # for now we are just monitoring problems in param 2 - status
> # put param(2) into tRequestStatus
> # put "error,timeout" into tNetConnectionIssues
> # if tRequestStatus is among the items of tNetConnectionIssues then
> # put "You have connection issues: " & tRequestStatus into tNetUpdate
> # dialog_CustomMsg tNetUpdate
> # end if
> # end netWorkTransferStatus

 From that snippet of code it looks to me like you have set things up to 
get a netWorkTransferStatus callback for *every* tsNet call, no matter 
whether it was successful or not. I don't know how you have set up your 
initialization or other tsNet calls, but can you maybe cancel pending 
messages, perhaps by creating a handler that does this and then calling 
it from a button or message box?

  Mark Wieder
  ahsoftware at gmail.com

More information about the Use-livecode mailing list