From 200ea47519ea7aa198b96c10be69df07b4be6a9a Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 4 Apr 2017 06:54:56 -0700 Subject: [PATCH] Fix harmless recently introduced warning in wxOSX Add an explicit cast to suppress "NSString may not respond to 'string'" warning from clang given since d1c5f107a1abb970af9d775a4eaea28bd450d85e. --- src/osx/cocoa/textctrl.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osx/cocoa/textctrl.mm b/src/osx/cocoa/textctrl.mm index 3e3ea709b1..91ff45b905 100644 --- a/src/osx/cocoa/textctrl.mm +++ b/src/osx/cocoa/textctrl.mm @@ -726,7 +726,7 @@ bool wxNSTextViewControl::CanFocus() const void wxNSTextViewControl::insertText(NSString* str, WXWidget slf, void *_cmd) { - NSString *text = [str isKindOfClass:[NSAttributedString class]] ? [str string] : str; + NSString *text = [str isKindOfClass:[NSAttributedString class]] ? [(id)str string] : str; if ( m_lastKeyDownEvent ==NULL || !DoHandleCharEvent(m_lastKeyDownEvent, text) ) { wxOSX_TextEventHandlerPtr superimpl = (wxOSX_TextEventHandlerPtr) [[slf superclass] instanceMethodForSelector:(SEL)_cmd];