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: Ken Thomases <email@hidden>
- Date: Wed, 6 Aug 2008 00:57:31 -0500
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