MGS
Posts: 83
Joined: Tue Oct 04, 2022 9:52 am

Init Events - Display Dialog

Wed Nov 16, 2022 2:51 pm

Hi there,

Is there a reason why a "Display a specific dialog" event can not be added manually to the "Init Events" tab?
The interesting thing here is that I can create a "Display a specific dialog" event in the "Published Events" tab, then copy it, and paste it in the "Init Events" tab.
Init_Events_-_Display_Dialog.png
Init_Events_-_Display_Dialog.png (13.95KiB)Viewed 4617 times
Is it now a bug that the paste is possible or is it a bug that the "Display a specific dialog" event can not be selected when adding a new "Init Event"?
I went ahead and tried if the "Display a specific dialog" event executes for me, and it does. Therefore, I believe the latter is the case. Would be great if you can add the possibility to add New and Edit "Display a specific dialog" events inside the "Init Events" tab since basically it works, just the UI does not fully support it.

My usecase for this is that I want to skip a dialog if a specific condition is met using the "Display a specific dialog" event as soon as a Dialog is opened.

Best regards,
Johannes

Catalin
Posts: 6542
Joined: Wed Jun 13, 2018 7:49 am

Re: Init Events - Display Dialog

Fri Nov 18, 2022 1:10 pm

Hello Johannes,

If you'd like to skip a dialog if a condition is met, the easiest way would be to use the "Show only if..." option which was created just for that.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

MGS
Posts: 83
Joined: Tue Oct 04, 2022 9:52 am

Re: Init Events - Display Dialog

Mon Nov 21, 2022 1:15 pm

Hi Catalin,

I see, thanks for the answer. How can I adapt the "Show only if..." condition after creating it?

Best regards,
Johannes

Catalin
Posts: 6542
Joined: Wed Jun 13, 2018 7:49 am

Re: Init Events - Display Dialog

Tue Nov 22, 2022 1:37 pm

Hello Johannes,

I'm afraid that condition is not editable after you created it, because it is used in more places from the project.

However, what you can do is:
  • move the dialog on which you set the condition back in the chain of dialogs where it previously was, use drag and drop
  • then right click on the branch created when you've set the condition and select "Delete"
  • now you can set the new condition on the same dialog, just as you did the first time
Hope this helps!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

MGS
Posts: 83
Joined: Tue Oct 04, 2022 9:52 am

Re: Init Events - Display Dialog

Wed Nov 23, 2022 10:27 am

Catalin wrote:
Tue Nov 22, 2022 1:37 pm
However, what you can do is:
  • move the dialog on which you set the condition back in the chain of dialogs where it previously was, use drag and drop
  • then right click on the branch created when you've set the condition and select "Delete"
  • now you can set the new condition on the same dialog, just as you did the first time
Hello Catalin,

Thanks for the help! I see how that works now.
My feedback on that (would be awesome if you can improve that workflow for us!):
1. In my opinion changing the 'Show only if' condition is UX-wise not great. Changing the condition is three steps what should be just one.
2. Apart from that, I myself prefer using the way that I discovered by accident that I described in my first post in this thread. Is it possible for you to make that way possible too officially? Thus being able to add the 'Display a specific dialog' event to the Init Events of a dialog.

Explanation why 2. is helpful for me:
Then I can e.g. test the ODBC connction etc. in the Init Events of my SQL-Connection-dialog and if that is already successful with my SQL-Connectoin-Settings loaded from registry then I can skip the dialog. Without being able to use the dialog skipping in the Init Events I would have to add those actions on the next button of the previous dialog (feature selection in my case) although those actions are not related to the feature selection in any way. And another advantage that comes with separation of concerns is that I can easily change the order of dialogs later on.

All the best,
Johannes

Catalin
Posts: 6542
Joined: Wed Jun 13, 2018 7:49 am

Re: Init Events - Display Dialog

Fri Nov 25, 2022 5:09 pm

Hello Johannes,

I'm afraid 1) might not be possible to implement, otherwise I think our dev team would have done that quite some time ago.

2) also does not make much sense either, althought I understand your scenario.

"Init events", as their name suggests, are events that are executed when the dialog is initialized.

"Init events" on dialog X are basically "Published events" executed on the "Next" button of the previous dialog.

WIth that being said, you can simply use the "Display a specific dialog" event on the "Next" button of the previous dialog, or just use the "Show only if" option which is made specifically for your scenario. You might need to change the condition once or twice, let's say, not 100 times so I don't think this is such an inconvenience.

Hope things are clearer now!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”