From 79e501075a0c301f435cf579518900e393be6fbf Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Thu, 13 Nov 2014 21:52:08 +0000 Subject: make the form select menu API smaller. By hiding all but the form selection menu option structure from code outside of render this reduces the API to the absolute minimum to support this feature. --- cocoa/FormSelectMenu.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cocoa') diff --git a/cocoa/FormSelectMenu.m b/cocoa/FormSelectMenu.m index d1548b244..842d5108d 100644 --- a/cocoa/FormSelectMenu.m +++ b/cocoa/FormSelectMenu.m @@ -48,7 +48,8 @@ [menu addItemWithTitle: @"" action: NULL keyEquivalent: @""]; NSInteger currentItemIndex = 0; - for (struct form_option *opt = control->data.select.items; opt != NULL; opt = opt->next) { + struct form_option *opt; + for (opt = form_select_get_option(control, 0); opt != NULL; opt = opt->next) { NSMenuItem *item = [[NSMenuItem alloc] initWithTitle: [NSString stringWithUTF8String: opt->text] action: @selector( itemSelected: ) keyEquivalent: @""]; -- cgit v1.2.3