eez-open / studio

Cross-platform low-code GUI and automation
https://www.envox.eu/studio/studio-introduction/
GNU General Public License v3.0
494 stars 90 forks source link

[EEZ-STUDIO, LVGL] Function name discrepancy between EEZ-STUDIO and LVGL #533

Open gwiethaus opened 1 week ago

gwiethaus commented 1 week ago

Issue Desculpe meu inglês.

Seria melhor que o nome das funções de callback e outras funções criadas pelo usuário sejam sempre as mesmas tanto nos nomes criados nos "User Actions" e "Pages" como no código final gerado para o LVGL. Esta diferença causa confusão e dificuldade na análise do código entre o EEZ Studio e o código gerado para o LVGL.

It should be in the screens.c code for LVGL the name of the function: Action_OnEvent_ShowFormConfiguracoes() or simply OnEvent_ShowFormConfiguracoes() and not what happens: action_on_event_show_form_configuracoes()

EEZ Studio 0.16.1 LVGL 9.x Windows 10

Proposal The name of the function, event, etc. should be the same between EEZ Studio and LVGL

Note Parece que faz uma divisão acrescentando underline a cada palavra entre caixa baixa e caixa alta no nome da função. Acho que seria bem melhor que o nome da função criada pelo usuário sempre seja a mesma.

Eez_Studio_user_actions Figure - EEZ Studio - User Actions

eez_Studio_screen_c Figure - LVGL - Code screens.c

Best Regard

mvladic commented 1 week ago

This is intentional and if we change this it will brake the existing code. But, we can add per project settings, something like:

[x] Use the same action name in generated code as in project
gwiethaus commented 1 week ago

This is intentional and if we change this it will brake the existing code. But, we can add per project settings, something like:

[x] Use the same action name in generated code as in project

Perfect, I think this would be very interesting. This way, the user could choose this setting. I think that to avoid confusion, when creating the project, this option could be left as default enabled. I believe it would be much more coherent to have the name of the callback function exactly as the user defined it. Otherwise, if the user does not want it, he can uncheck the option.