Re: outlineViewSelectionDidChange not called
Re: outlineViewSelectionDidChange not called
- Subject: Re: outlineViewSelectionDidChange not called
- From: Jonathan Dann <email@hidden>
- Date: Mon, 31 Mar 2008 21:38:40 +0100
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
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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