You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am creating a submenu of menu radio buttons with a for loop, including shortcuts. The menu works, but the shortcuts do not.
Expected Behaviour
For the submenu to show a list of menu radio buttons numbered 0-9, each with the shortcut Ctrl-#(0-9). They all activate the same function to change the number of places to display after a decimal point.
Actual Behaviour
They show up correctly, display the shortcut correctly, and work when clicked, but nothing seems to happen when the shortcut is used.
Any error messages produced by appJar
No errors produced.
Sample code, demonstrating the issue
def fpChange(name):
global this
this['fp'] = app.getMenuRadioButton("Max Digits After Decimal",name)
conv()
pass
app.addSubMenu("View","Max Digits After Decimal")
for i in range(10):
app.addMenuRadioButton("Max Digits After Decimal","fp",i,fpChange,shortcut=f"Control-{i}")
What steps are needed to reproduce the bug
Attempt to use the keyboard shortcut to try to change the selected menu radio button.
I did more testing...
I checked if it was a problem of using numbers with shortcut keys, still did it with letters(and other shortcuts work in the program).
Checked if it was using the f-string, not the problem.
Checked if it was the loop, not it, still did it when I turned the 2 lines into 10 with hard coded values.
The only thing that I see is the menu radio buttons and shortcuts. I have shortcuts on menu items and menu check boxes, but these are the only menu radio buttons that I have use shortcuts.
Bug Report
Context
I am creating a submenu of menu radio buttons with a for loop, including shortcuts. The menu works, but the shortcuts do not.
Expected Behaviour
For the submenu to show a list of menu radio buttons numbered 0-9, each with the shortcut Ctrl-#(0-9). They all activate the same function to change the number of places to display after a decimal point.
Actual Behaviour
They show up correctly, display the shortcut correctly, and work when clicked, but nothing seems to happen when the shortcut is used.
Any error messages produced by appJar
No errors produced.
Sample code, demonstrating the issue
What steps are needed to reproduce the bug
Attempt to use the keyboard shortcut to try to change the selected menu radio button.
Version Information
appJar: 0.94.0 Python: 3.10.4 TCL: 8.6, TK: 8.6 Platform: Linux pid: 11798 locale: en_US
The text was updated successfully, but these errors were encountered: