subclass of NSSlider won't call action method
subclass of NSSlider won't call action method
- Subject: subclass of NSSlider won't call action method
- From: Chris Stephens <email@hidden>
- Date: Thu, 30 Jun 2005 09:44:24 +1000
Hi folks,
I have altered the appearance of the bar and the knob of an NSSlider
subclass - thanks to this list.
But my subclass (EluSlider) won't send messages to the action specified.
Neither Ctrl-dragging in IB nor the setAction: method of both
EluSlider and EluSliderCell (tried in a number of places) works.
Can anyone help?
My (snipped) code is like this:
//EluSlider.m
#import "EluSlider.h"
@implementation EluSlider
- (void)awakeFromNib {
EluSliderCell *aCell = [[[EluSliderCell alloc] init] retain];
[aCell setControlSize:NSSmallControlSize];
//[aCell setAction:@selector(slider:)]; <-- tried this
[self setCell:aCell];
[aCell release];
[self setMinValue:(float)0];
[self setMaxValue:(float)127];
[self setDoubleValue:64];
//[self setAction:@selector(slider:)]; <-- tried this
}
@end
//EluSliderCell.m
#import "EluSliderCell.h"
@implementation EluSliderCell
-(id)init {
self = [super init];
//[self setAction:@selector(slider:)]; <-- tried this
return self;
}
- (void)awakeFromNib
{
//[self setAction:@selector(slider:)]; <-- tried this
}
@end
//AppController.m
- (void)awakeFromNib
{
//[testEluSlider setAction:@selector(slider:)]; <--tried this
}
Thanks in advance!
Chris
_______________________________________________
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