A question I asked a while back about returning focus to a text field was answered and I can make it work, kind of…
I can get the focus to the field I need but the only way I can do it is to remove the return key function from a button, which I’d rather not do. Otherwise the focus remains in the text field last selected. Not all text fields are always used in my app.
Just to clarify… Do you have a button that when clicked sets the focus properly but when you click the button by pressing the return key the focus stays in the last edited text field?
If so, this seems to be a glitch.
on clicked theObject
tell window of theObject to set first responder to text field "t1"
end clicked
when clicking the Button or when hitting return when the button is first responder then everything works fine, but when an other text field is first responder and you hit return, then the first responder flashes for a short time to the new text field, but then comes back to the text field, that was first responder. Correct?