Re: How to use a button to update an application with a text field value
Re: How to use a button to update an application with a text field value
- Subject: Re: How to use a button to update an application with a text field value
- From: Tron Thomas <email@hidden>
- Date: Wed, 06 Aug 2008 19:39:09 -0700
The only the the controller's action does in response to the button
action is call commitEditing. I'm not sure what you mean by having the
text field use the same action. I don't see any action method in the
Interface Builder connection dialog for the text field. There is
something called selector, I'm not sure what that is for.
In this case, the user interface is so simple there is no need to worry
about the user tabbing to another control. There is no other control
they can tab to.
Ken Thomases wrote:
On Aug 6, 2008, at 12:22 AM, Tron Thomas wrote:
The program is a simple game. The player answers questions by typing
something in and then either pressing enter or clicking on the button
to commit their answer. Although not likely it is, possible the user
may try to use the previous information as the answer to the current
question, so they might simply click the button to resubmit an answer
without editing anything.
Right, and? As far as I can see, your button's action method should
just call -commitEditing and then proceed to do whatever it is that
should happen when the user provides an answer. For what it's worth,
your text field should use the same action method. I do _not_ think
that the mere setting of the model value by the text field's binding
should be taken to mean the user has finished entering their answer.
For example, the user may simply have tabbed to another control.
Cheers,
Ken
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden