NSButtonCell in NSOutlineView
NSButtonCell in NSOutlineView
- Subject: NSButtonCell in NSOutlineView
- From: David <email@hidden>
- Date: Tue, 20 May 2008 22:57:08 -0400
I'm still trying to get a NSButtonCell in an NSOutlineView where the button
cell is in the first column, is a checkbox style AND the title of the cell
is set based on the row so that it shows data rather than needing a separate
column for its title.
I've rewritten it from using bindings to using a data source.
I've created a delegate and set it to the NSOutlineView.
I thought that I could set the button state AND title in
outlineView:willDisplayCell:forTableColumn:item:
The documetation says you can modify the passed in cell.
However it is not behaving as advertised.
1) I have two columns, yet this delegate method is only being called for the
first column. Why? And its not being called very frequently. The docs says
this is called right before drawing the cell. That makes it sound like it
should be called very often.
2) Even if I do modify the cell, the title of the cell reverts back to what
it was set to in IB. I can even set the title and retrieve it back. its the
value I set, but when it draws its the value from IB.
What gives?
I have been successful getting this to work by implementing the delegate
method outlineView:dataCellForTableColumn:item:
Any ideas whats going on?
Thanks
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden