- Select the first item under PLACES.
- Press the “-” button to remove the selected item.
- Notice the subview to the right does not change.
In order to see what is intended, change the following code:
NSArray *selection = [treeController selectedObjects];
BaseNode *node = [selection objectAtIndex:0];
into
NSArray* selection = [treeController selectedNodes];
BaseNode* node = [[selection objectAtIndex:0] representedObject];
Since my tests are being run on Mac OS X 10.5.7, I can’t say for sure, but this change may be due to a bug between selectedObjects and selectedNodes or due to the change that happened in 10.4 in [NSTreeController -remove] where the action was deferred until the next runloop iteration.
No comments:
Post a Comment