davetcc / tcMenu

Menu library for Arduino, mbed and ESP with designer UI and remote control capabilities.
https://www.thecoderscorner.com/products/arduino-libraries/tc-menu/
Apache License 2.0
275 stars 25 forks source link

designer bug: in BooleanMenuItem, options under"Default Value" doesn't represent the choice of "Possible values" #297

Closed luwenjin closed 1 year ago

luwenjin commented 1 year ago
image
luwenjin commented 1 year ago

The Default Value's options is not updated instantly, but after switching to other menu and back, the options is updated according to Possible responses

davetcc commented 1 year ago

I've tested this on Windows 11 and macOS Ventura and can't recreate this behaviour in 3.1.

Do you use a different environment to that? Is there anything specific about the project? IE could you try this with an example using the 3.1 UI. If you can please look in the log (~/.tcmenu directory) and see if there are any errors.

luwenjin commented 1 year ago

I've tried it on ventura+designer 3.1

the simpleU8g2.emf from the examples works fine. But my emf has the bugs I've posted, I had also looked up the logs, found no errors, here is a sample from the log file:

2023-02-20 09:28:22 信息 com.thecoderscorner.menu.editorui.project.FileBasedProjectPersistor save Save file starting for: /Users/luwenjin/Projects/luwenjin/SoccerBar/src/ui/SoccerBar.emf
2023-02-20 09:28:22 信息 com.thecoderscorner.menu.editorui.uimodel.CurrentProjectEditorUIImpl createPanelForMenuItem creating new panel for menu item editing 0
2023-02-20 09:28:23 信息 com.thecoderscorner.menu.editorui.uimodel.CurrentProjectEditorUIImpl createPanelForMenuItem creating new panel for menu item editing 85
2023-02-20 09:28:23 信息 com.thecoderscorner.menu.editorui.uimodel.CurrentProjectEditorUIImpl lambda$createPanelForMenuItem$3 created panel UITextMenuItem
2023-02-20 09:28:24 信息 com.thecoderscorner.menu.editorui.uimodel.CurrentProjectEditorUIImpl createPanelForMenuItem creating new panel for menu item editing 93
2023-02-20 09:28:24 信息 com.thecoderscorner.menu.editorui.uimodel.CurrentProjectEditorUIImpl lambda$createPanelForMenuItem$3 created panel UIBooleanMenuItem
2023-02-20 09:28:26 信息 com.thecoderscorner.menu.editorui.project.FileBasedProjectPersistor save Save file starting for: /Users/luwenjin/Projects/luwenjin/SoccerBar/src/ui/SoccerBar.emf
2023-02-20 09:28:26 信息 com.thecoderscorner.menu.editorui.uimodel.CurrentProjectEditorUIImpl createPanelForMenuItem creating new panel for menu item editing 0
2023-02-20 09:28:27 信息 com.thecoderscorner.menu.editorui.uimodel.CurrentProjectEditorUIImpl createPanelForMenuItem creating new panel for menu item editing 93
2023-02-20 09:28:27 信息 com.thecoderscorner.menu.editorui.uimodel.CurrentProjectEditorUIImpl lambda$createPanelForMenuItem$3 created panel UIBooleanMenuItem

I tried to trim my project down to see which branch cause the bugs, Here is the minimal project that can reproduce the bugs.

bug.emf.zip

davetcc commented 1 year ago

Thanks it must be environment specific. I’ll load the project and try myself.

davetcc commented 1 year ago

I unfortunately cannot recreate this locally, even with the same project.

luwenjin commented 1 year ago

Not a big issue, let's see if anyone else encounters the problem, you may close the issue for now.