Re: NSTextField and bindings
Re: NSTextField and bindings
- Subject: Re: NSTextField and bindings
- From: Steve Sims <email@hidden>
- Date: Tue, 4 May 2004 17:43:37 -0400
On 4 May 2004, at 15:35, mmalcolm crawford wrote:
On May 4, 2004, at 11:48 AM, Steve Sims wrote:
However this just seems to give me the same results. When I put
breakpoints in my validator and setter methods I see that they are
both getting called when one would expect them to, and they seem to
do their job OK. My model ends up with valid data, which is good,
however my UI does not reflect the model, which is not so good.
This is a known bug (reported here at some point).
Damn. Do you know if anyone came up with a workaround for this problem?
Nevertheless, you are discouraged from changing values in validation
methods.
Well, the documentation seems to imply that doing this is OK. There's
three proper outcomes from KVV, as documented in
http://developer.apple.com/documentation/Cocoa/Conceptual/
KeyValueCoding/Concepts/Validation.html and the second is:
2. The object value is modified so that it is valid. In this case YES
is returned after setting the value parameter to the newly validated
value. The error is returned unaltered.
Indeed the first example given on this page modifies the value,
capitalising a string...
Steve
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.