Re: custom view binding to NSTreeController
Re: custom view binding to NSTreeController
- Subject: Re: custom view binding to NSTreeController
- From: Matthew Johnson <email@hidden>
- Date: Thu, 04 Dec 2008 09:29:43 -0600
As far as I know it's the only way, all the examples I've ever seen
use a similar method. Array iteration is pretty fast and I can only
imagine it being slow for a very large data set. I've definitely
never had performance issues with it, but I am not creating large
trees.
I also would love to hear from Apple if there's a better way. It's
certainly a shame there is not more example code out there.
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.
Matthew
_______________________________________________
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