Implementing -willDisplayCell... delegate method for NSMatrix
Implementing -willDisplayCell... delegate method for NSMatrix
- Subject: Implementing -willDisplayCell... delegate method for NSMatrix
- From: "Lawrence Sanbourne" <email@hidden>
- Date: Fri, 12 May 2006 21:46:53 -0500
I know what you're thinking, NSMatrix doesn't have a
-willDisplayCell... delegate method. However, I need a good place to
set cell attributes before displaying them (an image, in my case), so
I'm trying to create a delegate method (for an NSMatrix subclass) that
will accomplish exactly what NSTableView's delegate accomplishes.
However, I'm having trouble figuring out where to call the delegate
method from. First I tried overriding -updateCell:. However, this
caused infinite recursion (call loop) because NSCell's -setImage:
method was causing -updateCell: to get called, which caused my
delegate to get called, etc., etc.
Then I tried overriding - drawCellAtRow:column:, but this is only
called when the user selects a cell.
So, where should I call my custom -willDisplayCell:... delegate
method? Maybe there's a nice undocumented private method I can
override? (Gotta love those.)
Larry
_______________________________________________
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