Bindings master/detail question
Bindings master/detail question
- Subject: Bindings master/detail question
- From: email@hidden
- Date: Mon, 30 Oct 2006 10:27:49 +0100
Hi,
Like many applications, my app has a master / detail interface, much
like iTunes:
I have a table containing playlists (bound to an NSArrayController).
Based on the selection of the playlist, there is another table view
that displays the songs. This table is bound to another
NSArrayController (with the contentSet binding bound to the selection
key of the first NSArrayController). This works like a charm.
The problem is that I'd like to allow multiple selection in the
playlist table, and reflect this multiple selection in the songs
table. In other words, the user can select multiple playlists and
that should result in the other table showing songs for all selected
playlists. Therefore, I bound the contentArray binding of the songs
NSArrayController to the selection of the playlist NSArrayController
using the @unionOfSets.songs keypath. Again, this works fine: when
selecting multiple playlists in the master table, all relevant songs
are displayed in the other table.
A problem arises when adding or deleting songs (using buttons wired
to the standard songs NSArrayController actions). Then I get the
following error:
Error setting value for key path email@hidden of
object <PlaylistController: 0x38c4f0>[entity: Playlist, number of
selected objects: 1] (from bound object <SongsController: 0x38ac10>
[entity: Song, number of selected objects: 1]): [<Playlist 0x355c80>
valueForUndefinedKey:]: this class is not key value coding-compliant
for the key @unionOfSets.
I'm really puzzled how it's possible that this setup works fine when
selecting and displaying, but can't be used to add or remove songs.
Thanks in advance for any advise you can provide.
Peter
_______________________________________________
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