• 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
subclass of NSSlider won't call action method
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: subclass of NSSlider won't call action method
      • From: Andreas Mayer <email@hidden>
  • Prev by Date: Re: Cocoa-dev Digest, Vol 2, Issue 1006
  • Next by Date: Printing Problem (Was: Re: Generating PDFs....)
  • Previous by thread: Re: Cocoa-dev Digest, Vol 2, Issue 1006
  • Next by thread: Re: subclass of NSSlider won't call action method
  • Index(es):
    • Date
    • Thread