• 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: Yosemite NSCollectionView appropriate for spreadsheet-like view?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Yosemite NSCollectionView appropriate for spreadsheet-like view?


  • Subject: Re: Yosemite NSCollectionView appropriate for spreadsheet-like view?
  • From: Alex Kac <email@hidden>
  • Date: Tue, 03 May 2016 13:01:15 -0600

10.11 CollectionView reuses views and doesn’t create 100,000 cells. So that could be appropriate.

> On May 3, 2016, at 12:53 PM, Jens Alfke <email@hidden> wrote:
>
>
>> On May 1, 2016, at 9:06 AM, email@hidden wrote:
>>
>> As I've been thinking about this problem it occurred to me that the new(ish) NSCollectionView might be a viable replacement in this case. Before I go down the rabbit hole, is it reasonable to use to create a spreadsheet-like view?
>
> No, because it eagerly creates a view for every item in the collection. So if you have a spreadsheet with 100,000 cells, it’s going to create 100,000 NSViews when the window opens.
>
> NSMatrix may work better because it uses only a single view, but IIRC it still preallocates an NSCell for every item. Also I think it’s been deprecated.
>
> I suspect you’ll need a custom view that uses cells or some other lightweight-view design pattern to avoid consuming resources for items that aren’t currently visible. (Of course, someone else may have already implemented that custom view, either as open source or commercially.)
>
> —Jens
> _______________________________________________
>
> 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


Alex Kac - El capitán


_______________________________________________

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


References: 
 >Yosemite NSCollectionView appropriate for spreadsheet-like view? (From: email@hidden)
 >Re: Yosemite NSCollectionView appropriate for spreadsheet-like view? (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: Yosemite NSCollectionView appropriate for spreadsheet-like view?
  • Next by Date: Re: Yosemite NSCollectionView appropriate for spreadsheet-like view?
  • Previous by thread: Re: Yosemite NSCollectionView appropriate for spreadsheet-like view?
  • Next by thread: Re: Yosemite NSCollectionView appropriate for spreadsheet-like view?
  • Index(es):
    • Date
    • Thread