• 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: How to get data to an overridden function (NSMatrix->NSCell)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to get data to an overridden function (NSMatrix->NSCell)


  • Subject: Re: How to get data to an overridden function (NSMatrix->NSCell)
  • From: Aaron Kobayashi <email@hidden>
  • Date: Fri, 11 Aug 2006 10:46:26 -0500


You could subclass NSMatrix and make it aware of the chosen color. When your cell's -highlightColorWithFrame... method is called, ask the "controlView" (which should be your subclassed NSMatrix) for the right color and use it as needed.

Hi there IS,

This is exactly what I'm looking for, however I can't get it quite right.

In my method, hilightColorWithFrame looks like this:

- (NSColor *)highlightColorWithFrame:(NSRect)cellFrame inView:(NSView *)controlView
{
MatrixSubClass *scMatrix = (MatrixSubClass *)controlView;
return [scMatrix activeColor];
}


However, when I run this code, I get:

[NSMatrix activeColor]: selector not recognized [self = 0x340c80]

Am I missing something here?

Thanks for your suggestions,
AK


_______________________________________________ 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
References: 
 >How to get data to an overridden function (NSMatrix->NSCell) (From: Aaron Kobayashi <email@hidden>)
 >Re: How to get data to an overridden function (NSMatrix->NSCell) (From: "I. Savant" <email@hidden>)

  • Prev by Date: Re: What exactly happens when I use Core Data's 'Remove' button?
  • Next by Date: printf with "%@"
  • Previous by thread: Re: How to get data to an overridden function (NSMatrix->NSCell)
  • Next by thread: Two views
  • Index(es):
    • Date
    • Thread