+ // work out what to display
+ // if the extended text is empty then we use the caption as the title
+ // and the message as the text (for backwards compatibility)
+ // but if the extended message is not empty then we use the message as the title
+ // and the extended message as the text because that makes more sense
+
+ wxString msgtitle,msgtext;
+ if(m_extendedMessage.IsEmpty())
+ {
+ msgtitle = m_caption;
+ msgtext = m_message;
+ }
+ else
+ {
+ msgtitle = m_message;
+ msgtext = m_extendedMessage;
+ }
+
+ NSAlert* alert = [[NSAlert alloc] init];
+ NSAlertStyle alertType = GetAlertStyleFromWXStyle(style);
+
+ wxCFStringRef cfNoString( GetNoLabel(), GetFont().GetEncoding() );
+ wxCFStringRef cfYesString( GetYesLabel(), GetFont().GetEncoding() );
+ wxCFStringRef cfOKString( GetOKLabel(), GetFont().GetEncoding() );
+ wxCFStringRef cfCancelString( GetCancelLabel(), GetFont().GetEncoding() );
+
+ wxCFStringRef cfTitle( msgtitle, GetFont().GetEncoding() );
+ wxCFStringRef cfText( msgtext, GetFont().GetEncoding() );
+
+ [alert setMessageText:cfTitle.AsNSString()];
+ [alert setInformativeText:cfText.AsNSString()];
+ [alert setAlertStyle:alertType];
+
+ m_buttonCount = 0;
+
+ if (style & wxYES_NO)
+ {
+ if ( style & wxNO_DEFAULT )