• 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: While on the subject of: NSOutlineView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: While on the subject of: NSOutlineView
      • From: Andreas Mayer <email@hidden>
References: 
 >Re: While on the subject of: NSOutlineView (From: Andreas Mayer <email@hidden>)

  • Prev by Date: Re: While on the subject of: NSOutlineView
  • Next by Date: Re: exception in class derived from NSMutableDictionary
  • Previous by thread: Re: While on the subject of: NSOutlineView
  • Next by thread: Re: While on the subject of: NSOutlineView
  • Index(es):
    • Date
    • Thread