Detect when a field changes

Mark Wieder mwieder at
Tue Nov 19 12:04:54 EST 2013


Tuesday, November 19, 2013, 6:38:16 AM, you wrote:

> 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?

That's my take on this as well. Backward compatibility would break in
some serious ways if the textChanged message were triggered also in
the case of text changes by script. If you're changing a field's text
by script then by default you already know the text is changing. If
you need to have something happen to text whether the change came from
the engine or from a script, I would deal with this situation thusly:

on textChanged
end textChanged

on whatever
  put someText into someField
end whatever

-Mark Wieder
 ahsoftware at

More information about the Use-livecode mailing list