How to know when user has edited a field?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
How to know when user has edited a field?
I see that, on iOS, the message inputTextChanged is sent.
What about OSX? In general, how is this recognized, so the program can prompt the user to save the changes?
Thanks,
Sri.
What about OSX? In general, how is this recognized, so the program can prompt the user to save the changes?
Thanks,
Sri.
Re: How to know when user has edited a field?
Not sure its in the dictionary yet, but if you have 5.5 (I think that is when it showed up) you can use the textChanged message.
Re: How to know when user has edited a field?
Yes, I have LC 5.5
No, textChanged is not in the (downloaded) dictionary.
Thanks, sturgis!
Sri.
edit: not in the online dictionary either!
No, textChanged is not in the (downloaded) dictionary.
Thanks, sturgis!
Sri.
edit: not in the online dictionary either!
Re: How to know when user has edited a field?
It is in the dictionary in LC 5.5.2.
But maybe you are looking for "closefield", which seems to be a better time to ask the user to save his changes.
If this would happen every time if a new character is entered in a field, this MIGHT disturb the user a BIT!
Best
Klaus
But maybe you are looking for "closefield", which seems to be a better time to ask the user to save his changes.
If this would happen every time if a new character is entered in a field, this MIGHT disturb the user a BIT!

Best
Klaus
Re: How to know when user has edited a field?
Klaus:
closeField is no good when the user is filling out a form with a number of fields, e.g., Name, Date of Birth, etc.
We need to stop him only when he does something (like leaving the card) without saving the changes.
Of course, we don't disturb him after every character! I have a global variable gEdited which is initialized to false.
The textChanged message handled by the group containing the fields sets gEdited to true.
When the issue is resolved (saved or discarded), gEdited is reset to false.
Thanks,
Sri.
closeField is no good when the user is filling out a form with a number of fields, e.g., Name, Date of Birth, etc.
We need to stop him only when he does something (like leaving the card) without saving the changes.
Of course, we don't disturb him after every character! I have a global variable gEdited which is initialized to false.
The textChanged message handled by the group containing the fields sets gEdited to true.
When the issue is resolved (saved or discarded), gEdited is reset to false.
Thanks,
Sri.
Re: How to know when user has edited a field?
A follow-up question:
Is the textChanged message sent only on user input
or, even when the field text is changed by the program through script?
Thanks,
Sri.
Is the textChanged message sent only on user input
or, even when the field text is changed by the program through script?
Thanks,
Sri.
Re: How to know when user has edited a field?
Programming also triggers textChanged. As Klaus pointed out though, if you only want to remind prompt the user after they manually change the field, closefield is the way to go.
Re: How to know when user has edited a field?
Yes, I see that!
Thanks,
Sri.
Thanks,
Sri.