• 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: Mail-like grouping in NSTableView?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mail-like grouping in NSTableView?


  • Subject: Re: Mail-like grouping in NSTableView?
  • From: glenn andreas <email@hidden>
  • Date: Wed, 13 Feb 2008 09:49:15 -0600


On Feb 13, 2008, at 9:34 AM, Jens Miltner wrote:

Hi,

I'm pondering how to best approach implementing something like Apple Mail's "Group by Thread" display mode:
I have a database view (which potentially can contain large amounts of rows), and I would like to group them by some criteria.
Due to the amount of data that _may_ be displayed (not that it necessarily makes sense), I believe using an NSOutlineView is probably ruled out due to it's reliance on one object per row (I don't want to have to allocate 100,000+ objects). In the current "flat" list that is used, we don't keep objects per row, but rather fetch the data directly from a database as it's needed.


Since the row object an NSOutlineView uses could be as simple as an NSNumber that contains the database entry number, I don't really see that big of a problem with 100,000+ objects (an NSNumber is holding an int is probably on the magnitude of 16 bytes or so, so we're talking 1.6 megs of memory - not all that much). You would still then fetch the data as needed (in the various NSOutlineView datasource methods).

Definitely would be easier than trying to do an pseudo-outline view of your own...



Glenn Andreas email@hidden
<http://www.gandreas.com/> wicked fun!
quadrium2 | build, mutate, evolve, animate | images, textures, fractals, art



_______________________________________________

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: 
 >Mail-like grouping in NSTableView? (From: Jens Miltner <email@hidden>)

  • Prev by Date: Re: KVC and KVO for arrays
  • Next by Date: Changing up/down arrow behavior for NSTextField
  • Previous by thread: Mail-like grouping in NSTableView?
  • Next by thread: Re: Mail-like grouping in NSTableView?
  • Index(es):
    • Date
    • Thread