When has a field changed?

Ken Ray kray at sonsothunder.com
Tue Oct 25 22:02:53 EDT 2011


On Oct 25, 2011, at 7:30 PM, Keith (Gulf Breeze Ortho Lab) wrote:

> Hi All,
> 
> Was following this thread and tried the instructions (see below),  just for the fun of it, and it worked fine. I set a "bogus" field so that it was not visible, then simply set the focus to this hidden field upon mouseUp. Works like a charm and activates the closeField of the desired field…

This is the same as issuing "select empty" or "focus on <something else>" - in both cases it forces the closeField (or exitFIeld message if the field hasn't changed) to the target field. However it's still not bulletproof, however, because you can paste text from the clipboard into a field and then click out of it and the field does NOT receive a closeField; it receives and exitField instead. So Mark's approach that he posted (with or without the MD5 hash) is probably the best: grab either the field contents or an MD5digest of the contents on open field, and then check the same thing on closeField AND exitField to let you know if something's changed. 

Also note that even THAT is not bulletproof (since if you have messages locked during any of this you may/may not get the messages you're looking for), but it's about as close as you can get. 

:D


Ken Ray
Sons of Thunder Software, Inc.
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/	




More information about the use-livecode mailing list