Skip navigation.
 
mlRe: How to get data to an overridden function (NSMatrix->NSCell)
FROM : Aaron Kobayashi
DATE : Fri Aug 11 17:46:26 2006

>  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

Related mailsAuthorDate
mlHow to get data to an overridden function (NSMatrix->NSCell) Aaron Kobayashi Aug 11, 16:13
mlRe: How to get data to an overridden function (NSMatrix->NSCell) I. Savant Aug 11, 17:21
mlRe: How to get data to an overridden function (NSMatrix->NSCell) Aaron Kobayashi Aug 11, 17:46