Finding out that a field has changed is not easy on the Palm OS, as it doesnt have a “Field Changed” event like Visual Basic et al have. Since I needed such a snippet in the new AutoSync version, I decided to share it right here:
case keyDownEvent:
//send NilEvent
EvtSetNullEventTick(TimGetTicks()+ 2);
break;
case nilEvent:
//Field MAY have changed
foo();
break;
Basically, this code is straightforward. Whenever an user enters a character, a null event gets added to the queue. Whenever you get a null event, there is a possibility that the field has changed!
Related posts:

Ok, your code works, but is a bit stupid… What about this:
case keyDownEvent:
if (FldHandleEvent(GetObjectPtr(form, fieldID_input), event))
{
// the edit field did something with the key – it’s changed
}