Showing an AlertWindow on ios


#1

When trying to show an alert window on ios (with the ipad simulator 4.3 if it matters),
the window won’t show up until I click somewhere. Does anyone know if the behaviour is the same on a real ipad?

AlertWindow::showMessageBoxAsync (AlertWindow::NoIcon, "This is an AlertWindow", "blah blah ", "ok");

ps : If one wants to reproduce it within the juce widget demo, he must be careful not to select “show a plain alert-window” while dragging,
but with just a single click :

click on the “click for a popup menu” button and drag (it is important to drag, do not release the mouse) until your mouse is over “alert window demonstrations” and release the mouse when you are over it, so that you can now perform a single clic on “show a plain alert-window”.

the window won’t show up until you click somewhere.

Let me know if you can’t reproduce or if there’s no problem on a real ipad.


#2

Sounds like it’s just not getting brought to the front… Does it help if you add this in the AlertWindowInfo::show() method?

{ alertBox->enterModalState (true, callback, true); alertBox->toFront (true); alertBox.release(); }

(BTW on iOS you’d probably want to use NativeMessageBox::showMessageBoxAsync instead, for a more native box)


#3

I haven’t seen this issue on a real iPad… must be a simulator thing.


#4

sorry for the late answer.

adding alertBox->toFront (true); didn’t help.

but with that, it seems the window appears really quickly before going back immediatly to the background
(so I then have to click once in the background to make it appear, as before).


#5

btw, thanks for noticing NativeMessageBox::showMessageBoxAsync. with it, there’s no problem, it is nicely brought to the front,
but I’m using an AlertWindow because I need to add a text editor to it.