Re: Quick way to get contents of NSTableView as text?
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