Page 1 of 1

how to delete a (sub)stack upon closing its window?

Posted: Tue Dec 18, 2007 9:08 pm
by rozek
Hello!

I'm currently trying to delete a (temporary) (sub)stack when its window is closed. Code like the following

local thisStack
put the long name of this stack into thisStack

create stack "TestStack"
set the MainStack of stack "TestStack" to thisStack
set the destroyStack of stack "TestStack" to true

does not have the desired effect: the stack remains in memory and can be inspected using the Application Browser.

How do I get rid of it?

Thanks in advance for any help!

Posted: Tue Dec 18, 2007 9:10 pm
by rozek
Just as an additional remark

trying to

on closeStack
delete this stack
end closeStack

just produced an error message...

Posted: Tue Dec 18, 2007 9:12 pm
by rozek
Another remark:

the cantDelete property of the stack is set to false

Posted: Tue Dec 18, 2007 9:36 pm
by rozek
Strange...

for some reason (which I don't understand) the code shown above seems to work now...however, I now get a warning dialog which asks me to confirm the stack deletion.

How do I get rid of the confirmation dialog (in this special situation)?