News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

wxSmith Generates incorrect code for time picker

Started by sceedy, February 17, 2020, 09:39:35 PM

Previous topic - Next topic

sceedy

I am using Code::Blocks 17.12 on Windows 10

About Information Tab :-
Build: Dec 25 2017,08:45:27 - wx2.8.12 (Windows,unicode) - 32 bit
Name: Code::Blocks
Version: Release 17.12 rev 11256
SDK Version: 1.33.0
Author: The Code::Blocks Team
E-mail: info@codeblocks.org
Website: http://www.codeblocks.org

wxWidgets project wizard page 2 :-
wxWidgets 3.1.x selected
wxWidgets project wizard page 4 :-
Preferred GUI Builder : wxSmith
Application Type : Frame Based

Add wxFrame
Add wxTimePickerCtrl
Generates code :-
...
   Connect(ID_TIMEPICKERCTRL1,wxEVT_DATE_CHANGED,(wxObjectEventFunction)&NewFrame::OnTimePickerCtrl1Changed);
...

https://docs.wxwidgets.org/trunk/classwx_time_picker_ctrl.html says :-
...
Event macros for events emitted by this class:

    EVT_TIME_CHANGED(id, func):
...
i.e. not "wxEVT_DATE_CHANGED" as in the generated code

stahta01

Does this problem result in a build error?
Or does it result in a run-time issue?

If build error, please post the error?

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

stahta01

#2
Looks like wxTimePickerCtrl was added to wxWidgets in 2.9.3.

wxSmith has a lot of 2.8 support; but, it is missing some/most support for after version 2.8 of wxWidgets.

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

Miguel Gimenez

This patch fixes the issue, I will create a ticket.