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