Also remember that closeField does not get sent to a field if the user clicks 
on a button before exiting the edited field, at least on the Mac OS. 

Bob


On Jan 3, 2012, at 2:12 PM, J. Landman Gay wrote:

> On 1/3/12 3:51 PM, Sivakatirswami wrote:
>> Without scripting every field, if you have a data entry system with
>> multiple fields, and you want to flag the user that he or she made a
>> change but did not save before click "next" or "Previous" to go to
>> another record... what would be the simplest method to check that the
>> card was modified to then prompt the user "Do you want to save your
>> changes?"
> 
> In the card script (or stack script, depending on how the stack is laid out), 
> trap the "closefield" message, which is only sent when field content changes. 
> Set a script local or global variable to true. Then on closecard, check the 
> variable and ask to save if it's true. Then set the variable back to false.
> 
> The only catch here is that if any of your fields have closeField handlers, 
> they'd need to pass the message so that the card could catch it.
> 
> -- 
> Jacqueline Landman Gay         |     [email protected]
> HyperActive Software           |     http://www.hyperactivesw.com
> 
> _______________________________________________
> use-livecode mailing list
> [email protected]
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to