There is a bug in COMBOBOXCREATE where clicking on a item in the list portion can have a side-effect of clicking a button on the window. Clicking on an item in the list portion of a combobox should only select it and replace the editbox portion with the selection.
This is a regression that was introduced in FMSLogo 7.0.0, probably caused by updating wxwidgets from 2.18.12 to 3.1.0. I first observed this when trying to write a procedure picker.
How Reproducible:
Every Time
Steps to Reproduce:
1) Enter this procedure
:::text
TO SHOWBUG
; Create non-modal window
WINDOWCREATE "main "window [Select an item] 200 200 200 100 []
; Add a comobox with a few items to click on.
COMBOBOXCREATE "window "combobox 5 5 90 80
COMBOBOXADDSTRING "combobox [first item]
COMBOBOXADDSTRING "combobox [second item]
COMBOBOXADDSTRING "combobox [third item]
; Add a button that should never be pressed.
BUTTONCREATE "window "button [Don't Press This] 100 5 90 18 [
MESSAGEBOX [Error] [Button was pressed]
]
; Add a button to close the window
BUTTONCREATE "window "close [Close] 100 65 90 18 [ WINDOWDELETE "window ]
END
2) Run SHOWBUG.
3) Click on one the second item in the comobobox.
What Happens:
A messagebox appears that says "Button was pressed". This is what happens if "Don't Press This" is pressed.
After the messagebox is dismissed the second item is highlighted and the text in the edit box portion is updated to "second item".
Expected Result:
After you click, the second item is highlighted and the text in the edit box portion is updated to "second item".
You never see a message box that says "Button was pressed".
This is fixed by [r5718]. The fix will be available in FMSLogo 8.1.0.
I confirmed that this was not introduced due to a change in the FMSLogo source code but rather by upgrading the wxWidgets library.
Related
Commit: [r5718]