Re: While on the subject of: NSOutlineView
Re: While on the subject of: NSOutlineView
- Subject: Re: While on the subject of: NSOutlineView
- From: Chris Hanson <email@hidden>
- Date: Wed, 30 Jul 2003 15:11:15 -0500
On Wednesday, July 30, 2003, at 09:25 AM, Andreas Mayer wrote:
Well, that's a bit of a problem. There is no inherent order of objects
inside a dictionary. But for a table view data source, you will need
to know which objects to display for which row. So either you use the
row numbers as keys for the dictionary (not all that efficient) or you
need to maintain the order of objects somewhere else; in an NSArray
for instance.
There's always [[myDictionary allKeys] objectAtIndex:row].
If you want to get fancy, you can create an intermediate sorted array
of keys and then use that. Just be sure to use it everywhere instead
of using -[NSDictionary allKeys] directly.
-- Chris
--
Chris Hanson, bDistributed.com, Inc. | Email: email@hidden
Custom Mac OS X Development | Phone: +1-847-372-3955
http://bdistributed.com/ | Fax: +1-847-589-3738
http://bdistributed.com/Articles/ | Personal Email: email@hidden
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.