cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
bdshan
Level 4

queryExit event not executing

I created a custom dialog inthe Finish group. I added the event queryExit to the dialogs swing code. When the Finish button is click on the dialog none of the code in the queryExit event is executed. Would anyone know why this is, and what a work around might be?
Labels (1)
0 Kudos
(2) Replies
rmackay
Level 7

This happened to me once before when I cut and paste some queryExit code from another panel into the code editor INSTEAD of first creating the event using the little event creator thing in the dialog code editor.
0 Kudos
bdshan
Level 4

I had opened a support case for this problem. A support engineer sent me a sample project in which this was working. Comparing the code I found one small discrepenciy that made all the difference.

Our code in FrameFinish.java

SwingWizardUI wizardUI = (SwingWizardUI)context.getWizardUI();
if (isLast)
wizardUI.finish(false);
else
wizardUI.doNext();


The sample code had this

SwingWizardUI wizardUI = (SwingWizardUI)context.getWizardUI();
wizardUI.doNext();
if (isLast)
wizardUI.finish(false);


As soon as wizardUI.finish(false) was executed all other code is not executed and the install gracefully terminates. But if wizardUI.doNext() executes first the queryExit event is then executed on our custom dialog.
0 Kudos