[wix-users] Event="SpawnDialog" failes
Ronny Eriksson
ronny.eriksson at optimity.se
Sun Oct 2 07:19:24 PDT 2016
Hi
I have MSI that i'm working on but i strange behavior from the "Event="SpawnDialog"" on a Next button.
So what I want to do is this.
I have a dialog where need the user to put in a path that points to a specific installation.
To be sure that path is correct I check if the path contains a file.
Do to that I have a "PathEdit" control where the path is.
I have the standard Browse dialog change this path but u can also change it manualy.
Now as far as I can see the Browse dialog works fine and it companies when the path is not correct based on my CA that checks the path.
But the dialog that has the PathEdit filed will not.
Why... well let do this is steps so you understand the problem.
1. Put incorrect path in "PathEdit" field.
2. Click the next button and I get an info dialog (InvalidWPFDirDlg) saying that if is not a correct path.
3. Change the "PathEdit" field to a correct path.
4. Click the next button and I get to the VerifyReadyDlg as suppose to
5. Untill this step everything is okay, and working as should.
6. Click the Back button in the VerifyReadyDlg.
7. Put an incorrect path in the "PathEdit" field.
8. Click the next button, and not I DON'T get any dialog and end up in the VerifyReadyDlg.
Why is not the condition on the next button with the event "SpawnDialog" valuated the second time?
Does "SpawnDialog" only validate once per session
This is the the Wix code for this problem:
<Publish Dialog="OpitmityPathDlg" Control="Next" Event="SetTargetPath" Value="[OPT_INSTALLFOLDER]" Order="1">1</Publish>
<Publish Dialog="OpitmityPathDlg" Control="Next" Event="DoAction" Value="WixUIValidatePath" Order="2">NOT WIXUI_DONTVALIDATEPATH</Publish>
<Publish Dialog="OpitmityPathDlg" Control="Next" Event="DoAction" Value="VerifyOptimityWPFPath" Order="3">1</Publish>
<Publish Dialog="OpitmityPathDlg" Control="Next" Event="SpawnDialog" Value="InvalidDirDlg" Order="4"><![CDATA[NOT WIXUI_DONTVALIDATEPATH AND WIXUI_INSTALLDIR_VALID<>"1"]]></Publish>
<Publish Dialog="OpitmityPathDlg" Control="Next" Event="SpawnDialog" Value="InvalidWPFDirDlg" Order="5">OPT_WPFDIR_VALID="0"</Publish>
<Publish Dialog="OpitmityPathDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Order="6">WIXUI_DONTVALIDATEPATH OR WIXUI_INSTALLDIR_VALID="1"</Publish>
And the Custom Action is set up like this
<CustomAction Id="VerifyOptimityWPFPath"
BinaryKey="WebAppCA"
DllEntry="VerifyOptimityWPFPath"
Execute="immediate"
Return="check"/>
I have checked that the Custom Action acutely sets the Property "OPT_WPFDIR_VALID" and even if it is "0" I don't get the "InvalidWPFDirDlg" saying that the path is incorrect when I got to the "VerifyRedayDlg" once.
Do I have to reset anything, if the user get to the "VerifyRedayDlg" and then goes back to and changes the to get this to work somehow?
Or how do I set a Control with Type="PathEdit" to ReadOnly so they can't change it?
I'm using Wix Version 3.10.1.2213
Best Regards
Ronny
More information about the wix-users
mailing list