GetOption.AddOptionList limit on number of options?

trying to figure why I cannot select the last item ('aaaaaaaaaa30') from this option list:

import Rhino

go = Rhino.Input.Custom.GetOption()
go.AddOptionList('test', ['%s%s'%('a'*10,x) for x in range(0, 31)], 0)
go.Get()
if( go.CommandResult() == Rhino.Commands.Result.Success ):
    print 'selected %s'%go.Option().CurrentListOptionIndex

go.Get() just never returns until I select an option at a lower index

I have an attribute in my actual plugin, where a list of enum options (there are 90 or so in that particular case) should be made available, but though the strings all pass IsValidOptionValueName, similar to what is shown in the example above, I am only able to select up to the 20th one

Hi @jdhill,

No problem selecing “30” here.

Animation

– Dale

what happens if you change it to range(0,99) and try to select 31 or higher

I disabled all plugins and was then inexplicably able to select 30, but not 31 or higher

I am on windows 7.28.23058.3001

Hi @jdhill,

Running your code in the Rhino WIP works. I’ll poke around in V7.

– Dale

there is something more to it, I’m working on getting a reliable repro

ok, this is pretty weird; first, here is an updated script:

import Rhino

go = Rhino.Input.Custom.GetOption()
go.AddOption('option0')
go.AddOption('option1')
go.AddOption('option2')
go.AddOption('option3')
go.AddOption('option4')
go.AddOption('option5')
go.AddOption('option6')
go.AddOption('option7')
go.AddOption('option8')
go.AddOption('option9')
go.AddOption('option10')
go.AddOption('option11')
go.AddOption('option12')
go.AddOptionList('test', ['%s%s'%('a'*10,x) for x in range(0, 99)], 0)
go.AddOption('option14')
go.AddOption('option15')
go.AddOption('option16')
go.AddOption('option17')
go.AddOption('option18')
go.AddOption('option19')
go.Get()
if( go.CommandResult() == Rhino.Commands.Result.Success ):
    print 'selected %s'%go.Option().CurrentListOptionIndex

and here is a screencap showing what happens if I run it when starting rhino (using 8 here) with the command line pretty narrow:

I can’t click on the higher index options, then I re-run the command with the commandline stretched wider, and still cannot click on them

and here is a video of the reverse, rhino restarted with the commandline pretty wide:

now the command works, and continues to work after making the commandline narrow

this is 8.0.23115.4305, the behavior is the same in 7.28.23058.3001, and there are no third-party plugins loaded in either case

(edit: same behavior in 6.35.21222.17001 as well)