• 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: Implementing -willDisplayCell... delegate method for NSMatrix
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: Re: Any source of Printed & Bound docs
  • Next by Date: Re: Virtual folder
  • Previous by thread: Implementing -willDisplayCell... delegate method for NSMatrix
  • Next by thread: OT? Creating a screencasting application...
  • Index(es):
    • Date
    • Thread