]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/textctrl.cpp
add IsOk() to all classes having Ok() method (patch 1570985)
[wxWidgets.git] / src / mac / carbon / textctrl.cpp
index 6994913a8542bbdac6178ff3d5817496d0ca1b03..bd001090857696b0a464774509bbd69a599d18dc 100644 (file)
@@ -475,10 +475,7 @@ bool wxTextCtrl::Create( wxWindow *parent,
 
     if ( m_windowStyle & wxTE_MULTILINE )
     {
-        wxASSERT_MSG(
-            !(m_windowStyle & wxTE_PROCESS_ENTER),
-            wxT("wxTE_PROCESS_ENTER style is ignored for multiline text controls (they always process it)") );
-
+        // always turn on this style for multi-line controls
         m_windowStyle |= wxTE_PROCESS_ENTER;
         style |= wxTE_PROCESS_ENTER ;
     }
@@ -567,6 +564,15 @@ void wxTextCtrl::SetValue(const wxString& str)
     }
 }
 
+void wxTextCtrl::ChangeValue(const wxString& str)
+{
+    // optimize redraws
+    if ( GetValue() == str )
+        return ;
+
+    GetPeer()->SetStringValue( str ) ;
+}
+
 void wxTextCtrl::SetMaxLength(unsigned long len)
 {
     m_maxLength = len ;
@@ -708,11 +714,6 @@ void wxTextCtrl::SetSelection(long from, long to)
     GetPeer()->SetSelection( from , to ) ;
 }
 
-bool wxTextCtrl::LoadFile(const wxString& file)
-{
-    return wxTextCtrlBase::LoadFile( file );
-}
-
 void wxTextCtrl::WriteText(const wxString& str)
 {
     // TODO: this MPRemoting will be moved into a remoting peer proxy for any command