You could disable the Next button until MYSTUFFISVALID = "1" using
Control Conditions. 

<Control Id="Next" Type="PushButton" X="236" Y="243" Width="56"
Height="17" Default="yes" Cancel="yes" Text="!(loc.WixUINext)" >
          <Publish Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
                    <Condition Action="disable"><![CDATA[MYSTUFFISVALID
<> "1"]]></Condition>
                    <Condition Action="enable">MYSTUFFISVALID =
"1"</Condition>
        </Control>

But with that you will need another way to run the "ValidateMyStuff
Custom Action so you may have to move it to a new button on the Dialog
(something like "Validate" would probably do) if the method your using
to get data from the user has no way of running the Custom Action for
you.

Palbinder Sandher 
Software Deployment & IT Administrator
T: +44 (0) 141 945 8500 
F: +44 (0) 141 945 8501 

http://www.iesve.com 
**Design, Simulate + Innovate with the <Virtual Environment>**
Integrated Environmental Solutions Limited. Registered in Scotland No.
SC151456 
Registered Office - Helix Building, West Of Scotland Science Park,
Glasgow G20 0SP
Email Disclaimer

-----Original Message-----
From: gapearce [mailto:mr_gapea...@yahoo.com] 
Sent: 10 June 2010 15:44
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] NEXT button behavior


I created a custom dialog and stuck the forward and backward links in my
copy of WixUI_InstallDir.wxs:

            <Publish Dialog="MyConfigDlg" Control="Back"
Event="NewDialog"
Value="InstallDirDlg" Order="1">NOT Installed</Publish>
            <Publish Dialog="MyConfigDlg" Control="Next"
Event="NewDialog"
Value="VerifyReadyDlg" Order="2">NOT Installed</Publish>

I made a new wxs file with a fragment in it that describes my dialog.
All this seems to work.

I would like to have it so that when the user clicks the "next" button,
I do a custom action in a DLL to validate what they put in on my new
dialog.  I already have this, too, and it also seems to work.

        <Control Id="Next" Type="PushButton" X="236" Y="243" Width="56"
Height="17" Default="yes" Cancel="yes" Text="!(loc.WixUINext)" >
          <Publish Event="DoAction" Value="ValidateMyStuff">1</Publish>
          <Publish Event="NewDialog"
Value="VerifyReadyDlg"><![CDATA[MYSTUFFISVALID = "1"]]></Publish>
        </Control>

The DLL returns a "0" or a "1" in MYSTUFFISVALID after parameter
validation. 
0 is bad, 1 is good.

What I'm trying to do is force the user back to my dialog to fix the
errors, and then they would click "NEXT" again, and I would repeat the
validation...

How do I make the same dialog re-appear to keep the user on this dialog
until they enter the right stuff?  

Is there an example of this somewhere that you know of?

Thanks, in advance.
Greg
--
View this message in context:
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/NEXT-butto
n-behavior-tp5163545p5163545.html
Sent from the wix-users mailing list archive at Nabble.com.

------------------------------------------------------------------------
------
ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's
Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit.  See the
prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users



------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to