Why does 'delete stack' sometimes not work?
Richard Gaskin
ambassador at fourthworld.com
Wed Oct 19 11:45:11 EDT 2016
Graham Samuel wrote:
> I have a stack “myMainStack”, which has quite a few substacks
> - they’re palettes which user can open to access tools etc. All of
> them have their ‘cantDelete’ property set to false.
...
> If I then execute
>
> delete stack “myMainStack”
>
> from the message box, I get
>
>> Message execution error:
>>
>> Error description: Object: stack locked, or object's script is
>> executing
I'm able to see that error when the mainstack's cantDelete has been set
to true.
You note the substacks have their cantDelete set to false - is that also
true of the mainstack?
Earlier versions of your code explicitly set the cantDelete to true -
could some of that still be in play?
You may want to modify your delete statement with:
put the cantDelete of stack "myMainStack"
delete stack "myMainStack"
That will allow you to at least rule out cantDelete if you see "false"
in the Message Box.
--
Richard Gaskin
Fourth World Systems
Software Design and Development for the Desktop, Mobile, and the Web
____________________________________________________________________
Ambassador at FourthWorld.com http://www.FourthWorld.com
More information about the use-livecode
mailing list