Delete stack

Mark Schonewille m.schonewille at economy-x-talk.com
Wed Jun 27 14:45:23 EDT 2012


Hi Peter,

The application browser is unreliable and that's why I stopped using it years ago. To check that the stack was removed from memory, you use the following syntax in the message box:

put (there is a stack "<short name of the stack>")

I think that the application browser stores the long id of a stack somewhere and if you click on a stack in the application browser, it uses the long id to open that stack again. Also, whenever you view the list of substacks in the application browser, their mainstack is loaded back into memory to get access to the substacks.

I noticed something weird. If I make a new stack and a substack and save them to disk and subsequently delete the mainstack but not the substack, I can still open the substack with

go stack "<name of mainstack>"

and if I close it thereafter, the message box displays an error saying that the stack is corrupt (which isn't true). If I close the substack before the mainstack and then delete the mainstack, I get the error immediately and the mainstack doesn't show up again. Does your mainstack have any substacks?

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553

Use Color Converter to convert CMYK, RGB, RAL, XYZ, H.Lab and other colour spaces. http://www.color-converter.com

On 27 jun 2012, at 20:33, Peter Haworth wrote:

> I have a need to close a stack and remove it from memory by script and the
> dictionary says delete stack will do that if the stack referred to is a
> mainstack.
> 
> However, after executing the delete stack command (I've double checked to
> make sure I'm referring to the correct stack), the stack still shows up in
> the Application Browser.  Knowing that the Application Browser sometimes
> doesn't refresh itself, I clicked the stack but it still showed up and
> double clicking it opens it, so it's definitely still in memory.
> 
> I close all the substacks of the main stack before issuing the delete
> command.  The only other slightly unusual thing is that the main stack is
> initially opened invisible.  As an aside, why do stacks opened invisibly
> still show up in the Application Browser?
> 
> Pete
> lcSQL Software <http://www.lcsql.com>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the Use-livecode mailing list