Hello
I have a programmed GUI that performs an import from a database based on a given TimeStamp. Currently, I have programmed a notification in the Output Console. If no data is found in the SQL query executed through a preparedStatement, it notifies with a message that there is no data.
// Verificar si el ResultSet está vacío int hasData = resultSet.fetchNext(); if (!hasData) { string errorMessage = "Error: No se encontraron datos para el timestamp: " + selectedTimestamp; print(errorMessage); // Mantener la salida en la consola showErrorPopup(errorMessage); // Mostrar el mensaje en una ventana emergente con.disconnect(); return 0; // Asegurarse de que el return sea válido en FlexScript
In the same If statement where I see this, I would like to configure it to pop up a window in the center of the screen indicating this to the user, with an OK button that, when pressed, closes the window (or any other solution to close this pop-up window).
I know this event can be triggered through a User Command from this If statement, but I have no idea how to code this. Does the window need to be created beforehand and then made to appear with a command, or can it be created by code each time this condition occurs?
Currently, I use the command print() and the Output Console; however, I would like to learn how to create a popup window.
Thank you very much in advance for your comments.