• 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
Re: Custom NSSlider Action Not Firing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Custom NSSlider Action Not Firing


  • Subject: Re: Custom NSSlider Action Not Firing
  • From: Andreas Mayer <email@hidden>
  • Date: Mon, 11 Jul 2005 13:02:12 +0200


Am 11.07.2005 um 03:49 Uhr schrieb Austin Sarner:

My problem is that the slider's action is not firing

We've had the exact same problem a few days before in this list.

You need to copy the values of at least the target and action instance variables of the slider's cell, when replacing it with your own creation:

- (void)awakeFromNib
{
if ([[self cell] class] != [MyOwnSliderCell class]) {
// replace cell
NSSliderCell *oldCell = [self cell];
NSSliderCell *newCell = [[[MyOwnSliderCell alloc] init] autorelease];
[newCell setTag:[oldCell tag]];
[newCell setTarget:[oldCell target]];
[newCell setAction:[oldCell action]];
[newCell setControlSize:[oldCell controlSize]];
[newCell setType:[oldCell type]];
[newCell setState:[oldCell state]];
[newCell setAllowsTickMarkValuesOnly:[oldCell allowsTickMarkValuesOnly]];
[newCell setAltIncrementValue:[oldCell altIncrementValue]];
[newCell setControlTint:[oldCell controlTint]];
[newCell setKnobThickness:[oldCell knobThickness]];
[newCell setMaxValue:[oldCell maxValue]];
[newCell setMinValue:[oldCell minValue]];
[newCell setDoubleValue:[oldCell doubleValue]];
[newCell setNumberOfTickMarks:[oldCell numberOfTickMarks]];
[newCell setSliderType:[oldCell sliderType]];
[newCell setEditable:[oldCell isEditable]];
[newCell setEnabled:[oldCell isEnabled]];
[newCell setEntryType:[oldCell entryType]];
[newCell setFocusRingType:[oldCell focusRingType]];
[newCell setHighlighted:[oldCell isHighlighted]];
[newCell setTickMarkPosition:[oldCell tickMarkPosition]];
[self setCell:newCell];
}
}



Andreas _______________________________________________ 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: Custom NSSlider Action Not Firing
      • From: Austin Sarner <email@hidden>
References: 
 >Custom NSSlider Action Not Firing (From: Austin Sarner <email@hidden>)

  • Prev by Date: NSUrlResponse
  • Next by Date: Re: NSUrlResponse
  • Previous by thread: Custom NSSlider Action Not Firing
  • Next by thread: Re: Custom NSSlider Action Not Firing
  • Index(es):
    • Date
    • Thread