Skip navigation.
 
mlRe: outlineViewSelectionDidChange not called
FROM : Jonathan Dann
DATE : Mon Mar 31 22:38:40 2008

Hi Adam,

I've found that programmatically changing the selection using the tree 
controller's -setSelectionIndexPath(s): will always send the 
NSOutlineViewSelectionDidChangeNotification, you might want to have a 
look here

http://www.wilshipley.com/blog/2006/04/pimp-my-code-part-10-whining-about.html

in particular the -indexPathToObject: method, which allows you to 
write things like this:

[treeController setSelectionIndexPath:[treeController 
indexPathToObject:anObject]];

which then send the note.  In 10.5 the NSTreeNode has an -indexPath 
method, but (AFAIK) there's still not an out-of-the-box way of taking 
an arbitrary object in your model and getting its indexPath in the 
tree. I've requested an enhancement : rdar://problem/5832408

Happy hunting,

Jon

Related mailsAuthorDate
mloutlineViewSelectionDidChange not called Adam Gerson Mar 25, 05:18
mlRe: outlineViewSelectionDidChange not called Jens Alfke Mar 25, 05:49
mlRe: outlineViewSelectionDidChange not called Adam Gerson Mar 25, 06:42
mlRe: outlineViewSelectionDidChange not called Jonathan Dann Mar 25, 15:29
mlRe: outlineViewSelectionDidChange not called Adam Gerson Mar 26, 04:12
mlRe: outlineViewSelectionDidChange not called Adam Gerson Mar 26, 04:24
mlRe: outlineViewSelectionDidChange not called Jonathan Dann Mar 26, 20:49
mlRe: outlineViewSelectionDidChange not called Adam Gerson Mar 27, 18:17
mlRe: outlineViewSelectionDidChange not called Hamish Allan Mar 27, 20:07
mlRe: outlineViewSelectionDidChange not called Adam Gerson Mar 30, 09:44
mlRe: outlineViewSelectionDidChange not called Jonathan Dann Mar 31, 22:38