problem with events from wxSpinCtrlDouble Topic is solved

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
spamiam
I live to help wx-kind
I live to help wx-kind
Posts: 180
Joined: Wed Apr 22, 2009 1:40 am

problem with events from wxSpinCtrlDouble

Post by spamiam »

I have a wxSpinCtrlDouble control. It all compiles fine until I add the event

Code: Select all

EVT_SPINCTRLDOUBLE(ID_CH1VPOS, V_ScopeFrame::OnCh1VPosUpdated)
It is placed in the event table with a bunch of other events from other controls which work fine. This one generates the following compiler error:

Code: Select all

2 C:\Engineering\Dev-Cpp\Projects\V_Scope6\V_ScopeFrame.cpp:72 invalid static_cast from type 'void (V_ScopeFrame::*)(wxSpinEvent&)' to type 'wxSpinDoubleEventFunction {aka void (wxEvtHandler::*)(wxSpinDoubleEvent&)}'
it would appear that the event macro is not working properly for me.

What am I doing wrong? As I siad, without that particular entry in the event table, it all compiles fine.

-Tony
User avatar
doublemax
Moderator
Moderator
Posts: 19116
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: problem with events from wxSpinCtrlDouble

Post by doublemax »

Looks like the signature of your event handler is wrong.
wxSpinEvent <> wxSpinDoubleEvent
Use the source, Luke!
spamiam
I live to help wx-kind
I live to help wx-kind
Posts: 180
Joined: Wed Apr 22, 2009 1:40 am

Re: problem with events from wxSpinCtrlDouble

Post by spamiam »

Ah, yes. It is amazing how these errors can be totally invisible until someone else points it out. Thank you.
Post Reply