cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
mplanchart
Level 5

Events never get triggered!

Hi,

Events never get triggered!

Why?

For example:

The following code is an event that should occur after the combo box has changed selected value:

This never gets triggered, as well as almost every other event. Why?

public void selectionChangedISComboBoxProvisioningImplementation(com.installshield.event.ui.ISControlContext arg0)
{
ISPanel panel = (ISPanel)arg0.getISContainer();
ISFrame frame = panel.getISFrame();

ISTextField wTextField0 = frame.getTextField("ISTextField_TEST");
wTextField0.setText("Hit Event!");

ISComboBox wComboBox0 = frame.getComboBoxControl("ISComboBoxProvisioningImplementation");

String wCBSelectedValue = wComboBox0.getSelectedValue();

ISButton nextButton = frame.getButton(NEXT_BUTTON);
nextButton.setEnabled(false); //Must normally be set to false

ISRadioButton wRadioButton0 = frame.getRadioButton("ISRadioButtonProvisioningType_Simple");
ISRadioButton wRadioButton1 = frame.getRadioButton("ISRadioButtonProvisioningType_Advanced");

ISFlowLabel wFlowLabel0 = frame.getFlowLabelControl("ISFlowLabel_ProvisioningType");

if (wCBSelectedValue == "Computer Associates eTrust") {
wRadioButton0.setEnabled(false);
wRadioButton1.setEnabled(false);
wFlowLabel0.setEnabled(false);
}
else
{
wRadioButton0.setEnabled(true);
wRadioButton1.setEnabled(true);
wFlowLabel0.setEnabled(true);
}
}
Labels (1)
0 Kudos
(3) Replies
aruizf
Level 3

Hi,

How do you know that the event is not being triggered? Maybe the code in the event is not working... (just a guess). You could try adding something like:

arg0.getWizard().getUI().displayUserMessage("Title", "Error Message", UserInputRequest.ERROR);

at the beginning of the event (this will work for sure).

If you're having trouble with all the events, maybe you should check that you have write access to every file under "CustomCode" (I had trouble with this before, using VSS to keep my code. IS won't tell you if it's not being able to write to the file, and everything will compile smoothly as it's unchanged).

Hope this helps.

Andrés Ruiz
0 Kudos
mplanchart
Level 5

Hi Andrés,

Your suggestion worked! Now I know when an event is being triggered or not.

I am trying to figure out the following:

This is the event that I am trying to manage:

public void selectionChangedISCBP(com.installshield.event.ui.ISControlContext arg0)
{
ISPanel panel = (ISPanel)arg0.getISContainer();
ISFrame frame = panel.getISFrame();
ISComboBox wComboBox0 = frame.getComboBoxControl("ISComboBoxProvisioningImplementation");
wCBSelectedValue = wComboBox0.getSelectedValue();
}

What could this have wrong? Lack of casting?

I appreciate any help!

Thanks
0 Kudos
aruizf
Level 3

Try this:

public void selectionChangedISCBP(com.installshield.event.ui.ISControlContext arg0)
{

wCBSelectedValue = new String();

wCBSelectedValue = arg0.getISPanel().getComboBoxControl("ISComboBoxProvisioningImplementation").getSelectedValue();

}

If you need to use the variable inside in other parts of the installer, you should use something like:
arg0.getServices().getISDatabase().setVariableValue("WCBSELECTEDVALUE", wCBSelectedValue );

Then, you can resolve the variable from anywhere.

I hope this helps.
0 Kudos