Untitled
Untitled
I have a screen saver that has a NSSlider in the configure sheet. This slider is attached to my screenSaver view via an action and an outlet.
When this code is run, 0 is always printed to the console. What I find interestng is if I output the value of _sliderOfDoomValue, it prints the value that the slider was "declicked" at.
These variables are not used anywhere else. What is going on here? Thanks!
Code:
@interface MYfnsView : ScreenSaverView
{
IBOutlet id _theSliderOfDoom;
@private
int _sliderOfDoomValue;
int _anotherIntVar;
}
- (IBAction)sliderAction:(id)sender;
@end
@implementation MYfnsView
- (IBAction) sliderAction:(id)sender
{
_sliderOfDoomValue = [_theSliderOfDoom intValue];
_anotherIntVar = _sliderOfDoomValue;
NSLog(@"Dbug_statement:%d", _anotherIntVar);
}
@end
When this code is run, 0 is always printed to the console. What I find interestng is if I output the value of _sliderOfDoomValue, it prints the value that the slider was "declicked" at.
These variables are not used anywhere else. What is going on here? Thanks!