advertisement

Article:
  A Look Inside Address Book
Subject:   clarified my confusion on NSDictionary
Date:   2002-09-03 15:56:36
From:   psheldon
I had some confusions a year ago in table article and now with NSDictionary, maybe others got stuck like I did. When we did tableview article, I didn't quite fathom why NSDictionary was called a dictionary. I wasn't quite satisfied I had "owned" what a dictionary was. For the current article, I wrote a lot of notes and thrashed my memory with them to winnow them down to something I could handle in understanding the lingo.


An NSDictionary corresponds to a record row under column headers. The elements of a column under the column header give their meanings or values of that column header. That's why this is called an NSDictionary.
NSDictionary, though an ntuple of sorts, is actually a 1D row. We saw, in a previous article, an table of such NSDictionary records is 2D. We know from databases and finder that column headers can be used for sorting and searching. NSDictionary looks like a specialized newtonscrript frame since it restricts values to certain kinds.


The following hard spots became easy when I had thrashed :


Mike wrote : "To demonstrate how multi-value objects are used, let's take a closer look at the kABAddressBookProperty, a particularly interesting property since it contains NSDictionary objects rather than simple strings."
Much as an NSMutable array contains NSDictionary objects in the article on tables.


Mike wrote : "The following list is a list of the keys used to access values in the address dictionaries in the ABMultiValue object for kABAddressProperty."