• 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
Quick way to get contents of NSTableView as text?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Quick way to get contents of NSTableView as text?


  • Subject: Quick way to get contents of NSTableView as text?
  • From: Rick Hoge <email@hidden>
  • Date: Tue, 23 Aug 2005 12:34:34 -0400


I have an NSTableView that is populated during a session in which the user may add and reorder columns and edit cells. I would like to grab a text 'snapshot' of the table, which I'd save in an NSString as a tab-delimited table with minimal formatting.


I tried writing my own method using NSTableColumn's dataCellForRow: method, expecting to be able to do something like [[myColumn dataCellForRow:5] stringValue] to get the contents of the fifth row of a particular table column, but this always returns the same value regardless of row.

Has anyone seen a nice clean way of dumping a table to text? I know I can hack something together but all my ideas seem more complicated than this should be.

Thanks for any suggestions,

Rick

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Quick way to get contents of NSTableView as text?
      • From: Jim Hamilton <email@hidden>
  • Prev by Date: Re: Float behaviour
  • Next by Date: Re: how to retrieve non-string resources in cocoa
  • Previous by thread: RE:Core Data: where is the default store in a CD-Document-Based-App?
  • Next by thread: Re: Quick way to get contents of NSTableView as text?
  • Index(es):
    • Date
    • Thread