• 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
NSColorPanel, changeColor: and responders
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSColorPanel, changeColor: and responders


  • Subject: NSColorPanel, changeColor: and responders
  • From: Aaron Boothello <email@hidden>
  • Date: Tue, 16 Jan 2007 22:29:45 +0800

I have a subclass of NSOpenGLView. i'd like to change a color value in the view. I have a contextual menu for the view, that invokes an action metod, which bring up the [NSColorPanel sharedColorPanel]. According to the NSColorPanel class definition..i have two ways of getting the panel to pass the chosen to my view.
1. make the view the firstResponder, and override the changeColor responder method, which gets called everytime the color changes in the panel.
i have overridden the acceptsFirstResponder method to return YES. and i think the viw does become the firstResponder.
2. set the view as a delegate of the sharedColorPanel, and setAction to a method defined in my class to handle the "message".


Ive tried both ways, and nothing is happening, i change a color in the colorPanel and my NSView gets no notification of a color change. ive overridden this is driving me nuts...what am i doing wrong ? help would be really appreciated.

Cheers,
Aaron
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: Showing time differences. NSNumberFormatter?
  • Next by Date: Re: NSString coding errors
  • Previous by thread: Re: Strange crash
  • Next by thread: Cocoa and iPhone
  • Index(es):
    • Date
    • Thread