showNativeDialogBox() different on Mac/XP


#1

Moin,

Think this is a bug, on Mac I have to reverse the result:

#if JUCE_MAC
        if(!AlertWindow::showNativeDialogBox(T("Spectre"),txt,true))
#else
        if(AlertWindow::showNativeDialogBox(T("Spectre"),txt,true))
#endif

No big deal, but a bit annoying though…

Stefan


#2

Yes, sorry - that does look like a typo. The fix should just be this, in juce_mac_MiscUtilities.mm:

bool AlertWindow::showNativeDialogBox (const String& title, const String& bodyText, bool isOkCancel) { const ScopedAutoReleasePool pool; return NSRunAlertPanel (juceStringToNS (title), juceStringToNS (bodyText), @"Ok", isOkCancel ? @"Cancel" : nil, nil) == NSAlertDefaultReturn; }

Thanks for flagging it, I’ll check that change in asap…