how to get validation?
how to get validation?
- Subject: how to get validation?
- From: Marc Respass <email@hidden>
- Date: Wed, 13 Dec 2006 17:41:57 -0500
Hi All,
I have a Core Data (non-document) application which is very similar
to another app. The current app is not calling my validation method (-
validateUserInterfaceItem:) but the first app does. In both cases, I
have an NSObject subclass as a controller. The controller is the
delegate of the window. It has a window outlet which is connected. I
implement -windowShouldClose: which does get called. It calls
[managedObjectContext hasChanges] which returns yes and puts up an
alert. So I know that I am the delegate and that my MO is responding
properly but my validation method is not being called. In another
application (that works), I call -validateToolbarItem: and that gets
called.
Since this is not an Document-based app, I have to call [window
setDocumentEdited:YES] myself and I do it in the validation method
(is there a better place?). It's important for me to indicate that
the document is dirty rather than surprise the user with a "Want to
save?" dialog. I'm thinking that I missed something but I cannot
figure out what it is. Can anyone help?
Thanks
Marc
_______________________________________________
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