indiocolifa Messages: 49 Registered: January 2008 Location: Argentina
Member
I don't know why I'm needing two clicks to dismiss an Exclamation popup box in this code.
I'm using lastFocus to store the focus of the last control and validate (in this case edtNSerie):
if (lastFocus == &edtNSerie)
{
Sql sql(PSQL_SESSION);
// observar si hay un caso abierto para el equipo
sql.Execute(Format("SELECT numcaso FROM caso WHERE nserie='%s' AND estado!='CERRADO'",
::ToUpper(TRIM((String)~edtNSerie))));
sql.Fetch();
if (sql.GetRowsProcessed())
{
Exclamation(Format("Este equipo ya tiene un caso abierto, numerado [* \%d].&"
"Debe cerrar este caso para poder continuar.", sql[0] ));
edtNSerie<<= "";
lastFocus=NULL;
}
...
That Exclamation call needs two clicks to return to the main dialog.