• 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: Mike Abdullah <email@hidden>
  • Date: Wed, 13 Feb 2008 16:30:30 +0000


On 13 Feb 2008, at 15:34, 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.

um, that's exactly how NSOutlineView works (if you use a datasource) surely? You are required only to provide the count of the objects, and then individual objects as the outlineView requires them. i.e. You can load stuff on-demand from your database as desired.


The main obstacle I can think of when trying to implement the grouping using a plain NSTableView is the ordering, where I'd need to make sure the group sticks together even when sorted by some other criteria than the one that specifies the grouping (think of e.g. sorting e-mails by date in Apple Mail with "Group by Thread" enabled).

Any ideas how to best approach this?

Thanks,
</jum>


_______________________________________________

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

_______________________________________________

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: Adding obj-c++ file to carbon project changes preprocessed header file types
  • Next by Date: ICal Alarm View
  • Previous by thread: Re: Mail-like grouping in NSTableView?
  • Next by thread: Changing up/down arrow behavior for NSTextField
  • Index(es):
    • Date
    • Thread