X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8584b0e64b273273bad122d28b10176bd5a3bc84..b059c519bfd4830a8ca3dd58ca844ce623e6fcaa:/src/osx/combobox_osx.cpp diff --git a/src/osx/combobox_osx.cpp b/src/osx/combobox_osx.cpp index bf092f3772..fe9f812f75 100644 --- a/src/osx/combobox_osx.cpp +++ b/src/osx/combobox_osx.cpp @@ -25,10 +25,6 @@ wxComboBox::~wxComboBox() { } -void wxComboBox::Init() -{ -} - bool wxComboBox::Create(wxWindow *parent, wxWindowID id, const wxString& value, const wxPoint& pos, @@ -53,18 +49,18 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id, const wxValidator& validator, const wxString& name) { + DontCreatePeer(); + m_text = NULL; m_choice = NULL; - - m_macIsUserPane = false; - + if ( !wxControl::Create( parent, id, pos, size, style, validator, name ) ) return false; wxASSERT_MSG( !(style & wxCB_SORT), "wxCB_SORT not currently supported by wxOSX/Cocoa"); - m_peer = wxWidgetImpl::CreateComboBox( this, parent, id, NULL, pos, size, style, GetExtraStyle() ); + SetPeer(wxWidgetImpl::CreateComboBox( this, parent, id, NULL, pos, size, style, GetExtraStyle() )); MacPostControlCreate( pos, size ); @@ -110,7 +106,7 @@ int wxComboBox::DoInsertItems(const wxArrayStringsAdapter& items, AssignNewItemClientData(idx, clientData, i, type); } - m_peer->SetMaximum( GetCount() ); + GetPeer()->SetMaximum( GetCount() ); return pos - 1; } @@ -216,7 +212,7 @@ bool wxComboBox::OSXHandleClicked( double WXUNUSED(timestampsec) ) wxComboWidgetImpl* wxComboBox::GetComboPeer() const { - return dynamic_cast (m_peer); + return dynamic_cast (GetPeer()); } #endif // wxUSE_COMBOBOX && wxOSX_USE_COCOA