The reason I don't like event tables is that I found that if I declare the event table in the header file (I suppose this is necessary?) and include it in multiple files, then the same implementation of event table will get compiled multiple times and this results in a compile error which I run into from time to time.
(BTW, am I right about event table? Or is there another way to use it? I'm new to wxWidgets ...)
As a result I would like to change the event tables into 'Connect' and I wonder if there is a systematic way? For example, if I want to translate the code below:
Code: Select all
BEGIN_EVENT_TABLE(wxImagePanel, wxPanel)
EVT_PAINT(wxImagePanel::paintEvent)
END_EVENT_TABLE()
Code: Select all
Connect(wxEVT_PAINT, wxPaintEventHandler(paintEvent));