Visual feedback of invalid cell data from Core Data - how to?
Visual feedback of invalid cell data from Core Data - how to?
- Subject: Visual feedback of invalid cell data from Core Data - how to?
- From: Luke Evans <email@hidden>
- Date: Sat, 19 Mar 2011 13:44:18 -0700
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 (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