Do you want to save changes to this stack ..... ?
J. Landman Gay
jacque at hyperactivesw.com
Wed Mar 1 16:33:50 EST 2006
Francis Nugent Dixon wrote:
> Questions :
> 1 - Under what conditions does Revolution ask me the question "Do you
> want to save the changes ", or more simply, what constitutes "a change"
> ? The answer once seemed clear to me, but maybe there are things I don't
> know ! As an example, if I change the contents of a field, I get the
> request to save, but if I change the labels from English to French (by
> buttons), I don't get the request to save. Yet I made modifications to
> the stack ! And when I execute the stack again, label modifications have
> been lost. Curiouser and Curiouser !
The state of the stack is tracked by the IDE, not by the engine.
Revolution, in general, considers a change to be anything you do
manually that alters the content of the stack: creating an object,
changing the text of a field by typing into it, changing an object's
properties by using the inspector, etc. Changes that your own scripts
make to a stack are not caught by the IDE. Therefore, if you change the
label in the inspector, Rev notices. If you change the label from a
script in a button, Rev does not notice.
In other words, if any of your own scripts make changes, the IDE cannot
see them. The engine doesn't pay attention to changes; only the IDE does
> 2 - Are the conditions the same under Stack Runner ?
No. StackRunner has no change-tracking in it at all. It won't notice any
changes you make, whether they are manual or scripted, and it never asks
if you want to save.
> And the most important question :
> 3 - If I consider that I have made no changes, and Revolution doesn't
> agree, can I bypass the "Do you want to save?" request (maybe there is a
> gREV global that I can tinker with) ?
There probably is a global or a property, but I don't know offhand what
it is called. Someone else may have looked into it.
You could avoid the problem by just writing your own "save" handler and
calling that before closing the stack, but it isn't as automatic as you
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the Use-livecode