On 2009 Mar 13, at 01:44, Ben Trumbull wrote:

-validateForDelete: is ... not intended to double as -canDelete or - isDeleteable.

When I first started using Core Data I had the mistaken impression that the various -[NSManagedObject validateXXXX] methods were hooks into which I could place my validation code or "business logic", and things would "just work". But after playing with it for awhile, all I was able to get was sheets dropping over my document windows when I tried to save, saying stuff like "The document could not be saved. Multiple validation errors occurred."

I didn't think my users would appreciate those sheets any more than I did :O So, instead I do all my validation and model adjustments elsewhere, in custom setters or in response to notifications.

I don't believe that the -[NSManagedObject validateXXXX] methods have much use to the application programmer.

_______________________________________________

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