Using LC8.1.1 rc2, I’ve got a mainstack which I want to remove entirely from my 
project before replacing it with a template stack of the same name. The script 
to do this is in a library originating from another mainstack. For the target 
stack I have set the ‘cantDelete’ to false, and the ‘destroyStack’ and 
‘destroyWindow’ to true. If my script just says
  close stack “myStack”

then the stack window closes, but I think the stack is still in RAM - at least 
an ‘exists’ test says so (it’s not clear from the dictionary if ‘exists’ is 
supposed to work on stacks), and indeed the template stack doesn’t replace the 
original. If I add another line

 delete stack “myStack”

I get an error 370 (object: stack locked, or stack’s script is executing). But 
it’s not locked. I don’t even know how to lock a stack, unless it’s by setting 
its ‘cantDelete’ to true. There are no ‘closeStack’ handlers in the target 
stack.

Attempts to turn this into a simple recipe have failed, but it’s a real 
problem. What I want to do (I know I’ve asked before) is to execute the same 
code as the IDE does for ‘close and remove from memory’.

Any ideas welcome.

Graham
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to