• 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: Multiple cell types in the same column?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Multiple cell types in the same column?


  • Subject: Re: Multiple cell types in the same column?
  • From: Daryn <email@hidden>
  • Date: Sun, 25 Jan 2004 23:40:55 -0600

Yes, just subclass the appropriate NSTableColumn and implement
dataCellForRow:. Something like this might make it easier to utilize:

@implementation MultiCellTableColumn

- (id)dataCellForRow:(int)row {
id cell = nil;

id tv = [self tableView];
id delegate = [tv delegate];

if (delegate) {
SEL selector = @selector(tableView:dataCellForRow:ofColumn:);
if ([delegate respondsToSelector:selector]) {
cell = [delegate tableView:tv dataCellForRow:row ofColumn:self];
}
}
return cell ? cell : [self dataCell];
}

@end

On Jan 25, 2004, at 1:56 PM, Florent Pillet wrote:

> I need to present a column with cells which can be checkboxes, combo
> boxes, text fields, etc depending on the rows which is being
> displayed/edited. Is there a simple way to do this?
> (or a way to do this at all, without rewriting the whole NSTableView).
>
> Florent
> --
> Florent Pillet, Code Segment email@hidden
> Developer tools and end-user products for Palm OS & Mac OS X
> ICQ: 117292463 http://perso.wanadoo.fr/fpillet
> _______________________________________________
> 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.

[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
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.

  • Follow-Ups:
    • Re: Multiple cell types in the same column?
      • From: Florent Pillet <email@hidden>
References: 
 >Multiple cell types in the same column? (From: Florent Pillet <email@hidden>)

  • Prev by Date: Re: (Slightly Off Track) Re: How to get mouse moved events?
  • Next by Date: Re: Any new/updated Cocoa books soon?
  • Previous by thread: Re: Multiple cell types in the same column?
  • Next by thread: Re: Multiple cell types in the same column?
  • Index(es):
    • Date
    • Thread