Fixed some runtime errors.

This commit is contained in:
Pietro Gagliardi 2015-07-29 13:34:25 -04:00
parent 7d1b97fb28
commit fde28fefe2
2 changed files with 3 additions and 1 deletions

View File

@ -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

View File

@ -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];