Replace dynamic casts with virtual wxWindow::WXGetTextEntry()
Instead of checking for all text-like controls one by one in wxCommandEvent::GetString(), call a virtual function checking for this. This is simpler, less error-prone and faster -- at the cost of increasing the vtbl size of all wxWindow-derived classes. Closes https://github.com/wxWidgets/wxWidgets/pull/1696
This commit is contained in:
@@ -102,6 +102,8 @@ class WXDLLIMPEXP_CORE wxComboBox :
|
||||
#endif // wxOSX_USE_COCOA
|
||||
|
||||
|
||||
virtual const wxTextEntry* WXGetTextEntry() const wxOVERRIDE { return this; }
|
||||
|
||||
// osx specific event handling common for all osx-ports
|
||||
|
||||
virtual bool OSXHandleClicked(double timestampsec) wxOVERRIDE;
|
||||
|
Reference in New Issue
Block a user