Loading
Features Dialog queryExit check
Does anyone have a code snippet to check during the queryExit of the featureDialog to check if atleast one feature was selected? :confused:

 

I know that I can perform the following:

 

context.setReturnValue(false);

 

to stop the progression of the dialog, but I am confussed on how to iterate over the features to check if any are active.

  • [HTML]public void queryExitFeature(com.installshield.event.ui.ISDialogQueryContext arg0)

     

    {

     

    try{

     

    if(arg0.resolveString("$P(BeanIDOfFeaure.active)").equalsIgnoreCase("true")){

     

    // feature is selected!

     

    }else{

     

    // feature not selected

     

    }

     

    }catch(Exception e){

     

    LogUtils.getLog().logEvent(this, Log.ERROR, e);

     

    }

     

    }

     

    [/HTML]

     

    Obviously you could put all in something like:

     

    'if (featureA.active(true) || featureB.active(true) || ...){ then 1 is selected!}

     

    Regards,

     

    Tom
    Expand Post
  • Thanks. This will work for now. :)

     

    I was actually looking for something more dynamic. So as I added new features I wouldn't have to go change the code. My thought was to go throught the product tree and get the features and then ask the features if there are visible and active. I just do not know where to start.

Loading
Features Dialog queryExit check