• 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
User interface validation doesn't work, right?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

User interface validation doesn't work, right?


  • Subject: User interface validation doesn't work, right?
  • From: Bill Cheeseman <email@hidden>
  • Date: Wed, 1 Jul 2009 17:24:16 -0400

For years, the "Implementing Validation" section of Apple's "User Interface Validation" document has said the following:

"Before it is displayed, a user interface item checks to see if its target implements validateUserInterfaceItem:. If it does, then the enabled status of the item is determined by the return value of the method. You can therefore conditionally enable or disable an item by implementing validateUserInterfaceItem: in the target object."

This has never been true. Right?

My custom window controller implements the action method for a button, so it is the button's target, and it also implements - validateUserInterfaceItem:, all according to the User Interface Validation document. But my -validateUserInterfaceItem: method is never called.

If I want it to be called automatically, by analogy to - validateMenuItem:, I have to override NSWindow's -update method, by analogy to -[NSMenu update]. In my override of -update, I have to do for myself what the document claims already happens -- or I have to observe NSWindow's -NSWindowDidUpdateNotification. Right?


--

Bill Cheeseman
email@hidden

_______________________________________________

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


  • Follow-Ups:
    • Re: User interface validation doesn't work, right?
      • From: mmalc Crawford <email@hidden>
    • Re: User interface validation doesn't work, right?
      • From: Keary Suska <email@hidden>
  • Prev by Date: Re: How Do I Statically Link to libcurl?
  • Next by Date: IKImageBrowserView reload data broken
  • Previous by thread: Re: Only allowing a file to be opened by one app
  • Next by thread: Re: User interface validation doesn't work, right?
  • Index(es):
    • Date
    • Thread