Re: Error deleting a stack

2018-01-01 Thread Dr. Hawkins via use-livecode
On Mon, Jan 1, 2018 at 8:03 AM, Graham Samuel via use-livecode <
use-livecode@lists.runrev.com> wrote:
>The thing is, this used to work, probably in the LC 7 series.

I think that is the error here--it shouldn't be possible to delete the
stack containing a target while that target's script is running.

For my transient stacks, it's

send ("delete stack " & the short name of this stack) to stack "mcp" in 0



(where "mcp" is the main stack with routines, etc.)
-- 
Dr. Richard E. Hawkins, Esq.
(702) 508-8462
___
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


Re: Error deleting a stack

2018-01-01 Thread Mike Bonner via use-livecode
Try using a send in time to do the deletion?  Also, with the settings you
currently have, closing the stack SHOULD remove it from memory once any
running scripts are complete.

On Mon, Jan 1, 2018 at 9:03 AM, Graham Samuel via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Happy New Year to all!
>
> I have a bit of script that says
>
>  delete stack “myStack”
>
> This runs in a mainstack (not the one I’m trying to delete, “myStack”,
> which I’ll call the target), but the path by which this script was invoked
> was started in a menu item in the target. I get error 377 “stack locked or
> object’s script is executing”. The target stack’s ‘cantDelete' property is
> false, its ‘destroyStack' and ‘destroyWindow' properties are true.
>
> The thing is, this used to work, probably in the LC 7 series. It never
> went wrong, so presumably something’s changed in the engine. I accept that
> it doesn’t work now, but I need to get the target stack definitively out of
> memory, and I don’t think just closing it does that.
>
> Can anyone help with this?
>
> TIA
>
> 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
___
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

Error deleting a stack

2018-01-01 Thread Graham Samuel via use-livecode
Happy New Year to all!

I have a bit of script that says

 delete stack “myStack”

This runs in a mainstack (not the one I’m trying to delete, “myStack”, which 
I’ll call the target), but the path by which this script was invoked was 
started in a menu item in the target. I get error 377 “stack locked or object’s 
script is executing”. The target stack’s ‘cantDelete' property is false, its 
‘destroyStack' and ‘destroyWindow' properties are true.

The thing is, this used to work, probably in the LC 7 series. It never went 
wrong, so presumably something’s changed in the engine. I accept that it 
doesn’t work now, but I need to get the target stack definitively out of 
memory, and I don’t think just closing it does that.

Can anyone help with this?

TIA

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