Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Sorting weekly events in outlineView

Sorting weekly events in outlineView
Thread Tools
Professional Poster
Join Date: Sep 2000
Location: San Francisco
Status: Offline
Reply With Quote
Apr 22, 2005, 09:30 AM
 
I have an app that tracks events. I would like to set up an outlineView with the events sorted by week. In other words, I would like the weeks to be the top-level nodes and the events sorted within these nodes by date and time. Here's a graphic:

Week 4/3/05-4/9/05
Event 1 (4/3/05 9:30am)
Event 2 (4/4/05 10:42pm)
Week 4/10/05-4/16/05
Event 3 (4/13/05 12:00pm)
Week 4/17/05-4/23/05
Event 4 (4/18/05 3:25am)
Event 5 (4/21/05 11:13am)


Each event is an instance of the Event class and has the associated date attribute. Is there an easy way to 'pull out' the associated weeks, put them at the top level of the tree and then sort the events as the children? I think I know how to make an array of the unique weeks from the event.date, but I'm not sure how to then populate the children of the outlineView sorted by the week.

Thanks!
kman
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 07:26 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2