0
votes

I have a NSTableView and a NSArrayController for the NSTableView.

there is only one column in the table,"name"

at first, user open one file, in the arrayController will be @[@{@"name":@"1"},@{@"name":@"2"}]

after sometime, the user opened another file, now the content of array controller should be @[@{@"name":@"x"},@{@"name":@"y"},@{@"name":@"z"}].

how can I bind the new data to the NSTableView,(not add)?

1

1 Answers

0
votes

You don't need to do anything if you have the bindings set up right. The content array of the array controller should be bound to an array (the one you show in your post), so when you change, or add to that array, the array controller's arranged objects will automatically change -- this doesn't require any "rebinding".