• 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: No validation with a bound NSTableView and custom NSFormatter
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: No validation with a bound NSTableView and custom NSFormatter


  • Subject: Re: No validation with a bound NSTableView and custom NSFormatter
  • From: Kyle Sluder <email@hidden>
  • Date: Tue, 01 May 2012 14:55:30 -0700

On May 1, 2012, at 2:47 PM, Quincey Morris wrote:

> On May 1, 2012, at 14:23 , Ben Kennedy wrote:
>
>> I have an NSTableView whose data source is bound to an NSArrayController.  To one of its columns (displaying a custom type) I have attached a custom NSFormatter subclass.  The NSFormatter correctly returns NO from getObjectValue:forString:error: if the supplied string is not acceptable.  Despite this, however, validation is not enforced; when tabbing out of the field, the table view carries on and just assigns a null value to the corresponding property.
>
> Double-check that "Validates immediately" is checked for the binding. Counter-intuitively, this doesn't mean "immediately" in the sense of every keystroke, but "immediately" in the sense of when editing ends. If it's not checked, validation is presumably deferred until an entire view's worth of fields has been entered.

That seems to be at odds with the Bindings documentation: https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/CocoaBindings/Concepts/MessageFlow.html

The validation should be triggered as soon as the text field tries to commit editing.

--Kyle Sluder
_______________________________________________

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

  • Follow-Ups:
    • Re: No validation with a bound NSTableView and custom NSFormatter
      • From: Quincey Morris <email@hidden>
References: 
 >No validation with a bound NSTableView and custom NSFormatter (From: Ben Kennedy <email@hidden>)
 >Re: No validation with a bound NSTableView and custom NSFormatter (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: No validation with a bound NSTableView and custom NSFormatter
  • Next by Date: Re: No validation with a bound NSTableView and custom NSFormatter
  • Previous by thread: Re: No validation with a bound NSTableView and custom NSFormatter
  • Next by thread: Re: No validation with a bound NSTableView and custom NSFormatter
  • Index(es):
    • Date
    • Thread