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

Re: Quick way to get contents of NSTableView as text?


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


Can you just get each cell's datum from the data source? (NSTableDataSource protocol's - tableView:objectValueForTableColumn:row:)

As you guessed I'm using bingings

Or are you using bindings, as in Core Data? Then there is no data source, and you will need to get it some other way. My solution was to 1) get the binding info for each NSTableColumn, 2) figure out _which_ binding was used for the values, and 3) extract the data from the ultimate source. Step 2 is hard to solve in the general case, but for a specific column you know which binding you're using.

Thanks - this sounds like a good plan. I am in fact programatically assigning the bindings to each column, so it should be easy to go in reverse.


Rick


Read up on the NSKeyValueBindingCreation protocol, especially - exposedBindings and -infoForBinding: in <http://developer.apple.com/ documentation/Cocoa/Reference/ApplicationKit/ObjC_classic/Protocols/ NSKeyValueBindingCreation.html>


Jim H
--
Jim Hamilton

email@hidden
email@hidden




_______________________________________________ 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
References: 
 >Quick way to get contents of NSTableView as text? (From: Rick Hoge <email@hidden>)
 >Re: Quick way to get contents of NSTableView as text? (From: Jim Hamilton <email@hidden>)

  • Prev by Date: Re: NSLog not logging anymore
  • Next by Date: Re: NSTask & GREP problems
  • Previous by thread: Re: Quick way to get contents of NSTableView as text?
  • Next by thread: NSColor - set vs. setFill
  • Index(es):
    • Date
    • Thread