• 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 a controller not in my nib, how?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: binding to a controller not in my nib, how?


  • Subject: Re: binding to a controller not in my nib, how?
  • From: "Sean McBride" <email@hidden>
  • Date: Sat, 3 Dec 2005 20:45:16 -0500

marquis logan (email@hidden) on 2005-12-02 21:05 said:

>you could use a key path through "file's owner" and have multiple
>array controllers bound to the same content array; it would be
>beneficial to use kvc compliant accessors to manipulate this array.

Well, I've made it work that way. One NSArray and a different
NSArrayController in each NIB.

But I'm hoping to take it even further and have just one
NSArrayController. It almost works, but not quite.

In MainMenu.nib I have an NSArrayController and MyAppController which is
my app's delegate and has an outlet to the NSArrayController. In
MyWindow.nib I have a window with widgets that I want to bind to that
NSArrayController. Say I take a textfield, I've bound it like so:

Bind to: Shared Application
Controller Key: -
Model Key Path: delegate.myArrayController.selection.fullName

or even

Model Key Path: delegate.myArrayController.arrangedObjects.@count

Both work, great!

But if I bind an NSTableColumn like so:

Model Key Path: delegate.myArrayController.arrangedObjects.fullName

The table is empty, shouldn't that work??

Thanks!!

--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Mac Software Designer Montréal, Québec, Canada


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >binding to a controller not in my nib, how? (From: "Sean McBride" <email@hidden>)
 >Re: binding to a controller not in my nib, how? (From: marquis logan <email@hidden>)

  • Prev by Date: Re: CoreData - large data set is slow to load on app launch - optimisation tips?
  • Next by Date: Re: Is Apple's singleton sample code correct?
  • Previous by thread: Re: binding to a controller not in my nib, how?
  • Next by thread: changing brightness and contrast in an nsimage
  • Index(es):
    • Date
    • Thread