X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c84030e020e56735cb4b7c1534e99d21a8bb48c0..2c755d9bbf4c786a03cf6193c630fc986a69f802:/src/osx/cocoa/combobox.mm?ds=sidebyside diff --git a/src/osx/cocoa/combobox.mm b/src/osx/cocoa/combobox.mm index 0438d14866..56ce4b05ca 100644 --- a/src/osx/cocoa/combobox.mm +++ b/src/osx/cocoa/combobox.mm @@ -124,7 +124,10 @@ wxString wxNSComboBoxControl::GetStringAtIndex(int pos) const int wxNSComboBoxControl::FindString(const wxString& text) const { - return [m_comboBox indexOfItemWithObjectValue:wxCFStringRef( text , m_wxPeer->GetFont().GetEncoding() ).AsNSString()]; + int result = [m_comboBox indexOfItemWithObjectValue:wxCFStringRef( text , m_wxPeer->GetFont().GetEncoding() ).AsNSString()]; + if (result == NSNotFound) + result = wxNOT_FOUND; + return result; } wxWidgetImplType* wxWidgetImpl::CreateComboBox( wxWindowMac* wxpeer,