Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development

Some feature request about wxSmith on generating the code

(1/2) > >>

ollydbg:
wxMathPlot

This is an improved wxMathPlot which has many good features, such as track the points(around the mouse), magnet cross lines, more powerful context menu and config dialog to tweak the plot.

In-fact, I have helped to improve this control, and when discussed with the author, he has some feature request:

https://github.com/GitHubLionel/wxMathPlot/issues/13#issuecomment-1560538840

Mainly:



--- Quote ---    the ability (with a checkbox in the IDE) to avoid the creation of the name of the widget (suppress all the long list of wxNewId())
    the creation of an array of string for the wxChoice widget
    the use of Bind in place of Connect
    an user code for i18n string. Default code is _("string") but if you have your own function, you wish could replace it by another thing (for example _myI18N("string")).
--- End quote ---

Any ideas, and hopefully we can fix some of them.

Miguel Gimenez:
Generation of Bind() vs Connect() would be desirable, currently GCC emits a warning on every Connect() due to incorrect type for the wxObjectEventFunction parameter. This warnings appear when you activate -Wextra.

For the rest, I do not see the need:
  - wxChoice already allows entering an array of strings, and you can use the "Extra code" property for more advanced usage.
  - The custom string for translation makes little sense, the .POT files should be modified to recognize the custom string for no advantage.
  - Removal of the name of the widget may reduce code size, but I see no other advantage

wxNewId() is deprecated, but it is difficult to replace.

ollydbg:

--- Quote from: Miguel Gimenez on May 24, 2023, 02:13:49 pm ---Generation of Bind() vs Connect() would be desirable, currently GCC emits a warning on every Connect() due to incorrect type for the wxObjectEventFunction parameter. This warnings appear when you activate -Wextra.

--- End quote ---

Yes, the author of wxMathPlot also saw this issue in his IDE, see his github issue comment: https://github.com/GitHubLionel/wxMathPlot/issues/2#issuecomment-1348985032  and  https://github.com/GitHubLionel/wxMathPlot/issues/12#issuecomment-1554172051




--- Quote ---
For the rest, I do not see the need:
  - wxChoice already allows entering an array of strings, and you can use the "Extra code" property for more advanced usage.
  - The custom string for translation makes little sense, the .POT files should be modified to recognize the custom string for no advantage.
  - Removal of the name of the widget may reduce code size, but I see no other advantage

wxNewId() is deprecated, but it is difficult to replace.

--- End quote ---

OK, I see.

Miguel Gimenez:
The Connect() calls are generated inside wxsEvents::GenerateBindingCode() and the change to Bind() looks straightforward, but IMHO this is not the best moment for doing this.

Miguel Gimenez:
Now wxSmith allows generation of Bind() instead of Connect() changing a setting.

Navigation

[0] Message Index

[#] Next page

Go to full version