NSTableView and NSArrayController with "Handles Content As Compound Value" - won't select new items in Table View
NSTableView and NSArrayController with "Handles Content As Compound Value" - won't select new items in Table View
- Subject: NSTableView and NSArrayController with "Handles Content As Compound Value" - won't select new items in Table View
- From: Alex Rainchik <email@hidden>
- Date: Wed, 13 Feb 2013 00:26:38 -0600
Hello,
I have a typical NSTableView and NSArrayController confguration, with Array
Controller's Content Array bound to NSMutableArray called "usersArray"
What I'm trying to do is to have an KVO observer setup, so every time
usersArray is changed I dump it to NSUsersDefault as a way to store it for
the
future use.
What I found out is that if I do not select "Handles Content As Compound
Value"
option in Content Array binding - my observer is called when objects are
added
or deleted in Table View, but not when they are modified.
If I enable "Handles Content As Compound Value" - everything works fine,
with
the exception of new objects in Table View are not getting selected on
insertion. Is there a way to fix that? I'm adding new objects in Table View
by
linking "Add" button to add: method in Array Controller.
I've tried binding Array Controller's Content Array directly to Shared Users
Defaults with exactly the same results - have to enable "Handles Content As
Compound Value" option and that breaks highlighting/selecting newly inserted
object in Table View.
Please advise :)
Thank you!
_______________________________________________
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