• 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 To Array Controller From A Different XIB?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Binding To Array Controller From A Different XIB?


  • Subject: Re: Binding To Array Controller From A Different XIB?
  • From: I.Savant <email@hidden>
  • Date: Thu, 29 Oct 2009 14:26:27 -0400

On Oct 29, 2009, at 1:57 PM, Quincey Morris wrote:

The natural mechanism for controlling the appearance of such a menu item (including its text, its check mark and its enabled state) is to use interface validation (validateUserInterfaceItem: or validateMenuItem:) in each possible controlling class.

The controlling object in this case, where the dependency is ultimately on a NSArrayController property, is likely to be either the NSDocument subclass, or the relevant window controller (set as a window delegate to get it into the NSResponder chain).

Of course you're right that it would probably be easier for menus. It is definitely cleaner from an architectural standpoint to have one point of entry to your the abstract idea of "the active document" from the menu system.


The approach I mentioned is far more useful for, say, a shared "Inspector" pane, whose UI reflects something about the active document (or some selected item therein). But as I said in my response. It's possible and even easy in some cases do do as the OP requested. :-)

--
I.S.




_______________________________________________

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


References: 
 >Binding To Array Controller From A Different XIB? (From: Chunk 1978 <email@hidden>)
 >Re: Binding To Array Controller From A Different XIB? (From: "I. Savant" <email@hidden>)
 >Re: Binding To Array Controller From A Different XIB? (From: Quincey Morris <email@hidden>)

  • Prev by Date: re: EXC_BAD_ACCESS when migrating a store, but only sometimes...
  • Next by Date: Re: Showing activity indicator during data download
  • Previous by thread: Re: Binding To Array Controller From A Different XIB?
  • Next by thread: How to increase the height of NSTableView Header
  • Index(es):
    • Date
    • Thread