Re: A couple of NSTable questions
Re: A couple of NSTable questions
- Subject: Re: A couple of NSTable questions
- From: Mike Brinkman <email@hidden>
- Date: Wed, 30 Jul 2003 11:52:28 -0400
My method looks like this:
- (id)tableView:(NSTableView *)tableView
objectValueForTableColumn:(NSTableColumn *)tableColumn
row:(int)row
{
NSString *identifier = [tableColumn identifier];
ToDoList *listItem = [myToDoList objectAtIndex:row];
return [listItem valueForKey:identifier];
}
So I'm not sure how I'd return an attributed string to display into a table.
You can't return two different things, can you?
Likewise, I've also got an NSFormatter attached to the due date column of my
table, can you have more than one? How would you apply it so that every item
in the row changes based upon the date?
On 7/30/03 10:22 AM, "Stiphane Sudre" <email@hidden> wrote:
>
Le mercredi, 30 juil 2003, ` 16:17 Europe/Paris, Mike Brinkman a icrit :
>
>
> Next objective I wanted to do was to make any appointments ending
>
> within 7
>
> days to show up in red. I know that if I was just going to draw a
>
> string in
>
> a view, all I would do is something like this:
>
>
>
> [...]
>
>
For instance in:
>
>
- (id)tableView:(NSTableView *)aTableView
>
objectValueForTableColumn:(NSTableColumn *)aTableColumn
>
row:(int)rowIndex
>
{
>
}
>
>
You can return a NSAttributedString.
>
>
Or you could write a NSFormatter subclass.
>
_______________________________________________
>
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.
_______________________________________________
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.