Do you mean something like this?
public static void openMyDialog(Form form, other parameters)
{
final InteractionDialog myDialog=new InteractionDialog();
...
Command oldBackCommand=form.getBackCommand();
Command backCommand=new Command("Back") {
@Override
public void actionPerformed(ActionEvent evt) {
form.setBackCommand(oldBackCommand);
myDialog.dispose();
}
};
form.setBackCommand(backCommand);
...
}
Is it safe?
Il giorno venerdì 4 dicembre 2020 alle 05:15:52 UTC+1 Shai Almog ha scritto:
> Use setBackCommand on the form. Install a command to the back action. In
> its actionPerformed check if you have an interaction dialog to dispose and
> dispose that. If not go to the previous form.
>
> On Thursday, December 3, 2020 at 11:49:09 AM UTC+2 P5music wrote:
>
>> *I have a method call to set the back command in my utility dialogs, in a
>> special class with static methods.*
>> *Now I have to use InteractionDialog instead of Dialog but I do not know
>> how to implement this kind of line*
>> *if (cancellable) alertDialog.setBackCommand(backCommand);*
>> *Thanks in advance*
>>
>
--
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/8bdef0a4-6983-4967-b24b-3b810f77c45en%40googlegroups.com.