Fixed some build and runtime errors.

This commit is contained in:
Pietro Gagliardi 2015-08-17 01:41:04 -04:00
parent eb0b1d1ab7
commit a5a9c464bf
5 changed files with 10 additions and 6 deletions

View File

@ -121,5 +121,9 @@ static void controlUpdateState(uiControl *c)
uiControl *uiNewControl(uintmax_t type) uiControl *uiNewControl(uintmax_t type)
{ {
return uiControl(newTyped(type)); uiControl *c;
c = uiControl(newTyped(type));
c->Internal = uiNew(struct controlBase);
return c;
} }

View File

@ -244,8 +244,8 @@ static uiBox *finishNewBox(BOOL vertical)
b->view = [[NSView alloc] initWithFrame:NSZeroRect]; b->view = [[NSView alloc] initWithFrame:NSZeroRect];
b->children = [NSMutableArray alloc]; b->children = [NSMutableArray new];
b->stretchy = [NSMutableArray alloc]; b->stretchy = [NSMutableArray new];
b->vertical = vertical; b->vertical = vertical;
if (b->vertical) { if (b->vertical) {

View File

@ -66,7 +66,7 @@ uiGroup *uiNewGroup(const char *title)
//TODO [g->box setBorderType:TODO]; //TODO [g->box setBorderType:TODO];
[g->box setTransparent:NO]; [g->box setTransparent:NO];
[g->box setTitlePosition:NSAtTop]; [g->box setTitlePosition:NSAtTop];
uiDarwinSetControlFont(g->box, NSSmallControlSize); //TODO uiDarwinSetControlFont(g->box, NSSmallControlSize);
uiDarwinFinishNewControl(g, uiGroup); uiDarwinFinishNewControl(g, uiGroup);

View File

@ -15,7 +15,7 @@ void *mapGet(NSMapTable *map, id key)
{ {
NSValue *v; NSValue *v;
v = (NSValue *) [self->items objectForKey:sender]; v = (NSValue *) [map objectForKey:key];
return [v pointerValue]; return [v pointerValue];
} }

View File

@ -51,7 +51,7 @@ struct uiWindow {
- (void)registerWindow:(uiWindow *)w - (void)registerWindow:(uiWindow *)w
{ {
mapSet(self->windows w->window, w); mapSet(self->windows, w->window, w);
[w->window setDelegate:self]; [w->window setDelegate:self];
} }