Hello, I am at wits end trying to resolve text field behavior in my application. I think the problem stems from a rookie coding scheme, but I know no better. The answer must be so basic that no one has reported the same problem.
The application’s function builds a long command argument string that is executed in Terminal with a do script. All of that works fine. The application’s menu has three tab views, each with up to twenty or so input objects as text fields and buttons. Each input object has an associated variable. These variables are used for building the command line string. The command string is shown on the dialog and is intended to be updated whenever any of the text fields and other objects change. There is a lot of on clicked, on end editing, on action, and on panel ended going on.
The problem is in the text fields, all of which have only end editing events associated. The text fields always start out working fine but sooner or later key presses do not register at all in the application until one changes the focus by mouse to another text field or to another object in the dialog, such as a button. At that instant all the unseen key presses flush out into exactly where ever they would have landed had they been registering. For example, every key press before a tab goes into the particular text field the focus would have been in. Key presses after the tab go into the text field where the tab would have sent the focus and so on. If all the unseen key presses were tabs, then you see the focus dancing from each focus point to the next.
Mousing out of a text field after starting to edit is what starts the problem. The problem does not manifest when one uses the return key or tab key to finish each text field edit before transferring focus to another text field. The application works perfectly as long as every text field edit is followed by a return key press or a tab key press.
Once started, the problem remains in that tab view for all the text fields. The problem clears when one switches to another tab view. Text field entry remains normal until one happens to start the problem again by mousing out of an edit.
I guess being able to clear the problem by switching tab views is a clue to the problem.
Would someone please explain what is going on? Thank you. AKS