Page 1 of 1
Finding out a list of open stacks
Posted: Wed Jul 03, 2013 2:48 pm
by andrewferguson
Hi everyone,
I am looking for a way to find out a list of all the current stacks that are open that are not LiveCode IDE stacks or plugins.
Thanks,
Andrew
Re: Finding out a list of open stacks
Posted: Wed Jul 03, 2013 3:12 pm
by Klaus
Hi Andrew,
your subject lines almost had it

...
## Well, simple and Livecode-like

put the openstacks into tStackList
## Get rid of revXXX stacks:
filter tStacklist without "rev*"
answer tStackList
...
Best
Klaus
Re: Finding out a list of open stacks
Posted: Wed Jul 03, 2013 3:18 pm
by andrewferguson
Hi Klaus,
Thanks! However I need to also filter stacks like the message box which do not have "rev" in their name.
Thanks,
Andrew
Re: Finding out a list of open stacks
Posted: Wed Jul 03, 2013 3:31 pm
by Klaus
OK:
...
filter tStacklist without "rev*"
filter tStackList without "Message Box"
...
That's it

No other Rev stacks without the REV prefix.
Hint:
Since plugins can be named anything, you may be out of luck to differ these from other stacks.
Maybe check front- and backscripts, too, but in general this is not trivial.
Re: Finding out a list of open stacks
Posted: Wed Jul 03, 2013 3:44 pm
by shaosean
You can also take a look at the
revLoadedStacks function..
Re: Finding out a list of open stacks
Posted: Wed Jul 03, 2013 4:32 pm
by Klaus
Ah, yes, did not know about these params to that function:
...
Parameters
xmlerr, can't find element - xmlerr, can't find element
xmlerr, can't find element - xmlerr, can't find element
xmlerr, can't find element - xmlerr, can't find element
xmlerr, can't find element - xmlerr, can't find element
...

Re: Finding out a list of open stacks
Posted: Wed Jul 03, 2013 5:43 pm
by andrewferguson
Hi,
Thanks! That works.
Andrew
Re: Finding out a list of open stacks
Posted: Thu Jul 04, 2013 6:28 am
by shaosean
I believe the different parameters are:
revLoadedStacks() -- shows all except the rev stacks
revLoadedStacks("all") -- shows them all
revLoadedStacks("preferences") -- shows stacks based on preferences settings (show/hide rev stacks)
Re: Finding out a list of open stacks
Posted: Thu Jul 04, 2013 12:48 pm
by andrewferguson
shaosean wrote:revLoadedStacks() -- shows all except the rev stacks
Thanks! That would work too.
Andrew