From 00c89b220733a97ef5c6c500450ae76c8573d0d9 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 2 Mar 2009 19:28:44 +0000 Subject: [PATCH] another wxOSX build fix after wxTextEntry::GetValue() renaming to DoGetValue() git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59278 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/osx/combobox.h | 9 +++++---- src/osx/carbon/combobox.cpp | 7 +++++++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/include/wx/osx/combobox.h b/include/wx/osx/combobox.h index e115a4c847..9f9602903c 100644 --- a/include/wx/osx/combobox.h +++ b/include/wx/osx/combobox.h @@ -126,7 +126,7 @@ class WXDLLIMPEXP_CORE wxComboBox : public wxControl, public wxComboBoxBase virtual wxClientDataType GetClientDataType() const; // osx specific event handling common for all osx-ports - + virtual bool OSXHandleClicked( double timestampsec ); wxCONTROL_ITEMCONTAINER_CLIENTDATAOBJECT_RECAST @@ -141,6 +141,10 @@ protected: virtual void DoDeleteOneItem(unsigned int n); virtual void DoClear(); + // wxTextEntry functions + virtual wxString DoGetValue() const; + virtual wxWindow *GetEditableWindow() { return this; } + // override the base class virtuals involved in geometry calculations virtual wxSize DoGetBestSize() const; virtual void DoMoveWindow(int x, int y, int width, int height); @@ -154,9 +158,6 @@ protected: virtual void SetClientDataType(wxClientDataType clientDataItemsType); - // implement wxTextEntry pure virtual method - virtual wxWindow *GetEditableWindow() { return this; } - // the subcontrols wxComboBoxText* m_text; wxComboBoxChoice* m_choice; diff --git a/src/osx/carbon/combobox.cpp b/src/osx/carbon/combobox.cpp index 807194c8d7..6792bbf1ae 100644 --- a/src/osx/carbon/combobox.cpp +++ b/src/osx/carbon/combobox.cpp @@ -394,6 +394,13 @@ bool wxComboBox::Create(wxWindow *parent, return true; } +wxString wxComboBox::DoGetValue() const +{ + wxCHECK_MSG( m_text, wxString(), "can't be called for read-only combobox" ); + + return m_text->GetValue(); +} + wxString wxComboBox::GetValue() const { wxString result; -- 2.47.2