I'm curious as to the best (or a) way to achieve the following:

- I have a Core Data model set up with validation of various kinds
(non-optional values, ranges, regexs etc.) on attributes.
- I have a table based UI showing these entities for viewing and editing.

I would like to make the background colour of my table cells change colour
(maybe to yellow or red) if the value therein does not validate, according
to the Core Data constraints of course.

Now, it's easy enough to set up the basic validation protocol, but this
seems to assume you want to put up an error of some kind (i.e. a sheet) when
validation fails.
What I _think_ I'd like is for the regular binding validation process,
perhaps even with "Validates immediately", to somehow get state into my
(presumably custom) cell telling it the value is invalid so I can set a
visual cue.

I definitely want the regular Core Data validation process to propagate and
drive this, rather than having to set formatters on all my cell (or
something) and manually figure out validation by some means.

Is there a slick way to do this, or is does this sort of thing require a lot
of work to introduce custom stringy bits to get per-cell validation?

Thanks!

-- Luke
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to