]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/textctrl.cpp
Fix typo in last commit
[wxWidgets.git] / src / os2 / textctrl.cpp
index 24dca77ce6d235e51474846d2a6d370a5adf8c9d..3be381a95f154c62551524b43d0bb9327f2a8698 100644 (file)
@@ -55,8 +55,6 @@
 // event tables and other macros
 // ----------------------------------------------------------------------------
 
 // event tables and other macros
 // ----------------------------------------------------------------------------
 
-IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl, wxTextCtrlBase)
-
 BEGIN_EVENT_TABLE(wxTextCtrl, wxTextCtrlBase)
     EVT_CHAR(wxTextCtrl::OnChar)
     EVT_DROP_FILES(wxTextCtrl::OnDropFiles)
 BEGIN_EVENT_TABLE(wxTextCtrl, wxTextCtrlBase)
     EVT_CHAR(wxTextCtrl::OnChar)
     EVT_DROP_FILES(wxTextCtrl::OnDropFiles)
@@ -329,7 +327,8 @@ void wxTextCtrl::SetupColours()
 wxString wxTextCtrl::GetValue() const
 {
     wxString                        sStr = wxGetWindowText(GetHWND());
 wxString wxTextCtrl::GetValue() const
 {
     wxString                        sStr = wxGetWindowText(GetHWND());
-    char*                           zStr = sStr.char_str();
+    wxCharBuffer                    buf(sStr.char_str());
+    char*                           zStr = buf.data();
 
     for ( ; *zStr; zStr++ )
     {
 
     for ( ; *zStr; zStr++ )
     {
@@ -370,7 +369,7 @@ void wxTextCtrl::WriteText(
 )
 {
     if (m_bIsMLE)
 )
 {
     if (m_bIsMLE)
-        ::WinSendMsg(GetHwnd(), MLM_INSERT, MPARAM(rsValue.char_str()), MPARAM(0));
+        ::WinSendMsg(GetHwnd(), MLM_INSERT, MPARAM(rsValue.wx_str()), MPARAM(0));
     else
         ::WinSetWindowText(GetHwnd(), rsValue.c_str());
     AdjustSpaceLimit();
     else
         ::WinSetWindowText(GetHwnd(), rsValue.c_str());
     AdjustSpaceLimit();
@@ -717,7 +716,7 @@ void wxTextCtrl::MarkDirty()
         ::WinSendMsg(GetHwnd(), MLM_SETCHANGED, MPFROMLONG(TRUE), 0);
     else
         // EM controls do not have a SETCHANGED, what can we do??
         ::WinSendMsg(GetHwnd(), MLM_SETCHANGED, MPFROMLONG(TRUE), 0);
     else
         // EM controls do not have a SETCHANGED, what can we do??
-        wxFAIL_MSG( _T("not implemented") );
+        wxFAIL_MSG( wxT("not implemented") );
 }
 
 //
 }
 
 //
@@ -1048,7 +1047,7 @@ void wxTextCtrl::OnChar(
                 wxCommandEvent      vEvent(wxEVT_COMMAND_TEXT_ENTER, m_windowId);
 
                 vEvent.SetEventObject(this);
                 wxCommandEvent      vEvent(wxEVT_COMMAND_TEXT_ENTER, m_windowId);
 
                 vEvent.SetEventObject(this);
-                if ( GetEventHandler()->ProcessEvent(vEvent))
+                if ( HandleWindowEvent(vEvent))
                     return;
             }
             //else: multiline controls need Enter for themselves
                     return;
             }
             //else: multiline controls need Enter for themselves
@@ -1070,7 +1069,7 @@ void wxTextCtrl::OnChar(
                 vEventNav.SetWindowChange(false);
                 vEventNav.SetEventObject(this);
 
                 vEventNav.SetWindowChange(false);
                 vEventNav.SetEventObject(this);
 
-                if ( GetEventHandler()->ProcessEvent(vEventNav) )
+                if ( HandleWindowEvent(vEventNav) )
                     return;
             }
             break;
                     return;
             }
             break;
@@ -1094,7 +1093,7 @@ bool wxTextCtrl::OS2Command(
                                           );
 
                 vEvent.SetEventObject(this);
                                           );
 
                 vEvent.SetEventObject(this);
-                GetEventHandler()->ProcessEvent(vEvent);
+                HandleWindowEvent(vEvent);
             }
             break;
 
             }
             break;