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: Tue, 05 Aug 2008 21:33:36 -0700
The way things are now, when things work right, (i.e. when
objectDidBeginEditing: is not implemented) the call to commitEditing
will cause the text field's action to fire which will use the binding
between the text field value and the NSController's property to cause
the update to occur with no outlet/action interaction needed.
For what you are suggesting, I believe the controller would require an
IBOutlet instance variable that referred to the text field, so it could
send the stringValue message to that control and get its result. If I'm
going to take this approach, I might as well abandon the binding all
together. However, the binding works really slick without having to add
anything extra to the class.
I'd let to see if an elegant solution that only needs the bindings can
be found for this problem.
Graham Cox wrote:
Why not just grab the field's -stringValue: after you call
commitEditing? In other words pull the value from the field instead of
trying to provoke it into pushing its value somewhere. Much easier, no?
hth,
Graham
On 6 Aug 2008, at 1:45 pm, Tron Thomas wrote:
What can help me to implement the functionality I'm trying to develop?
_______________________________________________
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