This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Features Dialog queryExit check
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 28, 2006
01:22 PM
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.
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.
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 29, 2006
09:48 AM
[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
{
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
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 29, 2006
11:21 AM
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.
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.