+ handler.Connect( MyEventType, &MyHandler::OnMyEvent );
+ g_called.Reset();
+ handler.ProcessEvent(e);
+ CPPUNIT_ASSERT( g_called.method );
+ handler.Disconnect( MyEventType, &MyHandler::OnMyEvent );
+ g_called.Reset();
+ handler.ProcessEvent(e);
+ CPPUNIT_ASSERT( !g_called.method );
+
+ handler.Connect( 0, MyEventType, &MyHandler::OnMyEvent );
+ handler.Disconnect( 0, MyEventType, &MyHandler::OnMyEvent );
+
+ handler.Connect( 0, 0, MyEventType, &MyHandler::OnMyEvent );
+ handler.Disconnect( 0, 0, MyEventType, &MyHandler::OnMyEvent );
+}
+
+void EvtHandlerTestCase::ConnectMethodUsingBaseEvent()
+{
+ // test connecting a method taking just wxEvent and not MyEvent: this
+ // should work too if we don't need any MyEvent-specific information in the
+ // handler
+ handler.Connect( MyEventType, &MyHandler::OnEvent );