Re: custom view binding to NSTreeController
Re: custom view binding to NSTreeController
- Subject: Re: custom view binding to NSTreeController
- From: Rob Keniger <email@hidden>
- Date: Fri, 5 Dec 2008 08:23:34 +1000
On 05/12/2008, at 1:29 AM, Matthew Johnson wrote:
I agree it's a shame. There are plenty of examples for simpler
binding scenarios, but none I have found for custom views binding to
NSTreeController. I really appreciate your sample will do something
similar if I don't find a better way.
You're right that it will be fast for smaller data sets. The
problem is that it should be a constant time operation and your code
is much more expensive than that. Depending on the implementation
of removeItemsInArray your code is at least O(n) and it is likely to
be O(n2). That will not scale to large data sets very well.
I agree. I had a look at a class-dump of AppKit and it doesn't look
like there's much in there that would help in this. There really needs
to be a way for NSTreeController's arrangedObjects KVO notifications
to include the NSTreeNodes that are being added/removed. There seems
no reason why they couldn't be included in the change dictionary.
I think I'll file a bug against it.
--
Rob Keniger
_______________________________________________
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