From 5cfcf81a67ee8d411327a38ab0757fd798e00cfc Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Mon, 25 Apr 2016 13:44:13 -0400 Subject: [PATCH] Fixed runtime errors. It seems to work! An autolayout step will need to be added... --- ui_darwin.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ui_darwin.h b/ui_darwin.h index 302c64e0..d5dcb9a5 100644 --- a/ui_darwin.h +++ b/ui_darwin.h @@ -28,6 +28,7 @@ _UI_EXTERN void uiDarwinControlSetSuperview(uiDarwinControl *, NSView *); { \ uiControlVerifyDestroy(c); \ [type(c)->handlefield release]; \ + uiFreeControl(c); \ } #define uiDarwinControlDefaultHandle(type, handlefield) \ static uintptr_t type ## Handle(uiControl *c) \ @@ -133,7 +134,9 @@ _UI_EXTERN void uiDarwinControlSetSuperview(uiDarwinControl *, NSView *); uiControl(var)->Enable = type ## Enable; \ uiControl(var)->Disable = type ## Disable; \ uiControl(var)->SyncEnableState = type ## SyncEnableState; \ - uiDarwinControl(var)->SetSuperview = type ## SetSuperview; + uiDarwinControl(var)->SetSuperview = type ## SetSuperview; \ + uiDarwinControl(var)->visible = YES; \ + uiDarwinControl(var)->enabled = YES; // TODO document _UI_EXTERN uiDarwinControl *uiDarwinAllocControl(size_t n, uint32_t typesig, const char *typenamestr);