Fix harmless recently introduced warning in wxOSX

Add an explicit cast to suppress "NSString may not respond to 'string'"
warning from clang given since d1c5f107a1.
This commit is contained in:
Vadim Zeitlin
2017-04-04 06:54:56 -07:00
parent 2b026e02e8
commit 200ea47519

View File

@@ -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];