On Wed, Nov 19, 2008 at 6:45 PM, Richard S. French <[EMAIL PROTECTED]> 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/PropertyLists.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
_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to