Discussion:
Bind() with wxEVT_SLIDER doesn't compile
Eric Jensen
2014-06-17 14:57:08 UTC
Permalink
I couldn't create a ticket for this, i always got "internal server
error" on Trac.

If the event handler for a wxSlider takes wxScrollEvent& as parameter,
compilation fails.

The reason is most likely this line in event.h:

{{{
wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SLIDER,
wxCommandEvent);
}}}

If the event handler parameter is changed to wxCommandEvent, it
compiles without error.

Small patch to the minimal sample shows the problem.

Eric
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Vadim Zeitlin
2014-06-17 14:59:28 UTC
Permalink
On Tue, 17 Jun 2014 16:57:08 +0200 Eric Jensen wrote:

EJ> I couldn't create a ticket for this, i always got "internal server
EJ> error" on Trac.

Yes, something seems to have broken :-( I already emailed Robin about it,
let's hope he has time to fix it.

EJ> If the event handler for a wxSlider takes wxScrollEvent& as parameter,
EJ> compilation fails.

This is correct. wxEVT_SLIDER uses wxCommandEvent by design (but this
should clearly be documented).

Regards,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
Loading...