• 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
Re: Binding NSMenuItem state in Document-based app
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Binding NSMenuItem state in Document-based app


  • Subject: Re: Binding NSMenuItem state in Document-based app
  • From: Jerry Krinock <email@hidden>
  • Date: Mon, 9 Jun 2008 15:04:27 -0700

On 2008 Jun, 09, at 12:57, Quincey Morris wrote:

Doing this through bindings involves re-inventing a bit of stuff that NSResponder normally takes care of, but it need not be too difficult. For example, you could....

Or something like that.

Well, last year sometime I wanted to bind some menu items to values in the current document, as I believe you're trying to do. You can read of my saga in the list archives.


After you've considered Quincy's response, recall that bindings is an alternative which is supposed to make things simpler and reduce labor. I concluded that the bindings alternative does not fulfill its purpose when it involves menu items. Target/Action still works. For menu input, I target an action in FirstResponder, which will be the current active document. For setting menu status (the checkmark), I set a tag on the menu item and implement -menuNeedsUpdate. It's old- fashioned, but I found it to be simpler, cleaner and it works.

_______________________________________________

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: Binding NSMenuItem state in Document-based app
      • From: Steve Nicholson <email@hidden>
References: 
 >Binding NSMenuItem state in Document-based app (From: Steve Nicholson <email@hidden>)
 >Re: Binding NSMenuItem state in Document-based app (From: Quincey Morris <email@hidden>)

  • Prev by Date: Need help parsing a large text file one line at a time
  • Next by Date: Re: Need help parsing a large text file one line at a time
  • Previous by thread: Re: Binding NSMenuItem state in Document-based app
  • Next by thread: Re: Binding NSMenuItem state in Document-based app
  • Index(es):
    • Date
    • Thread