Skip to content

Commit

Permalink
Fix Cocoa val
Browse files Browse the repository at this point in the history
  • Loading branch information
gen2brain committed Sep 6, 2023
1 parent cd271aa commit 8b037fe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion iup/external/src/cocoa/iupcocoa_filedlg.m
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ - (BOOL) panel:(id)the_sender shouldEnableURL:(NSURL*)file_url
char* value = iupAttribGet(ih, "FILTER");
if(NULL == value)
{
NSLog(@"Matched NULL == value");
//NSLog(@"Matched NULL == value");
return YES;
}

Expand Down
8 changes: 4 additions & 4 deletions iup/external/src/cocoa/iupcocoa_val.m
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ - (IBAction) mySliderDidMove:(id)the_sender;
Ihandle* ih = (Ihandle*)objc_getAssociatedObject(the_sender, IHANDLE_ASSOCIATED_OBJ_KEY);

NSSlider* the_slider = (NSSlider*)the_sender;
double new_value = [the_slider doubleValue];;
double new_value = [the_slider doubleValue];
if(ih->data->val == new_value)
{
// no change
Expand Down Expand Up @@ -180,7 +180,7 @@ static int cocoaValSetMaxAttrib(Ihandle* ih, const char* value)

// Not going to bounds check in case the user is trying to change both max and min which could cross into an invalid state

ih->data->val = new_value;
ih->data->vmax = new_value;

[the_slider setMaxValue:new_value];
}
Expand All @@ -201,7 +201,7 @@ static int cocoaValSetMinAttrib(Ihandle* ih, const char* value)

// Not going to bounds check in case the user is trying to change both max and min which could cross into an invalid state

ih->data->val = new_value;
ih->data->vmin = new_value;

[the_slider setMinValue:new_value];
}
Expand Down Expand Up @@ -359,7 +359,7 @@ void iupdrvValInitClass(Iclass* ic)
/* Special */

/* IupVal only */
iupClassRegisterAttribute(ic, "VALUE", iupValGetValueAttrib, cocoaValSetValueAttrib, NULL, NULL, IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT);
iupClassRegisterAttribute(ic, "VALUE", iupValGetValueAttrib, cocoaValSetValueAttrib, IUPAF_SAMEASSYSTEM, "0", IUPAF_NO_DEFAULTVALUE|IUPAF_NO_INHERIT);

iupClassRegisterAttribute(ic, "MAX", cocoaValGetMaxAttrib, cocoaValSetMaxAttrib, IUPAF_SAMEASSYSTEM, "1", IUPAF_NOT_MAPPED);
iupClassRegisterAttribute(ic, "MIN", cocoaValGetMinAttrib, cocoaValSetMinAttrib, IUPAF_SAMEASSYSTEM, "0", IUPAF_NOT_MAPPED);
Expand Down

0 comments on commit 8b037fe

Please sign in to comment.