NSColorPanel, changeColor: and responders
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