Re: Formatter for NSTableView
Re: Formatter for NSTableView
- Subject: Re: Formatter for NSTableView
- From: Larry Fransson <email@hidden>
- Date: Thu, 21 Oct 2004 12:56:04 -0700
On Oct 21, 2004, at 11:08, Peter Karlsson wrote:
Can someone please tell me what I need to do to connect my formatter
to my
tableview? I have tried the following code but I can't get it to work.
[[[[TableviewOutlet tableColumns] objectAtIndex:0] dataCell]
setFormatter:myFormatterOutlet];
You're trying to apply a formatter to an NSArray. Note that NSArray
has no such method -setFormatter. The compiler probably already told
you that.
You can't actually apply a formatter to a table view all at once. You
must apply it to each column's data cell individually:
[[[myTableView tableColumnWithIdentifier:identifierString] dataCell]
setFormatter:someFormatter];
If you want to apply the formatter to every column in the table, you
could use [myTableView tableColumns] and iterate over the items in the
returned array, applying the formatter in a similar way.
Larry Fransson
Seattle, WA
_______________________________________________
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