• 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
Updating an NSBrowser as binding selection changes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Updating an NSBrowser as binding selection changes


  • Subject: Updating an NSBrowser as binding selection changes
  • From: Will Koffel <email@hidden>
  • Date: Tue, 2 May 2006 22:16:26 -0400

I have an NSBrowser bound to an NSTreeController. The tree controller is bound to a keypath within an NSArrayController's selection.

So say an array of Movies, the TreeController has a contentArray binding to the current Movie selection keypath 'credits', which has children 'actors' and 'producers', each with children of people's names.

So the browser will look something like:

---------------------------
               | Actor1   |
*Actors*    -->| Actor2   |
Producers   -> | Actor3   |
               | Actor4   |
---------------------------

The problem is that when I change the selection of the NSArrayController (select the next Movie), this browser doesn't update. I believe it's updating the top-level, but that has "Actors" and "Producers" for all movies, so it doesn't really change the first column. The second column refuses to update unless I click manually in the first column to force the update.

I can't seem to find a delegate to notify me if the NSArrayController didChangeSelection, and I also can't figure out a way to just force the NSBrowser to update all columns whenever it's bound data changes. Any hints from experienced binding gurus out there? Do I just need to manage this manually by creating an extra indirection step wherever an action might affect the movie selection?

Thanks in advance!

-Will

_______________________________________________
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


  • Prev by Date: Re: Refactoring tools available for Cocoa / ObjC?
  • Next by Date: AuthSample - performCommand Fails
  • Previous by thread: Re: CoreData: Fetch instances of entity without returning instances of subentities?
  • Next by thread: AuthSample - performCommand Fails
  • Index(es):
    • Date
    • Thread