• 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: Saving NSTableView data
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Saving NSTableView data


  • Subject: Re: Saving NSTableView data
  • From: Sherm Pendley <email@hidden>
  • Date: Fri, 28 Jun 2002 01:57:08 -0400

On Thursday, June 27, 2002, at 03:00 PM, Aidas wrote:

I have a NSTableView. It has multiple collumns. How could I save it's data
into file and later read it?

I'm assuming that what you really want to do is save the data from the NSTableView's data source, which should be an object that implements the NSTableDataSource protocol.

I'm also assuming that the data source is implemented internally as an NSArray of rows, with each row containing an NSDictionary of named columns. Or perhaps it's vice-versa, and your columns collection is topmost, with each column containing an array of rows.

Either way, whether the top-level collection object is an NSArray or an NSDictionary, you can use its writeToFile:atomically: method to store its contents to a file in property list (plist) format, and initWithContentsOfFile: method to recreate it.

sherm--

Never put off until tomorrow what you can do today. There might be a law against it by that time.
_______________________________________________
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: Saving NSTableView data
      • From: email@hidden
References: 
 >Saving NSTableView data (From: Aidas <email@hidden>)

  • Prev by Date: Re: Unix Privileges on deleting
  • Next by Date: Re: Saving NSTableView data
  • Previous by thread: Saving NSTableView data
  • Next by thread: Re: Saving NSTableView data
  • Index(es):
    • Date
    • Thread