IDE Save

J. Landman Gay jacque at
Wed Dec 8 16:22:47 EST 2010

On 12/8/10 3:00 PM, Peter Haworth wrote:
> The standalone is a new situation for me but I have experienced perhaps
> a dozen instances of missing saves in the couple of years I've been
> using Rev/LC. To be clear, I'm talking about script edit changes here
> not card layouts or object property changes. I definitely try to save
> more often these days and I also have Time Machine backing up every hour
> so these happenings cause less grief now than they used to but
> unfortunately that make it hard for me to come up with a recipe to
> reproduce them.
> In fact, there is the opposite problem with changing the layout of a
> card - changes like that seem to take immediate effect even if you say
> you don't want to save changes when you close the card! Add a control to
> a card, close the card and request "Don't Save" then open it again. The
> control will still be there. Same problem if you delete a control, or
> move a control.
> And it's not just layout changes. If I change the name of a control on a
> card using the property inspector, close the card and select "Don't
> Save", then open the card again, the control has the changed name not
> the original one. I've never understood just exactly what it is that
> gets saved when you close a card in the IDE. Sure isn't the layout or
> control properties, they're already saved . Maybe it's the data content
> of the card?

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
HyperActive Software           |

More information about the Use-livecode mailing list