From fde28fefe2211a4af63563e242d68d623f2ff1e5 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Wed, 29 Jul 2015 13:34:25 -0400 Subject: [PATCH] Fixed some runtime errors. --- redo/darwin/menu.m | 2 ++ redo/darwin/slider.m | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/redo/darwin/menu.m b/redo/darwin/menu.m index db789466..26be52d1 100644 --- a/redo/darwin/menu.m +++ b/redo/darwin/menu.m @@ -248,6 +248,7 @@ static uiMenuItem *newItem(struct menu *m, int type, const char *name) complain("attempt to create a new menu item after menus have been finalized"); item = uiNew(struct menuItem); + uiTyped(item)->Type = uiTypeMenuItem(); item->type = type; switch (item->type) { @@ -328,6 +329,7 @@ uiMenu *uiNewMenu(const char *name) menus = [NSMutableArray new]; m = uiNew(struct menu); + uiTyped(m)->Type = uiTypeMenu(); m->menu = [[NSMenu alloc] initWithTitle:toNSString(name)]; // use automatic menu item enabling for all menus for consistency's sake diff --git a/redo/darwin/slider.m b/redo/darwin/slider.m index b95768f4..8e3f8317 100644 --- a/redo/darwin/slider.m +++ b/redo/darwin/slider.m @@ -59,7 +59,7 @@ NSLog(@"NOTE thickness %f\n", [s->slider knobThickness]); [s->slider setMinValue:min]; [s->slider setMaxValue:max]; [s->slider setAllowsTickMarkValuesOnly:NO]; - [s->slider setNumberOfTicks:0]; + [s->slider setNumberOfTickMarks:0]; [s->slider setTickMarkPosition:NSTickMarkAbove]; cell = (NSSliderCell *) [s->slider cell];