Re: How does an NSTextField know that it's value has changed?
Re: How does an NSTextField know that it's value has changed?
- Subject: Re: How does an NSTextField know that it's value has changed?
- From: Joanna Carter <email@hidden>
- Date: Tue, 13 Apr 2010 22:14:22 +0100
Hi Brian
> And this is your problem. If you change the value of a text field by typing into it, then that value is sent to the property on the model, but this is not true for programatic changes. The MVC pattern and bindings work when you change the value in the model programatically, not the text field. As long as the property in the model is KVO compliant, the text field will follow the changes to the property.
In other words, connect both your up and down buttons to actions on the controller, in which you set the value of the property to which the text field is bound.
Joanna
--
Joanna Carter
Carter Consulting
_______________________________________________
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