studio icon indicating copy to clipboard operation
studio copied to clipboard

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

Open gwiethaus opened this issue 1 year ago • 2 comments

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

gwiethaus avatar Sep 13 '24 15:09 gwiethaus

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

mvladic avatar Sep 13 '24 15:09 mvladic

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.

gwiethaus avatar Sep 17 '24 11:09 gwiethaus