]> git.saurik.com Git - wxWidgets.git/commitdiff
Change SetStringSelection to return bool like in other classes and ports
authorRobin Dunn <robin@alldunn.com>
Tue, 27 Apr 2004 19:59:35 +0000 (19:59 +0000)
committerRobin Dunn <robin@alldunn.com>
Tue, 27 Apr 2004 19:59:35 +0000 (19:59 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26990 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/gtk/combobox.h
include/wx/gtk1/combobox.h
src/gtk/combobox.cpp
src/gtk1/combobox.cpp

index 6cd8dafe5b5ed04df92d473f787a36022a697e72..b3756066cc289528c49df240c94c9b8870088650 100644 (file)
@@ -96,7 +96,7 @@ public:
     int Number() const { return GetCount(); }
     void SetSelection( int n );
     void Select( int n ) { return SetSelection( n ); }
-    void SetStringSelection( const wxString &string );
+    bool SetStringSelection( const wxString &string );
     void SetString(int n, const wxString &text);
 
     wxString GetValue() const;
index 6cd8dafe5b5ed04df92d473f787a36022a697e72..b3756066cc289528c49df240c94c9b8870088650 100644 (file)
@@ -96,7 +96,7 @@ public:
     int Number() const { return GetCount(); }
     void SetSelection( int n );
     void Select( int n ) { return SetSelection( n ); }
-    void SetStringSelection( const wxString &string );
+    bool SetStringSelection( const wxString &string );
     void SetString(int n, const wxString &text);
 
     wxString GetValue() const;
index 43ed08ba4abbc08b5575ca19b6cec007496ad632..7660f4a9fa47db790490bf376103e86a2d88d512 100644 (file)
@@ -557,13 +557,14 @@ void wxComboBox::SetSelection( int n )
     EnableEvents();
 }
 
-void wxComboBox::SetStringSelection( const wxString &string )
+bool wxComboBox::SetStringSelection( const wxString &string )
 {
-    wxCHECK_RET( m_widget != NULL, wxT("invalid combobox") );
+    wxCHECK_MSG( m_widget != NULL, false, wxT("invalid combobox") );
 
     int res = FindString( string );
-    if (res == -1) return;
+    if (res == -1) return false;
     SetSelection( res );
+    return true;
 }
 
 wxString wxComboBox::GetValue() const
index 43ed08ba4abbc08b5575ca19b6cec007496ad632..7660f4a9fa47db790490bf376103e86a2d88d512 100644 (file)
@@ -557,13 +557,14 @@ void wxComboBox::SetSelection( int n )
     EnableEvents();
 }
 
-void wxComboBox::SetStringSelection( const wxString &string )
+bool wxComboBox::SetStringSelection( const wxString &string )
 {
-    wxCHECK_RET( m_widget != NULL, wxT("invalid combobox") );
+    wxCHECK_MSG( m_widget != NULL, false, wxT("invalid combobox") );
 
     int res = FindString( string );
-    if (res == -1) return;
+    if (res == -1) return false;
     SetSelection( res );
+    return true;
 }
 
 wxString wxComboBox::GetValue() const