korr
Posts: 48
Joined: Tue Sep 09, 2014 3:13 pm

Conditionalize Dialogs in Sequence

I have been working on a project that is giving me lots of trouble. It contains multiple features and has been incredibly difficult to get the dialogs to appear in the right order (backwards and forwards).

The traditional way that AI has the "show dialog based on feature" is unwieldy to use if you have to make any changes after the first time you set it up. Since dialogs appear in a chain you end up with an infinite recursion of dialogs (even in the example you can download from AI) which makes it troublesome to make sure you have every condition met on every dialog to properly seed the next(or back) dialog.

I attempted to use the "Show only if..." option as well which creates a better display of the dialogs, but ran into issues of the sequence that AI (windows installer?) checks conditions when selecting a button. I end up in situations where when clicking back between dialogs I get stuck in an infinite loop between 2 dialogs... I can change the order of those conditions (though I have to edit the XML directly to do this as using "Show only if..." locks the placement of the sequence of checks on button click) but that just makes it start to fail at a different place in the same way.


I think a lot of this can be simplified if there was an option to add a condition to whether we "fall" into a specific dialog in sequence. Is this something that windows installer/AI has the capability of doing, or maybe im missing something in the approaches Ive taken?

PS : I have tried just throwing all the dialogs in sequence and as an init telling it to close if the condition is false, but that also does not work.
Dan
Posts: 4513
Joined: Wed Apr 24, 2013 3:51 pm

Re: Conditionalize Dialogs in Sequence

Hello,

If you need to display a custom dialog for each feature selected by the user to install, please take a look on the How to display some dialogs depending on the selected features? article with related information for hints and guidance.

Please let me know if that helped, otherwise give me more details about your specific scenario.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
korr
Posts: 48
Joined: Tue Sep 09, 2014 3:13 pm

Re: Conditionalize Dialogs in Sequence

I mentioned that article and example above. It creates an infinite recursion of dialogs which is unwieldy to update with new dialogs (or dialog removal). This is due to dialogs added using just the normal "Add/New Dialog" creates a chain, and you have to follow through down the chain adding each dialog into it.

For example I have 3 dialogs (A, B, C) and I want the order :
A -> B -> VerifyReady

Now I want Dialog C to show if a certain selection is made in Dialog A... when we show dialog C we no longer continue to Dialog B (we broke that chain) and C leads directly to VerifyReady
I have to go through and add that I want to show Dialog B after dialog C (followed by VerifyReady)
A -> B -> VerifyReady
A -> C -> B -> VerifyReady
are now 2 seperate chains that can be followed as we flow through the dialogs.

This seems fine for the example above, but as you add more Dialogs and chains that need to be followed the complexity increases exponentially.

For a better reference my current project has the following dialogs w/ corresponding features:
LocalLocation - not a feature
RemoteLocation - not a feature
AuditLog - "AuditLog" feature
DatabaseSchedule - "Database" feature
DatabaseExclusion - not a specific feature
FileSystemSchedule - "FileSystem" feature
RebootSchedule - "Reboot" Feature



If AuditLog, Database, or FileSystem is selected we need to get to the LocationDialogs (local and remote), each feature also there after has its own dialog (database will always show schedule and exclusion if selected)

So we have 24 (I believe it should be exponential at least) different paths we could follow between the differing dialogs. Every time we add a feature and dialog it becomes more complex and the method (and example) listed in you have to remove every condition and dialog and readd them all individually after that to accomodate all of the options.



If I could add in sequence based off of a condition this would be eliminated because its a sequence and not a chain.
korr
Posts: 48
Joined: Tue Sep 09, 2014 3:13 pm

Re: Conditionalize Dialogs in Sequence

Is there any consideration to be able to add conditions to Dialogs in Sequence?

Return to “Feature Requests”