Re: Programmatically setting the value of a bound TextField
Re: Programmatically setting the value of a bound TextField
- Subject: Re: Programmatically setting the value of a bound TextField
- From: Felix Franz <email@hidden>
- Date: Wed, 1 Mar 2006 17:44:11 +0100
On Mar 1, 2006, at 4:22 PM, Ricky Sharp wrote:
On Mar 1, 2006, at 8:29 AM, Felix Franz wrote:
[textField setStringValue: newName];
Instead of using setStringValue: here, try using setValue:
instead. After all, you are binding to "value". setValue: should
have in its implementation the steps to notify bound objects of the
change.
Thanks for the tip, but unfortunately NSTextField does not respond to
setValue: ...
It would be nice to get the bindings of a given control. Then one
could simply test the
bindings object, keypath and options, and there would be no reason to
test Apple's
implementation. Poking around with the FScript object-browser,
[[textField _bindingAdaptor] binders] returns an Array of
NSValueBinders which contains
the relevant information ... but I learnt the hard way to not use
undocumented features :)
felix
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden