Check stack before saving
Jeanne A. E. DeVoto
jeanne at runrev.com
Tue Apr 15 01:35:03 CDT 2003
At 11:01 PM -0700 4/8/03, mazzapaolo at liber wrote:
>How can I ceck if a stack has been modified?
>In other words, I need to check if a stack has been modified before
>asking the user to save the stack.
There's no all-in-one simple way to do it.
The best way is to set a global variable or custom property to false on
openStack, and set it to true any time the user makes any change you might
want to save. For example, if the user can type into fields, set the
variable or property on closeField. If the user can add data through menu
items, set it in the menuPick handler. And so on.
Then in the closeStackRequest handler, you can check whether the variable
or property is true or false. If it's true, ask the user to save changes.
Jeanne A. E. DeVoto ~ jeanne at runrev.com
Runtime Revolution Limited - Software at the Speed of Thought
More information about the use-livecode