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
- :
- Must choose at least one Feature.
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
‎Jan 24, 2007
01:25 PM
Must choose at least one Feature.
Hi -
I have a pretty simple scenario that I was hoping somebody could help me with. I'm using InstallShield 11.5 multiplatform.
Basically, I have two features available for selection within the Feature Dialog window. By default, InstallShield will allow users to select one, both or none of the features.
I would like to be able to stop users from being able to deselect both features, i.e. force them to select one or both features. As I don't care which feature is chosen by the user, I can't set a feature as being "Required".
I have to assume that there is a way of doing this, but for the life of me I can't figure it out. Can I check when a feature has been selected/deselected from within the Feature dialog window and based upon the result disable the 'Next' button? If so, how do I do that? If not, how else would I get this to work?
Any help would be greatly appreciated...
Thanks,
Paul
I have a pretty simple scenario that I was hoping somebody could help me with. I'm using InstallShield 11.5 multiplatform.
Basically, I have two features available for selection within the Feature Dialog window. By default, InstallShield will allow users to select one, both or none of the features.
I would like to be able to stop users from being able to deselect both features, i.e. force them to select one or both features. As I don't care which feature is chosen by the user, I can't set a feature as being "Required".
I have to assume that there is a way of doing this, but for the life of me I can't figure it out. Can I check when a feature has been selected/deselected from within the Feature dialog window and based upon the result disable the 'Next' button? If so, how do I do that? If not, how else would I get this to work?
Any help would be greatly appreciated...
Thanks,
Paul
(2) Replies
‎Jan 25, 2007
10:20 AM
Add the following to the Standard Feature Panel Swing code
public void queryExitFeature(com.installshield.event.ui.ISDialogQueryContext context)
{
String F1act = context.getServices().resolveString("$P(feature1.active)");
String F2act = context.getServices().resolveString("$P(feature2.active)");
if (F1act.equals("false") && F2act.equals("false")){
context.getWizardUI().displayUserMessage(
context.getServices().resolveString(
context.getISFrame().getTitle()),
context.getServices().resolveString(
"Atleast one Feature must be selected"),
UserInputRequest.MESSAGE);
//context.logEvent(this, Log.ERROR, "Feature Test");
context.setReturnValue(false);
}
}
public void queryExitFeature(com.installshield.event.ui.ISDialogQueryContext context)
{
String F1act = context.getServices().resolveString("$P(feature1.active)");
String F2act = context.getServices().resolveString("$P(feature2.active)");
if (F1act.equals("false") && F2act.equals("false")){
context.getWizardUI().displayUserMessage(
context.getServices().resolveString(
context.getISFrame().getTitle()),
context.getServices().resolveString(
"Atleast one Feature must be selected"),
UserInputRequest.MESSAGE);
//context.logEvent(this, Log.ERROR, "Feature Test");
context.setReturnValue(false);
}
}