• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
how to get validation?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: init char buffer to null
  • Next by Date: Re: Database Application?
  • Previous by thread: Re: Database Application?
  • Next by thread: Moving subviews to other window
  • Index(es):
    • Date
    • Thread