[Request] Add option to avoid modal alert windows in OnlineUnlockForm

The documentation of OnlineUnlockForm is o so true:

    You should create one of these components and add it to your parent window,
    or use a DialogWindow to display it as a pop-up. But if you're writing a plugin,
    then DO NOT USE A DIALOG WINDOW! Add it as a child component of your plugin's editor
    component instead. Plugins that pop up external registration windows are incredibly
    annoying, and cause all sorts of headaches for hosts. Don't be the person who
    writes that plugin that irritates everyone with a dialog box every time they
    try to scan for new plugins!

But... what's this? In the very same OnlineUnlockForm alert windows get created.

    void timerCallback() override
    {
        spinner.setVisible (false);
        stopTimer();

        if (result.errorMessage.isNotEmpty())
        {
            AlertWindow::showMessageBoxAsync (AlertWindow::WarningIcon,
                                              TRANS("Registration Failed"),
                                              result.errorMessage);
        }
        else if (result.informativeMessage.isNotEmpty())
        {
            AlertWindow::showMessageBoxAsync (AlertWindow::InfoIcon,
                                              TRANS("Registration Complete!"),
                                              result.informativeMessage);
        }
        ...

Aren't these windows even modal? This should not be done in a plugin.

Can you add an option to display these alert windows as child components onto the OnlineUnlockForm?

Running a modal loop is the really dangerous thing, whereas this code just launches them as asynchronously modal, and they'll get deleted safely if the plugin gets unloaded while they're visible.

But yes, point taken! There should be an option to make them child components. We'll make a note of that!

Thank you for the clarification! Wasn't aware of that.

this code just launches them as asynchronously modal, and they'll get deleted safely if the plugin gets unloaded while they're visible.

Well, not if the plugin runs as an Audio Unit or as an AAX. If an alert window is displayed and the plugin gets unloaded by the user, the alert window stays.

The ugly part: The alert window won't be responsive anymore. It's buttons don't work anymore, it can't be moved around and it stays in front of everything else. Only quitting the host makes it disappear.

Hosts used: Ableton Live 9.5, Reaper 5, Pro Tools 12.2.1 on OS X.

If the plugin is a VST, alert windows do get deleted when a plugin gets unloaded.