• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSTextField and bindings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


  • Follow-Ups:
    • Re: NSTextField and bindings
      • From: mmalcolm crawford <email@hidden>
References: 
 >NSTextField and bindings (From: Steve Sims <email@hidden>)
 >Re: NSTextField and bindings (From: Fritz Anderson <email@hidden>)
 >Re: NSTextField and bindings (From: Steve Sims <email@hidden>)
 >Re: NSTextField and bindings (From: mmalcolm crawford <email@hidden>)

  • Prev by Date: Re: Screen artifact from sheets in document window
  • Next by Date: Re: Subclassing NSToolbar is *fully* really good
  • Previous by thread: Re: NSTextField and bindings
  • Next by thread: Re: NSTextField and bindings
  • Index(es):
    • Date
    • Thread