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

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


  • Prev by Date: Re: Using CLI arguments in controller (scoping?)
  • Next by Date: Re: Should objects returned by indirection be autoreleased
  • Previous by thread: Re: MediaCenter/FrontRow
  • Next by thread: Re: Implementing -willDisplayCell... delegate method for NSMatrix
  • Index(es):
    • Date
    • Thread