delete - main stack vs substack

Phil Davis revdev at pdslabs.net
Sat Jul 11 03:33:04 EDT 2009


jim sims wrote:
> Delete will purge a main stack from memory BUT will permanently delete 
> a substack (like gone forever).
>
>  I do not want to permanently delete a substack by mistake in an 
> all-purpose handler I am writing, would the following be enough to 
> make sure a stack is NOT a substack?
>
> if stack tStackInQuestion is in the mainStacks then delete stack 
> tStackInQuestion

Hi Jim,

To be more certain, I would say:
if stack tStackInQuestion is among the lines of the mainStacks then 
delete stack tStackInQuestion

This will prevent the deletion of substack "stack1" of mainStack 
"stack1main".

-- 
Phil Davis

PDS Labs
Professional Software Development
http://pdslabs.net




More information about the use-livecode mailing list