On Wed, Nov 19, 2008 at 6:45 PM, Richard S. French <rsfrench...> wrote:
> Newbie question:
> How does one import an array of values from a dictionary (plist) and display
> on a window?
Deserialize the plist into an NSArray object. Provide the values from
the NSArray to an NSTableView using a data source, or bind the table
view to an NSArrayController that's bound to the array.
> It seems that the plist has to be translated to XML data and every byte read
> into an array.
Huh? Read the Property List Programming Guide again:
http://developer.apple.com/documentation/Cocoa/Conceptual/PropertyLists/Pro
pertyLists.html
> How does one then select just certain members where the plist contains an
> array under a key?
Loop through the array that results from deserialization and choose
only the entries you want. Alternatively, use an NSPredicate.
> I am trying to get this list into a tableview but not sure how to populate
> the data.
NSTableView has a -setDataSource: method that takes an object which
conforms to the NSTableViewDataSource protocol. Or you can use
bindings (not recommended for a beginner).
--Kyle Sluder