I have written a stack that stores information in another stack (ie - the main stack writes and retrieves inforamation to and from another stack - data stack). During the course of using the stack, the stack that holds the information is copied and stored in a 'data folder' (ie - each stack represents information related to a person and is labeled as such). I never open the stacks - just copy them, change their names, and 'put' and 'get' information from fields on the stacks. I've set the stack - data stacks - to 'purge' on closing and this doesnt help. I am not surprised since I never 'open' the stacks and have checked in the process of debugging and the stack(s) in question are not listed in the openStacks. I have decided to use stacks since the information can change frequently and deleting and rewriting text files seemed to be a poor choice.
Any suggestions would be helpful.
Thanks,
John
Problem with error message "Another Stack is open"
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Hi John,
As soon as you refer to a stack, it is loaded into memory, regardless of whether you use the open or go commands.
it might seem weird, but if you delete the stack from memory after saving it, you can load the next stack without problems.
Best,
Mark
As soon as you refer to a stack, it is loaded into memory, regardless of whether you use the open or go commands.
it might seem weird, but if you delete the stack from memory after saving it, you can load the next stack without problems.
Code: Select all
save stack x
close stack x
open stack x -- other stack x
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Thanks - regarding Error, another stack already open ...
I tried it and it worked. Although I dont open the stack, I guess when I 'put' or 'get' stuff from it, I need to 'close' it. Thanks for your help.
Hi JS,
Actually, I believe I wanted to write
But if you have the destroyStack property of your stacks set to true, it shouldn't matter.
Best,
Mark
Actually, I believe I wanted to write
Code: Select all
save stack x
delete stack x
open stack x -- other stack x
Best,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode