From 47368bdfe97757228168b579b9815e5351fdfc5b Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Fri, 17 Apr 2015 18:54:17 -0400 Subject: [PATCH] Fixed some errors in the OS X build. IT WORKS! AND IS MUCH CLEANER NOW TOO!!!! --- darwin/button.m | 2 +- darwin/checkbox.m | 2 +- darwin/entry.m | 2 +- ui_darwin.h | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/darwin/button.m b/darwin/button.m index fbc7035d..2d742458 100644 --- a/darwin/button.m +++ b/darwin/button.m @@ -7,7 +7,7 @@ void *onClickedData; } - (IBAction)buttonClicked:(id)sender; -- (void)setButton(uiButton *)b; +- (void)setButton:(uiButton *)b; - (void)setOnClicked:(void (*)(uiButton *, void *))f data:(void *)data; @end diff --git a/darwin/checkbox.m b/darwin/checkbox.m index 02123e97..757e4ae7 100644 --- a/darwin/checkbox.m +++ b/darwin/checkbox.m @@ -102,7 +102,7 @@ uiCheckbox *uiNewCheckbox(const char *text) c->checkbox = (NSButton *) VIEW(c); - [c-checkbox setTitle:toNSString(text)]; + [c->checkbox setTitle:toNSString(text)]; [c->checkbox setButtonType:NSSwitchButton]; [c->checkbox setBordered:NO]; setStandardControlFont(c->checkbox); diff --git a/darwin/entry.m b/darwin/entry.m index fb6382ea..d7b63b33 100644 --- a/darwin/entry.m +++ b/darwin/entry.m @@ -4,7 +4,7 @@ struct entry { uiEntry e; NSTextField *textfield; -} +}; static void destroy(void *data) { diff --git a/ui_darwin.h b/ui_darwin.h index 99fb202b..097b5de4 100644 --- a/ui_darwin.h +++ b/ui_darwin.h @@ -13,8 +13,8 @@ This file assumes that you have imported and "ui.h" beforehand. // The two onDestroy parameters define a function and its parameter to call when the widget is destroyed. // Your control must call uiDarwinControlFreeWhenAppropriate() on the returned uiControl in its -[viewDidMoveToSuperview] method. // If it returns a value other than NO, then the uiControl has been freed and you should set references to it to NULL. -extern void uiDarwinNewControl(uiControl *c, Class class, BOOL inScrollView, BOOL scrollViewHasBorder); -extern BOOL uiDarwinControlFreeWhenAppropriate(uiControl *c, NSView *newSuperview, void (*onDestroy)(void *), void *onDestroyData); +extern void uiDarwinNewControl(uiControl *c, Class class, BOOL inScrollView, BOOL scrollViewHasBorder, void (*onDestroy)(void *), void *onDestroyData); +extern BOOL uiDarwinControlFreeWhenAppropriate(uiControl *c, NSView *newSuperview); // You can use this function from within your control implementations to return text strings that can be freed with uiTextFree(). extern char *uiDarwinNSStringToText(NSString *);