• 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: Accessing an NSArrayController in another NIB file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Accessing an NSArrayController in another NIB file


  • Subject: Re: Accessing an NSArrayController in another NIB file
  • From: Claudio Mezzasalma <email@hidden>
  • Date: Sat, 19 May 2007 11:28:46 +0200
  • Resent-cc: email@hidden
  • Resent-date: Sat, 19 May 2007 11:31:59 +0200
  • Resent-from: Claudio Mezzasalma <email@hidden>
  • Resent-message-id: <email@hidden>
  • Resent-to: mmalc crawford <email@hidden>


Il giorno 19/mag/07, alle ore 02:47, mmalc crawford ha scritto:


On May 18, 2007, at 3:55 PM, Claudio Mezzasalma wrote:

Hello. As topic says, I'd need some help in binding to an NSArrayController located in another NIB file. Exactly, here's the scenario: I have a CoreData application, and I would need to bind the NSArrayController's canRead key (located in MyDocument.nib) to a main menu item (which is, obviously, located in MainMenu.nib); at least, I assume that bindings are the mechanism i need to do this. Am I wrong, or there's something I could actually do to this stuff?

You almost certainly don't want to bind to "a main menu item in the MainMenu.nib". You want to bind to whatever model value that affects.
If it's a preference, use NSUserDefaultsController. If it's something else, find a keypath to it (NSApp's delegate is typically useful here...).


mmalc

Let me add something i missed in the first message: my goal is to replicate a button's behavior in the main menu as well. Since I used a binding to enable/disable the button, according to NSArrayController canRemove (sorry, canRead was a typo), I thought I had to use the same mechanism.
_______________________________________________


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


  • Follow-Ups:
    • Re: Accessing an NSArrayController in another NIB file
      • From: mmalc crawford <email@hidden>
  • Prev by Date: Using bindings with NSPreferencePane
  • Next by Date: Re: Dock icon removal. and NSStatusBar
  • Previous by thread: Re: Accessing an NSArrayController in another NIB file
  • Next by thread: Re: Accessing an NSArrayController in another NIB file
  • Index(es):
    • Date
    • Thread