From 68af61435e793337276119f4795fd4c3e537d691 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Fri, 31 Oct 2014 16:07:14 -0400 Subject: [PATCH] Fixed Mac OS X Spinbox.SetValue(). Stupid bug =p --- spinbox_darwin.m | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/spinbox_darwin.m b/spinbox_darwin.m index 9095532..9693669 100644 --- a/spinbox_darwin.m +++ b/spinbox_darwin.m @@ -58,12 +58,11 @@ - (void)setValue:(NSInteger)value { + self->value = value; if (self->value < self->minimum) self->value = self->minimum; if (self->value > self->maximum) self->value = self->maximum; - self->value = value; - // TODO does not work? [self->textfield setIntegerValue:self->value]; [self->stepper setIntegerValue:self->value]; } @@ -84,13 +83,11 @@ - (IBAction)stepperClicked:(id)sender { -NSLog(@"stepperClicked %d\n", [self->stepper integerValue]); [self setValue:[self->stepper integerValue]]; } - (void)controlTextDidChange:(NSNotification *)note { -NSLog(@"controlTextDidChange %d\n", [self->textfield integerValue]); [self setValue:[self->textfield integerValue]]; }