Detect when a field changes

Robert Brenstein rjb at robelko.com
Tue Nov 19 09:38:16 EST 2013


On 19.11.2013 at 3:43 Uhr +0000 Terry Judd apparently wrote:
>
>I think I'm with those who would prefer that changing the contents 
>of the field by script would also trigger the textChanged message. 
>If you don't want to trigger the message then you can always 
>lockMessages.
>
>Terry...

But then, instead of having extra line to send the textChanged or 
fieldClosed we have to add lockMessages (and possible 
unlockMessages). Considering that the current definition is the 
prevalent use, there would be more people having to remember to add 
extra line(s) than now and, as I pointed out, loops are possible, so 
additional code to prevent them might be needed as well. I fail to 
see the benefit unless we get two messages, textChanged and 
userChangedText.

Bill, if you always need to call the extra function after changing 
the field, why don't you write a function that does both and then you 
have only a single line to enter and nothing to forget?

RObert




More information about the use-livecode mailing list