Remove duplicated GetTextPeer() definitions from derived classes.
GetTextPeer() may be implemented directly in wxTextEntry under OS X, there is no need to define it (identically) in wxTextCtrl and wxComboBox. Also just call this method instead of duplicating its code in wxOSX wxTextCtrl. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63878 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -204,7 +204,9 @@ bool wxTextEntry::CanRedo() const
|
||||
|
||||
wxTextWidgetImpl * wxTextEntry::GetTextPeer() const
|
||||
{
|
||||
wxFAIL_MSG("You need to implement wxTextWidgetImpl* GetTextPeer() in your wxTextEntry subclass if you want to use the native impls of its methods.");
|
||||
return NULL;
|
||||
wxWindow * const win = const_cast<wxTextEntry *>(this)->GetEditableWindow();
|
||||
|
||||
return win ? dynamic_cast<wxTextWidgetImpl *>(win->GetPeer()) : NULL;
|
||||
}
|
||||
|
||||
#endif // wxUSE_TEXTCTRL
|
||||
|
Reference in New Issue
Block a user