• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: custom view binding to NSTreeController
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: custom view binding to NSTreeController
      • From: Rob Keniger <email@hidden>
References: 
 >custom view binding to NSTreeController (From: Matthew Johnson <email@hidden>)
 >Re: custom view binding to NSTreeController (From: Rob Keniger <email@hidden>)

  • Prev by Date: Re: Asynchronous timers (without a run loop)
  • Next by Date: Re: Programmatically loading an NSImage via other field
  • Previous by thread: Re: custom view binding to NSTreeController
  • Next by thread: Re: custom view binding to NSTreeController
  • Index(es):
    • Date
    • Thread