simplifying native string handling, see #11061

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61698 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2009-08-18 15:30:24 +00:00
parent eceb28f912
commit f66ecdc4fb
7 changed files with 32 additions and 23 deletions

View File

@@ -333,8 +333,7 @@ wxString wxNSTextViewControl::GetStringValue() const
{
if (m_textView)
{
wxCFStringRef cf( (CFStringRef) [[m_textView string] retain] );
wxString result = cf.AsString(m_wxPeer->GetFont().GetEncoding());
wxString result = wxCFStringRef::AsString([m_textView string], m_wxPeer->GetFont().GetEncoding());
wxMacConvertNewlines13To10( &result ) ;
return result;
}
@@ -446,8 +445,7 @@ wxNSTextFieldControl::~wxNSTextFieldControl()
wxString wxNSTextFieldControl::GetStringValue() const
{
wxCFStringRef cf( (CFStringRef) [[m_textField stringValue] retain] );
return cf.AsString(m_wxPeer->GetFont().GetEncoding());
return wxCFStringRef::AsString([m_textField stringValue], m_wxPeer->GetFont().GetEncoding());
}
void wxNSTextFieldControl::SetStringValue( const wxString &str)