X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8095ef23e7b800e88cfdae4991f474c34175e9e4..205b0c9c6aa69c02a7774846e677910bf1609a53:/src/mac/combobox.cpp diff --git a/src/mac/combobox.cpp b/src/mac/combobox.cpp index 8ea92291e2..feee187143 100644 --- a/src/mac/combobox.cpp +++ b/src/mac/combobox.cpp @@ -14,6 +14,7 @@ #endif #include "wx/combobox.h" +#include "wx/button.h" #include "wx/menu.h" #include "wx/mac/uma.h" @@ -59,7 +60,7 @@ public: protected: void OnChar( wxKeyEvent& event ) { - if ( event.KeyCode() == WXK_RETURN ) + if ( event.GetKeyCode() == WXK_RETURN ) { wxString value = GetValue(); @@ -261,10 +262,6 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id, const wxValidator& validator, const wxString& name) { - - Rect bounds ; - Str255 title ; - if ( !wxControl::Create(parent, id, wxDefaultPosition, wxDefaultSize, style , wxDefaultValidator, name) ) { @@ -411,6 +408,10 @@ void wxComboBox::Append(const wxString& item) void wxComboBox::Delete(int n) { + if ( HasClientObjectData() ) + { + SetClientObject(n, NULL); + } m_choice->Delete( n ); } @@ -465,7 +466,7 @@ bool wxComboBox::SetStringSelection(const wxString& sel) return FALSE; } -void wxComboBox::MacHandleControlClick( WXWidget control , wxInt16 controlpart ) +void wxComboBox::MacHandleControlClick( WXWidget WXUNUSED(control) , wxInt16 WXUNUSED(controlpart) ) { wxCommandEvent event(wxEVT_COMMAND_COMBOBOX_SELECTED, m_windowId ); event.SetInt(GetSelection());