I’m trying to figure out how to either pause the timer or do a callback to start the timer that way the server can validate the text input from the user. It always passes null then when closing modal it startimer then validates. Can someone please help me figure out this? Should I use a different alertWindow with async?
Here’s the timerCallback:
void ProjectAudioProcessorEditor::timerCallback()
{
stopTimer();
AlertWindow w("AW demo", "stuff", AlertWindow::QuestionIcon);
w.addTextEditor("text", "Enter stuff here", "Enter Stuff");
w.addButton("OK", 1, KeyPress(KeyPress::returnKey, 0, 0));
w.addButton("Cancel", 0, KeyPress(KeyPress::escapeKey, 0, 0));
if (w.runModalLoop() != 0)
{
name = w.getTextEditorContents("text");
startTimer(200);
}
String url = "http://www.site.com/Call.php?test=" + name;
URL authURL(url);
InputStream *input = authURL.createInputStream(false);
String result = input->readString();
//Always returns false.
}