Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

combo_box and vertical_message_box don't report correct user selection #569

Closed
jasonatball opened this issue Sep 15, 2017 · 8 comments
Closed
Assignees
Labels
bug
Milestone

Comments

@jasonatball
Copy link
Collaborator

@jasonatball jasonatball commented Sep 15, 2017

combo_box and vertical_message_box both always report that the user pressed the first item in the list instead of what the user actually selected.

@jmbell1989
Copy link

@jmbell1989 jmbell1989 commented Apr 6, 2020

Has this been resolved? Still seeing the issue in version 4.4.1

@jmbell1989
Copy link

@jmbell1989 jmbell1989 commented Apr 6, 2020

Combo_box does not return the correct user selection

@ryanatball
Copy link
Member

@ryanatball ryanatball commented Apr 6, 2020

Works for me. Can you provide a snippet that doesn't work?

puts combo_box("Pick Something", "1", "2", "3")
@jmbell1989
Copy link

@jmbell1989 jmbell1989 commented Apr 6, 2020

NAMED_WIDGET CYCLE_LIST COMBOBOX 'Cycle-1' 'Cycle-2' 'Cycle-3' 'Cycle-4' 'Cycle-5'
BUTTON "Start" 'cmd("TSCM HID_COMMAND with SystemRunState #{get_named_widget("CYCLE_LIST").text}, HeatProfile #{get_named_widget("CYCLE_LIST").text}")'

@jmbell1989
Copy link

@jmbell1989 jmbell1989 commented Apr 6, 2020

The first get("").text returns the incorrect item selected. The second one seems to get the correct data.

@jmbell1989
Copy link

@jmbell1989 jmbell1989 commented Apr 6, 2020

Ok, so it looks like it's not the combo-box that's the problem. It seems like its my cmd definition. Can you not have multiple STATE declarations tied to the same value? Ie:
STATE Cycle-1 1
STATE Cycle-2 1
STATE Cycle-3 1
STATE Cycle-4 1
STATE Cycle-5 1

@ryanatball
Copy link
Member

@ryanatball ryanatball commented Apr 6, 2020

States are a hash lookup from value to string. So no, having the same value map to multiple strings is not supported.

@jmbell1989
Copy link

@jmbell1989 jmbell1989 commented Apr 6, 2020

Got it. Makes sense. Thanks for the help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

3 participants
You can’t perform that action at this time.