Re: How to get data to an overridden function (NSMatrix->NSCell)
Re: How to get data to an overridden function (NSMatrix->NSCell)
- Subject: Re: How to get data to an overridden function (NSMatrix->NSCell)
- From: "I. Savant" <email@hidden>
- Date: Fri, 11 Aug 2006 11:21:19 -0400
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.
--
I.S.
On Aug 11, 2006, at 10:13 AM, Aaron Kobayashi wrote:
Hi everyone,
I'm overriding
- (NSColor *)highlightColorWithFrame:(NSRect)cellFrame inView:
(NSView *)controlView
in a subclass of NSTextFieldCell which is contained in an NSMatrix
to change the highlight color. This works stupendously. With the
machinery in place, I need to find a way to pipe data in to the
routine to make a decision on the color to highlight with.
Essentially, I want to detect a mouse down on the matrix and store
a color. Until mouse up, I want the highlightColorWithFrame
routine to return the color picked in the mouse down routine. This
seems like a trivial thing to do, but I haven't been able to find a
way to pipe data into this method.
Any suggestions? Certainly other people have dealt with a similar
problem.
Thanks,
Aaron K.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40gmail.com
This email sent to email@hidden
_______________________________________________
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