diff --git a/new/alloc_darwin.m b/new/alloc_darwin.m index 83a948e..1fa7195 100644 --- a/new/alloc_darwin.m +++ b/new/alloc_darwin.m @@ -2,8 +2,6 @@ #import #import "uipriv_darwin.h" -// TODO is there a better alternative to NSCAssert()? preferably a built-in allocator that panics on out of memory for us? - void *uiAlloc(size_t size, const char *type) { void *out; diff --git a/new/container_darwin.m b/new/container_darwin.m index 8b2899c..c3fd938 100644 --- a/new/container_darwin.m +++ b/new/container_darwin.m @@ -17,9 +17,9 @@ uiLogObjCClassAllocations - (void)viewDidMoveToSuperview { if ([self superview] == nil) - if (self.child != NULL) { - uiControlDestroy(self.child); - self.child = NULL; + if (self.uiChild != NULL) { + uiControlDestroy(self.uiChild); + self.uiChild = NULL; } [super viewDidMoveToSuperview]; } @@ -42,7 +42,7 @@ uiLogObjCClassAllocations uiSizing d; intmax_t x, y, width, height; - if (self.child == NULL) + if (self.uiChild == NULL) return; x = [self bounds].origin.x; y = [self bounds].origin.y; @@ -56,7 +56,7 @@ uiLogObjCClassAllocations } d.xPadding = macXPadding; d.yPadding = macYPadding; - uiControlResize(self.child, x, y, width, height, &d); + uiControlResize(self.uiChild, x, y, width, height, &d); } - (BOOL)uiMargined diff --git a/new/uipriv_darwin.h b/new/uipriv_darwin.h index 9cb85f9..fc6e3cd 100644 --- a/new/uipriv_darwin.h +++ b/new/uipriv_darwin.h @@ -29,8 +29,7 @@ extern void setStandardControlFont(NSControl *); // container_darwin.m @interface uiContainer : NSView -// TODO rename to uiChild -@property uiControl *child; +@property uiControl *uiChild; - (void)uiUpdateNow; - (BOOL)uiMargined; - (void)uiSetMargined:(BOOL)margined; diff --git a/new/window_darwin.m b/new/window_darwin.m index 2822a35..0530386 100644 --- a/new/window_darwin.m +++ b/new/window_darwin.m @@ -107,8 +107,8 @@ void uiWindowOnClosing(uiWindow *w, int (*f)(uiWindow *, void *), void *data) void uiWindowSetChild(uiWindow *w, uiControl *c) { - D.container.child = c; - uiControlSetParent(D.container.child, (uintptr_t) (D.container)); + D.container.uiChild = c; + uiControlSetParent(D.container.uiChild, (uintptr_t) (D.container)); } int uiWindowMargined(uiWindow *w)