Rather than validate on closeField, I enter an edit mode in the form where all 
navigation buttons or commands are disabled, and the only thing the user can do 
is save or cancel. The Save button calls a global validate command that cycles 
through all the editable fields, checks for the existence of a property to see 
if the field is a validating one, then calls the validation function(s) for 
that field. The property can actually be a list of validations you might want 
to perform, like not empty, is a date, is a later date, etc. 

I do this because I HATED WITH A PASSION the Filemaker validation which would 
not let you proceed to another field until you entered valid data, even if you 
put empty. I found that at times I wanted to go to another table and copy 
information from there, but couldn't because I was locked into the field and 
couldn't leave without putting something valid in the field even if it was 
wrong. 

I felt like Dave in 2001 A Space Odyssey. "I'm sorry Bob, I'm afraid you can't 
do that." 

Bob


On May 4, 2011, at 12:17 AM, Bill Vlahos wrote:

> Terry,
> 
> Thanks this works. I also discovered that I can replace "focus on me" with 
> "select the text of me" in my script and that works too.
> 
> If the closeField message comes as a result of going to another card then I 
> get the dialog but it still goes to the new card anyway so the dialog doesn't 
> really work if the user wants to try it again.


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

Reply via email to