• 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
bindings, NSTableView and overriding drawRow
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bindings, NSTableView and overriding drawRow


  • Subject: bindings, NSTableView and overriding drawRow
  • From: Byron Wright <email@hidden>
  • Date: Tue, 23 Nov 2004 15:25:00 -0800

I am attempting to override drawRow in a subclass of NSTableView and don't want to break binding support. I don't want to draw using a custom cell because I would like to be able to use different data cells for different columns. So my question is, how can one programatically query the NSTableColumn's binding information to figure out the key paths? So say the column has been bound like :

[aNameCol bind:@"value" toObject :myController withKeyPath:@"arrangedObjects.name" options:someOptions];


so in my draw row method:

- (void)drawRow:(int)rowIndex clipRect:(NSRect)clipRect
{
	//do some custom drawing here....

//now tell cells to draw themselves
NSRange cols = [self columnsInRect:clipRect] ;
int current = cols.location;
int end = cols.length+start;
for(current; current<end; ++current)
{
NSTableColumn * currentCol = (NSTableColumn*)[[self tableColumns] objectAtIndex:current];


//need to value column to set the cells objectValue
//Can't call [currentCol value] because NSTableColumn or NSObject do not what this method or attribute.


		//call tableView delegate like NSTableView does
	}
}


I cannot seem to find any information in the docs on how to query an objects bindings.


Thanks in advance,
Byron

_______________________________________________
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


  • Follow-Ups:
    • Re: bindings, NSTableView and overriding drawRow
      • From: Scott Anguish <email@hidden>
  • Prev by Date: NSController and NSCalendarDate
  • Next by Date: Re: TableView doesn't show alternating colors upon load
  • Previous by thread: Re: NSTextField binding problem [SOLVED]
  • Next by thread: Re: bindings, NSTableView and overriding drawRow
  • Index(es):
    • Date
    • Thread