Dashut
Posts: 142
Joined: Tue May 04, 2010 4:41 pm

Different behaviour in AI 7.7 and 8.0.2 for DialogEvents

I upgraded my AI 7.7 to AI 8.0.2 and now my "next" button for my custom dialog page behaves differently!
I looked at http://www.advancedinstaller.com/user-g ... ialog.html but that doesn't explain the change I'm experiencing between the two versions of AdvancedInstaller.
I have two dialogs that I created:
The first is "ScheduledTasksDlg" and the second that comes after it is "BackupDlg".
What I'm doing is, I let the User enter some details (user name and password) in the "ScheduleTaskDlg" and when he presses the "next" button to proceed to the "BackupDlg", I first verify (using property USER_VALIDATION_SUCCEEDED) these details (user/pass), and if valid: he will continue to the "BackupDlg" and if not: a popup window will appear ("your" SpawnDialog with modified text) asking him to re-enter his details since they were incorrect. This also causes him to return/remain on the "ScheduledTaskDlg" (as expected).

So all this works, and has been working on AI 7.7 (to my satisfaction).
The sequence in the "Published Events" for the "next" button is this:

Code: Select all

Event               Argument             Condition
--------            -------------            ------------------------
DoAction         UIValidateUser       AI_INSTALL
SpawnDialog    SpawnDialog          AI_INSTALL AND ( USER_VALIDATION_SUCCEEDED<>"TRUE" )
NewDialog       BackupDlg              AI_INSTALL  
However, this sequence on AI 8.0.2 does call my custom action "UIValidateUser" (first) BUT!!! then regardless of the USER_VALIDATION_SUCCEEDED property, you move to the "BackupDlg"!
In order to change this behaviour, I had to change the sequence (on the "next" button) like this (for AI 8.0.2):

Code: Select all

Event               Argument             Condition
--------            -------------            ------------------------
DoAction         UIValidateUser       AI_INSTALL
NewDialog       BackupDlg              AI_INSTALL  
SpawnDialog    SpawnDialog          AI_INSTALL AND ( USER_VALIDATION_SUCCEEDED<>"TRUE" )
which doesn't make sense, because if the sequence is running from top to bottom, then "NewDialog BackupDlg AI_INSTALL" will be called before: "SpawnDialog SpawnDialog AI_INSTALL AND ( USER_VALIDATION_SUCCEEDED<>"TRUE" )".
But the truth is that it DOESN'T! This actually works!
So for AI 8.0.2: my "UIValidateUser" custom action is run FIRST, and then if "USER_VALIDATION_SUCCEEDED<>"TRUE"" then "SpawnDialog SpawnDialog AI_INSTALL AND ( USER_VALIDATION_SUCCEEDED<>"TRUE" )"
is run and NOT "NewDialog BackupDlg AI_INSTALL" which is really NEXT in the sequence!!!

So like I said: I changed the sequence to make things work for 8.0.2: but I really don't understand why it should be like this, and not like (it made sense!) in AI 7.7! (meaning: first test, then if failed spawndialog and only if success then NewDialog - meaning: the sequence is NOT in sequence!!!).

What I wrote might be a bit long because I wanted to be as clear as possible.
Waiting for your help on understanding this one, Dashut.

P.S: Is this a bug in 8.0.2?
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Different behaviour in AI 7.7 and 8.0.2 for DialogEvents

Hello Dashut,
In order to change this behaviour, I had to change the sequence (on the "next" button) like this (for AI 8.0.2)
Actually, the order logic has changed in the published events list from version 7.7 to version 8.0.2. This sequence modification is done automatically when opening a 7.7 project with version 8.0.2. The logic in 8.0.2 between a SpawnDialog and a NewDialog published event, is that the last in the list with a condition evaluated to true will be shown in the UI when running the package.

Best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
AllanW
Posts: 20
Joined: Thu Feb 18, 2010 11:42 pm

Re: Different behaviour in AI 7.7 and 8.0.2 for DialogEvents

I think I may be seeing a similar change in behavior with the User Registration dialog (UserRegistrationDlg). I've just created a new install in 8.0.2 using a project template I created (and used for several installs) with 7.7 but the "Next" button is behaving oddly, though I'm not quite sure how well I can explain the problem.

If I enter a valid serial number (I'm using a validation dll) and click "Next" I get no error message (the log file shows that the validation dll set the validation property TRUE) but the UI doesn't advance to the next dialog. If I click "Next" a second time, it advances. If I return to the User Registration dialog by clicking "Back", enter an invalid serial number then click "Next" no error message is displayed and the UI advances to the next dialog. If I return to the registration dialog, correct the serial number and click "Next", an error message is displayed and the UI doesn't advance.

Similarly, if I enter a valid serial number at the beginning and click "Next" (at which time the UI doesn't advance) then edit the serial number to something invalid before clicking "Next" a second time, the UI still advances following the second click. If I then click "Back" to return to the registration dialog and immediately click "Next", the error message for an invalid serial number is displayed.

By repeating this, and a few other tests, several times and checking the log file, it appears that the Next button is responding one event late as if the condition for the Next button is calculated before the serial validation dll is called to populate the property that should be used to condition the "NewDialog" event for the "Next" button.

My Published Events for the "Next" button are like this (if it helps):

Code: Select all

ValidateProductID      0                          1
[CustomActionData]     "Error message Text"     AI_INSTALL AND (SERIAL_VALIDATION="FALSE")
DoAction               ShowErrorMessage         AI_INSTALL AND (SERIAL_VALIDATION="FALSE")
NewDialog           FolderDlg              AI_INSTALL AND (SERIAL_VALIDATION="TRUE")
This code seemed to work properly with the installs built with v7.7 but this one just isn't behaving right. Is there something in the change in 8.0.2 that may be causing this problem or is there something wrong with my logic? In either case, do you have any suggestions on what I can do to resolve the problem?

Thanks for the help.

Allan
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Different behaviour in AI 7.7 and 8.0.2 for DialogEvents

Hi Allan,

Actually, this is not related to the changes in the 8.0.2 version. Can you please try to reproduce the behavior on a separate project?
Can you please also send us the .AIP (project) manifesting the behavior to support at advancedinstaller dot com so we can assist you in the meantime.

Regards,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
AllanW
Posts: 20
Joined: Thu Feb 18, 2010 11:42 pm

Re: Different behaviour in AI 7.7 and 8.0.2 for DialogEvents

Thanks for the attention. I've emailed you a copy of the problem project.

An additional note, for public consumption...

After I posted my message I found that I was able to get things working (apparently) properly by just adding a "Set Property" published event for the Next button to update the PIDKEY property. My validation routine converts the key to upper case and I wanted to display the converted key when the UI failed to change dialogs when the validation routine indicated success (using the "Set property on button push" example in the user manual). Now, it seems, the Next button is reacting properly. I don't know if this helps identify the problem or just confuses things even further, but there you are :? .

Thanks for the help.

Allan
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Different behaviour in AI 7.7 and 8.0.2 for DialogEvents

Hi Allan,

After further investigation I found out our development team was aware of this issue and fixed it. The fix will be available in the 8.1 version which will be out soon.

Regards,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
AllanW
Posts: 20
Joined: Thu Feb 18, 2010 11:42 pm

Re: Different behaviour in AI 7.7 and 8.0.2 for DialogEvents

Great! I tried to replicate the problem with a new project, as you suggested, and so far I haven't been able to reproduce it. Whatever the problem is, I guess it's just something about this project (created from a template originally built with v7.7). Since you've got a fix coming and I've already found a workaround that allows me to deliver my install, I'm happy with that.

Thanks for the help

Allan
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Different behaviour in AI 7.7 and 8.0.2 for DialogEvents

You are welcome, happy to assist.

Best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
sthomsen@ncidea.com
Posts: 10
Joined: Sun Jun 18, 2006 3:17 pm
Location: North Carolina, USA
Contact: Website

Re: Different behaviour in AI 7.7 and 8.0.2 for DialogEvents

We are having the same problem with the UserRegistrationDlg Next button. When will this fix be released?
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Different behaviour in AI 7.7 and 8.0.2 for DialogEvents

Hello,

The fix is already implemented in our latest version which will be released very soon.
Until then, we can provide you with the fixed RC. If you want it, simply contact us by e-mail to support at advancedinstaller dot com with a reference to this post.

Best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”