Seems like the UI is busy and the application will have to retry to make the switch.
I'm able to replicate in my lab with a quick switch to button and at times it may take up too 5 tries. Can you create the workaround to attempt a retry until successful or until a timeout occurs.
See code snippet below:
private void dischargeButtonActionPerform(int c) {
UserWindow.println("[UserWindow] dischargeButtonActionPerform()");
int _tries = 5;
if (!copiable) {
ErrorMessageDialog error = new ErrorMessageDialog(this);
error.setErrorCode("Inavailable!");
error.setErrorMessage("Copy function is not available for you.");
error.show();
} else {
count -= c;
if (count 1) {
count = 0;
try {
SysEventManager.getInstance().requestVisibleXlet(productId);
_tries = -1;
} catch (Exception e) {
e.printStackTrace();
}
try {
UserWindow.println("[UserWindow] extContext.setRemain() false");
extContext.setRemain(false);
} catch (Exception e) {
e.printStackTrace();
}
while (0 _tries) {
try {
SysEventManager.getInstance().requestVisibleXlet(productId);
_tries = -1;
} catch (GetOwnerShipException e) {
// TODO Auto-generated catch block
e.printStackTrace();
_tries--;
} catch (GetOwnerShipResultException e) {
// TODO Auto-generated catch block
e.printStackTrace();
_tries--;
}
}
}
counter.setText("Copier count: $" + count);
this.repaint();
}
}
FAQ Subject
Faq Category