• 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: edits are committed even when -control:isValidObject: returns NO
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTextField: edits are committed even when -control:isValidObject: returns NO


  • Subject: Re: NSTextField: edits are committed even when -control:isValidObject: returns NO
  • From: Quincey Morris <email@hidden>
  • Date: Thu, 11 Jul 2013 13:36:01 -0700

On Jul 11, 2013, at 13:01 , Matthew LeRoy <email@hidden> wrote:

> I don't feel that I am relying on the delegate methods to capture any state change[…]

I wasn't suggesting that you are doing anything wrong, rather that there's a more positive point of control.

> I assumed that the field editor would not commit the edit (that is, call setObjectValue:) until after calling control:isValidObject:, and even then only if that method returns YES.

I don't know, but this seems like an unlikely assumption. The "objectValue" property *is* the value that the text field contains, and I doubt that there's any API contract that it's a validated value.

Note that you've used "commit" in an unusual sense, in Cocoa terms. In the Apple documentation, "commit" means to transfer the raw value from a text field to the data model. The communication between the field editor and the text field is something of an implementation detail, and probably doesn't follow as clear a protocol as you would wish.

_______________________________________________

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: [SOLVED] NSTextField: edits are committed even when -control:isValidObject: returns NO
      • From: Matthew LeRoy <email@hidden>
References: 
 >NSTextField: edits are committed even when -control:isValidObject: returns NO (From: Matthew LeRoy <email@hidden>)
 >Re: NSTextField: edits are committed even when -control:isValidObject: returns NO (From: Keary Suska <email@hidden>)
 >Re: NSTextField: edits are committed even when -control:isValidObject: returns NO (From: Matthew LeRoy <email@hidden>)
 >Re: NSTextField: edits are committed even when -control:isValidObject: returns NO (From: Quincey Morris <email@hidden>)
 >Re: NSTextField: edits are committed even when -control:isValidObject: returns NO (From: Matthew LeRoy <email@hidden>)

  • Prev by Date: Re: NSTextField: edits are committed even when -control:isValidObject: returns NO
  • Next by Date: Re: CATiledLayer requesting tiles that are way out of view bounds
  • Previous by thread: Re: NSTextField: edits are committed even when -control:isValidObject: returns NO
  • Next by thread: Re: [SOLVED] NSTextField: edits are committed even when -control:isValidObject: returns NO
  • Index(es):
    • Date
    • Thread