]> git.saurik.com Git - wxWidgets.git/commitdiff
fixing 64 bit ranger error
authorStefan Csomor <csomor@advancedconcepts.ch>
Mon, 22 Nov 2010 16:38:44 +0000 (16:38 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Mon, 22 Nov 2010 16:38:44 +0000 (16:38 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66242 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/osx/cocoa/combobox.mm

index d98f0a331e526f52a279d3c0b81d0e8f47da66d4..4aec03feb346da7f83eb578eb356d7af165f4d98 100644 (file)
@@ -144,9 +144,13 @@ wxString wxNSComboBoxControl::GetStringAtIndex(int pos) const
 
 int wxNSComboBoxControl::FindString(const wxString& text) const
 {
-    int result = [m_comboBox indexOfItemWithObjectValue:wxCFStringRef( text , m_wxPeer->GetFont().GetEncoding() ).AsNSString()];
-    if (result == NSNotFound)
+    NSInteger nsresult = [m_comboBox indexOfItemWithObjectValue:wxCFStringRef( text , m_wxPeer->GetFont().GetEncoding() ).AsNSString()];
+
+    int result;
+    if (nsresult == NSNotFound)
         result = wxNOT_FOUND;
+    else
+        result = (int) nsresult;
     return result;
 }