X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/524c47aa3adf2af11a3069fd5da035a604f08f66..08670ea85abf4b4946a9ce64971b591d7b1ee30b:/src/osx/carbon/combobxc.cpp diff --git a/src/osx/carbon/combobxc.cpp b/src/osx/carbon/combobxc.cpp index 1f47fd78c8..b691300246 100644 --- a/src/osx/carbon/combobxc.cpp +++ b/src/osx/carbon/combobxc.cpp @@ -25,8 +25,6 @@ #endif #endif -IMPLEMENT_DYNAMIC_CLASS(wxComboBox, wxControl) - #if TARGET_API_MAC_OSX #define USE_HICOMBOBOX 1 //use hi combobox define #else @@ -343,7 +341,7 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id, m_text = NULL; m_choice = NULL; #if USE_HICOMBOBOX - m_macIsUserPane = false; + DontCreatePeer(); #endif if ( !wxControl::Create(parent, id, wxDefaultPosition, wxDefaultSize, style , wxDefaultValidator, name) ) @@ -478,10 +476,9 @@ void wxComboBox::SetEditable(bool editable) { m_text = new wxComboBoxText( this ); } - else if ( ( m_text != NULL ) && !editable ) + else if ( !editable ) { - delete m_text; - m_text = NULL; + wxDELETE(m_text); } int currentX, currentY; @@ -776,7 +773,7 @@ bool wxComboBox::CanRedo() const #endif } -bool wxComboBox::HandleClicked( double timestampsec ) +bool wxComboBox::OSXHandleClicked( double timestampsec ) { wxCommandEvent event(wxEVT_COMMAND_COMBOBOX_SELECTED, m_windowId ); event.SetInt(GetSelection());