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 (Cocoa-dev@lists.apple.com)
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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]