I´m working on a CustomSlider Class.
In my project I have three sliders which all have the class CustomSlider.
I want these three sliders to have different knobs. See Picture.
Since the sliders already have tags I decided to use them for this purpose.
Unfortunately I don´t see how to get tag value of the NSSliderCell.
I tried this:
int myTag = [self tag];
and this:
NSButton *button = [super self];
int myTag = [button tag];
Both without success, any idea?
Is there another way to let the class know which object is sending the message?
Greetings, Ronald

The tag is a
long. NSSliderCells inherit their tag from NSActionCell, so have a tag separate from the NSSlider which uses the NSSliderCell, which inherits its tag from NSControl. In a custom NSSliderCell class,[self tag]does return the tag set for the sliderCell in the XIB.Here is the header for a custom slider cell class:
and here is the whole of the class itself:
and this does execute and report the correct tag.
I’m not able to replicate the error message you report. However, if I (erroneously) write
myTag = [EWSliderCell tag];then I see the message “No known class method for selector ‘tag’.tagis not a class method, it’s an instance method. (Is that the right word?) Can you post the code which produced the error message?