Why is this NSSlider subclass not getting displayed?
Why is this NSSlider subclass not getting displayed?
- Subject: Why is this NSSlider subclass not getting displayed?
- From: Matt Ball <email@hidden>
- Date: Mon, 18 Jul 2005 17:36:42 -0400
I'm working on an NSSlider subclass, which is created
programmatically. When I go to run my application, the slider doesn't
show up. Here's my code:
// MBDashboardSlider.m
- (id)initWithFrame:(NSRect)frame {
self = [super initWithFrame:frame];
if (self) {
MBDashboardSliderCell *sliderCell = [[MBDashboardSliderCell alloc] init];
[sliderCell setSliderType:NSLinearSlider];
[self setCell:sliderCell];
[sliderCell release];
}
return self;
}
// MBDashboardSliderCell.m
- (BOOL)isOpaque {
return NO;
}
- (id)init {
self = [super init];
NSLog(@"init", nil);
return self;
}
- (void)drawBarInside:(NSRect)aRect flipped:(BOOL)flipped
{
NSLog(@"drawBarInside", nil);
}
- (void)drawKnob:(NSRect)knobRect {
NSLog(@"drawKnob", nil);
}
The "init" gets logged, but neither "drawBarInside" nor "drawKnob"
gets logged. Is there any reason why this is? It's been driving me
crazy for several hours now.
- Matt Ball
_______________________________________________
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