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

Retrieving password entered on a dialog

I have created a dialog which asks for user / password information. Based on the instructions in the Help, I have the following code in the SwingEvents tab for the dialog --

public void queryExitISCUserCredentialsDialog(com.installshield.event.ui.ISDialogQueryContext arg0) {
ISPasswordControl pwc = (ISPasswordControl)arg0.getISPanel().getControl("ISCPasswordControlDef");
try{
arg0.getServices().getISDatabase().setVariableValue("ISC_PASSWORD", pwc.getText());
} catch (Throwable e){
e.printStackTrace();
}
}

For some reason, this dialog doesnt get displayed. Is there anything obvious I am missing? Thx.
Labels (1)
0 Kudos

(1) Reply
Barry_Lawson
Level 3

Try this:
ISPasswordControl PasswdCtrl = (ISPasswordControl)arg0.getISPanel().getControl("HostPasswd");
String Password = PasswdCtrl.getText();
0 Kudos