• 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
Custom control class question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Custom control class question


  • Subject: Custom control class question
  • From: "Jim O'Connor" <email@hidden>
  • Date: Wed, 11 Feb 2004 21:24:23 -0600

Hi all,

I need a custom slider class to be invoked by a nib, so I worked my way down
in the IB classes tab to the NSSlider class and added a subclass,
FavoriteSlider.

Then in my header file is have:

@interface FavoriteSlider : NSSlider
@end

@interface FavoriteSliderCell : NSSliderCell
@end

In my .mm file I have:

@implementation FavoriteSlider
+ (Class) cellClass
{
return [FavoriteSliderClass class];
}
@end

@implementation FavoriteSliderCell
- (void)drawBarInside:(NSRect)aRect flipped:(BOOL)flipped
{
// do some stuff
}
@end

My nib is loaded and the cellClass method is never called.

Am I missing something? I've been away from cocoa for a while, and I wasn't
that proficient at it when I was using it more frequently.


Thanks,
Jim O'Connor
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Custom control class question
      • From: Shaun Wexler <email@hidden>
  • Prev by Date: Re: Adding/removing rectangles from an NSImageView
  • Next by Date: Grayscale NSImage?
  • Previous by thread: Re: Create array from a string...
  • Next by thread: Re: Custom control class question
  • Index(es):
    • Date
    • Thread