[ANN] chartsEngine - now on revSelect
J. Landman Gay
jacque at hyperactivesw.com
Fri Feb 20 13:34:52 EST 2009
Malte Brill wrote:
> Richard wrote:
> > Is the call to revLoadedStacks truly necessary?
> No, but convenient. revLoadedStacks will report the stack as available,
> also when it is closed, but in memory while the openStacks would not.
> What I was trying to do there (not thinking about the Metacard guys and
> gals I must admit), was:
> look if chartsEngine is in use -> all well, demo will work
> look if chartsEngine is open, but not in use -> start using it, demo
> will work
> look if it is in memory, but not open, nor in use -> start using it,
> demo will work
> look if it is not in memory at all -> prompt user to locate the folder
> it lives in, load it, start using
I think you can do this pretty easily with just regular code, since all
you want to know is if the stack is in RAM. Putting a stack in use more
than once won't hurt anything, so you don't need to worry about that.
Therefore, the only thing you need to check is if "there is a stack
<short stack name>". Don't use a file path for the check because that
will always return true if the file exists, but asking if there's a
stack by its short name will only search the memory space.
So if I've understood it right, this should work:
if there is a stack <myStack> then start using stack "mystack"
else <prompt user to find it>
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the Use-livecode