]> git.saurik.com Git - wxWidgets.git/commitdiff
Suppress warnings about NSText not responding to setAllowsUndo.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 4 Nov 2012 23:52:21 +0000 (23:52 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 4 Nov 2012 23:52:21 +0000 (23:52 +0000)
Cast NSText to NSTextView when sending this message to it. Hopefully it
doesn't change the run-time behaviour but just fixes several lines of warnings
that were given without this cast.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72890 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/osx/cocoa/textctrl.mm

index b1364c509c5ae9ef478dff011c9788f04c4423c2..fd5431010829da800c3be52c3fe7a78d0c96ab2c 100644 (file)
@@ -869,10 +869,10 @@ void wxNSTextFieldControl::WriteText(const wxString& str)
         wxMacEditHelper helper(m_textField);
         BOOL hasUndo = [editor respondsToSelector:@selector(setAllowsUndo:)];
         if ( hasUndo )
-            [editor setAllowsUndo:NO];
+            [(NSTextView*)editor setAllowsUndo:NO];
         [editor insertText:wxCFStringRef( str , m_wxPeer->GetFont().GetEncoding() ).AsNSString()];
         if ( hasUndo )
-            [editor setAllowsUndo:YES];
+            [(NSTextView*)editor setAllowsUndo:YES];
     }
     else
     {