Texteditor in AlertWindow doesn't work in Juce6.1.4


i successfully integrated a text editor in an alert window using Juce 5.4.7, Mac:
juce::AlertWindow myAl(“title:”, “message”, juce::AlertWindow::InfoIcon);
myAl.addTextEditor(“password”, “”, “”);

In Juce6.1.4, it doesn’t work any more, as showAsync() now needs arguments like MessageBoxOptions. But MessageBoxOptions doesn’t allow to add a text editor.
What to do?

Thank you

It looks to me like you should be able to do something similar by creating the AlertWindow on the heap, and then calling enterModalState on it:

auto* window = new juce::AlertWindow ("title:", "message", juce::AlertWindow::InfoIcon);
window->addTextEditor ("password", "", "");
window->setAlwaysOnTop (true);
window->enterModalState (true, nullptr, true);

There’s an example in JUCE DemoRunner: