Responding to NSFormatter validation refusal in a table
Responding to NSFormatter validation refusal in a table
- Subject: Responding to NSFormatter validation refusal in a table
- From: Shamyl Zakariya <email@hidden>
- Date: Mon, 21 May 2007 16:09:46 -0400
I've written a couple custom NSFormatters for entering data into a
table view, and they work beautifully. When developing them, I wrote
a standalone app with just a single text field ( with the formatter
attached ) and I was able to track the formatter's refusal to
validate bad input via NSControl's delegate methods:
-control: didFailToFormatString: errorDescription:
-control: didFailToValidatePartialString: errorDescription:
So I was thinking I might give some feedback to the user when he
tries to enter bad data ( since my formatters output detailed &
friendly error strings ), but I can't find an equivalent for these
delegate methods in NSTableView or NSTableColumn, since they don't
derive from NSControl. I've poked about in the documentation and just
can't figure out what to do.
I know I could have the formatter itself send a notification of some
sort, but it seems like the delegate approach is "cleaner".
Any ideas? Is there some hidden object which is a control which I can
attach to as a delegate?
email@hidden
"this is, after all, one of those movies where people spend a great
deal of time looking at things and pointing."
From a review of _Fantastic Voyage_
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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