Search code examples
wxwidgets

Event Table and Connect


Out of curiosity, I have declared an Event Table in a .cpp file, is it still possible to use Connect in the same .cpp file at other function calls?


Solution

  • Yes, of course, why not. It is even possible to use both event tables and Connect() or Bind() for the same object, and while this is not recommended because it can be confusing, it does work in a well-defined way: first, the dynamic (i.e. those connected or bound with the corresponding function) event handlers are considered and if none of them handles the event, then the search continues with the event table entries.