• 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: Problem with validation (reproducible with EventManager example)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with validation (reproducible with EventManager example)


  • Subject: Re: Problem with validation (reproducible with EventManager example)
  • From: email@hidden
  • Date: Sat, 3 Jun 2006 21:27:32 +0200

I just looked how it is implemened by Apple in iPhoto for the Keywords in the
Preferences window:

After inserting a row, you can't set the value to an empty string. I thought
there should be an automatic and easy way to check that, before CoreData checks
it when saving to the store.


Marc



On Jun 3, 2006, at 11:57 AM, email@hidden wrote:

I think the validation should occur every time the user clicks on "Add", so it
isn't possible to add a second empty line. I activated "validates immediately"
for the value bindings of the columns, but it don't work.


Validates Immediately applies to new values set using the UI element...
If you allow your object to come into being in an invalid state, then it's up to you to remedy that.


Can someone help to implement the desired functionality?

It's up to you to determine what functionality you require. Do you want to always deny a change in selection if the currently-selected item is invalid (you probably also want to disable the Add button until a newly-inserted object is valid)? That could itself become frustrating...

One option is to ensure that your new objects are valid on insertion, either by supplying suitable values on creation, or by -- for example -- using a sheet for new data entry (see <http://homepage.mac.com/ mmalc/CocoaExamples/DepartmentAndEmployees2.zip>).

mmalc





_______________________________________________ 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
  • Follow-Ups:
    • incompatible Pointer...
      • From: Mark Butler <email@hidden>
    • Re: Problem with validation (reproducible with EventManager example)
      • From: mmalcolm crawford <email@hidden>
References: 
 >Problem with validation (reproducible with EventManager example) (From: email@hidden)
 >Re: Problem with validation (reproducible with EventManager example) (From: mmalcolm crawford <email@hidden>)

  • Prev by Date: Re: KVO bug?
  • Next by Date: Re: Problem with validation (reproducible with EventManager example)
  • Previous by thread: Re: Problem with validation (reproducible with EventManager example)
  • Next by thread: Re: Problem with validation (reproducible with EventManager example)
  • Index(es):
    • Date
    • Thread