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
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 mails | Author | Date |
|---|---|---|
| Adam Gerson | Mar 25, 05:18 | |
| Jens Alfke | Mar 25, 05:49 | |
| Adam Gerson | Mar 25, 06:42 | |
| Jonathan Dann | Mar 25, 15:29 | |
| Adam Gerson | Mar 26, 04:12 | |
| Adam Gerson | Mar 26, 04:24 | |
| Jonathan Dann | Mar 26, 20:49 | |
| Adam Gerson | Mar 27, 18:17 | |
| Hamish Allan | Mar 27, 20:07 | |
| Adam Gerson | Mar 30, 09:44 | |
| Jonathan Dann | Mar 31, 22:38 |






Cocoa mail archive

