Re: Implementing -willDisplayCell... delegate method for NSMatrix
Re: Implementing -willDisplayCell... delegate method for NSMatrix
- Subject: Re: Implementing -willDisplayCell... delegate method for NSMatrix
- From: Matt Neuburg <email@hidden>
- Date: Mon, 22 May 2006 10:22:23 -0700
- Thread-topic: Implementing -willDisplayCell... delegate method for NSMatrix
On Fri, 12 May 2006 21:46:53 -0500, "Lawrence Sanbourne"
<email@hidden> said:
>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.)
Use the framework, don't fight it. Contemplate NSCell's calcDrawInfo. m.
--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
<http://www.amazon.com/gp/product/0596102119>
_______________________________________________
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