The blocking issue happens also on real iPad II device, that is, the CommandDialog not closing. But the button are pressed and the action is executed as far as I understand by testing.
The issue is not happening on Android or CN simulator instead.
I would like to know if there are differences in threading such that the CommandDialog mechanism does not work.
The CommandDialog has a background AlertDialog and it has another AlertDialog upon the background one.
After one of the buttons is pressed the action is executed and both the dialogs are closed.
There is a blocking instruction inside that is released.
But I would like to know if it is differently handled on iOS.
invokeAndBlock(runnable);
is the instruction, where
runnable=new Runnable() {
@Override
public void run() {
thread=Thread.currentThread();
try {
Thread.sleep(60*60*1000);
} catch (InterruptedException e) {
afterActions();
}
}
};
and
button.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent evt) {
globalCommand = command;
System.out.println("button listener called");
thread.interrupt();
}
});
Furthermore, I do not know if it is relevant,
but I created a method
fakeShow()
that has to be called in the form's showListener,
creating and closing a fake CommandDialog, this somehow allowed the subsequent CommandDialogs to work, maybe making some initial "cleaning".
(in the showListener of forms)
CommandDialog emptyDialogToBeOpenedForOtherDialogsToSpread=
new CommandDialog(currentForm);
emptyDialogToBeOpenedForOtherDialogsToSpread.fakeShow();
I cannot recall exactly, but it fixed similar issue on Android and CN simulator, so I wonder if on iOS there is something similar but that the workaround is not useful to fix.
Thanks
Regards