• 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
Why is this NSSlider subclass not getting displayed?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Why is this NSSlider subclass not getting displayed?
      • From: Nick Zitzmann <email@hidden>
  • Prev by Date: Re: CoreData: Getting the currently selected item
  • Next by Date: Re: Why is this NSSlider subclass not getting displayed?
  • Previous by thread: Re: CoreData: Getting the currently selected item
  • Next by thread: Re: Why is this NSSlider subclass not getting displayed?
  • Index(es):
    • Date
    • Thread