I think you are using the Dialog command returning feature together with your own logic. Instead As you say that dialog.setAutoDispose(false); is not working for you You have not to put the ok command in the aceptar button if you want to mantain control on the disposal of the dialog. You have also to manage the cancelar. Add ActionListeners to aceptar and cancelar, do not use commands. Manage the disposal inside the listeners. The new dialogs that are opened in my opinion should use showDialog() to block the execution of the subsequent instructions there. Regards
Il giorno venerdì 22 gennaio 2021 alle 21:21:32 UTC+1 [email protected] ha scritto: > Hi, > > I already understand what is happening: every time I press the "btAceptar" > button, the "ok" command is activated even if the validations stop the > process with the "return" command. For that reason, if I subsequently > press the "btCancelar" button, the dispose is executed and control returns > to the starting point, assuming that the "ok" command was pressed. How do > I correct this? > -- You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/dc36ff46-ee26-40b2-b1c6-e4ec2912e150n%40googlegroups.com.
