IDE Save

Peter Haworth pete at mollysrevenge.com
Wed Dec 8 16:48:39 EST 2010


Thanks for the explanation.  Haven't tried the destroyStack property  
but using Close and Remove From Memory wants to close the stack file,  
not just the currently active stack window.

So I guess the only way to discard changes to a specific stack window  
is to either use Close/Remove From Memory or Quit, and deny the save  
option, is that right?


Pete Haworth

On Dec 8, 2010, at 1:22 PM, J. Landman Gay wrote:

> I think some of this is just a misunderstanding of what "save" does.  
> Saving writes the current state of the stack to disk, as you'd  
> expect, but it does not change the state of the stack that's still  
> in RAM.
>
> If the stack's destroystack property is false (the default setting  
> in prefs) then the stack isn't really removed from RAM when you  
> close it. It's just hidden and taken out of the message path. The  
> next time you open it, any changes you made will still be there  
> regardless of whether you wrote those changes to disk or not.  
> Destroystack only affects mainstacks. Substacks are never removed  
> from RAM until the mainstack is.
>
> So, if you make script or object changes and deny the Save dialog,  
> that doesn't mean that the cards or scripts will revert. If they are  
> still in RAM, they will retain whatever you last did to them.  
> However, if you choose "Close and remove from memory" from the File  
> menu, and say no when asked to save, then I think you'll find that  
> the next time you open the stack your changes will in fact have  
> disappeared.
>
> If you always want stacks removed from RAM when you close them,  
> reset the Preferences option to do that (Files & Memory pane,  
> "destroystack peroperty is set to true for new stacks".) For  
> existing stacks, set the property in the stack inspector. It won't  
> affect any substacks, but mainstacks will definitely removed when  
> they close, and your changes won't be there the next time the stack  
> opens.
>
> -- 
> Jacqueline Landman Gay         |     jacque at hyperactivesw.com
> HyperActive Software           |     http://www.hyperactivesw.com





More information about the Use-livecode mailing list