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

  • Prev by Date: Re: NSArrayController arrangedObjects not showing any result
  • Next by Date: Re: What exactly happens when I use Core Data's 'Remove' button?
  • Previous by thread: How to get data to an overridden function (NSMatrix->NSCell)
  • Next by thread: Re: How to get data to an overridden function (NSMatrix->NSCell)
  • Index(es):
    • Date
    • Thread