From faa88eb768f87502e627f41af29d279b30a12114 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Fri, 15 May 2009 04:32:36 +0000 Subject: [PATCH] applying, closes #9012 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60638 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/osx/carbon/textctrl.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/osx/carbon/textctrl.cpp b/src/osx/carbon/textctrl.cpp index cc998a68f9..57c315012a 100644 --- a/src/osx/carbon/textctrl.cpp +++ b/src/osx/carbon/textctrl.cpp @@ -1125,6 +1125,15 @@ long wxMacMLTEControl::GetLastPosition() const wxTextPos actualsize = 0 ; Handle theText ; +#if wxUSE_UNICODE + OSErr err = TXNGetDataEncoded( m_txn, kTXNStartOffset, kTXNEndOffset, &theText, kTXNUnicodeTextData ); + // all done + if ( err == noErr ) + { + actualsize = GetHandleSize( theText )/sizeof(UniChar); + DisposeHandle( theText ) ; + } +#else OSErr err = TXNGetDataEncoded( m_txn, kTXNStartOffset, kTXNEndOffset, &theText, kTXNTextData ); // all done @@ -1133,6 +1142,7 @@ long wxMacMLTEControl::GetLastPosition() const actualsize = GetHandleSize( theText ) ; DisposeHandle( theText ) ; } +#endif else { actualsize = 0 ; -- 2.45.2