wixwindows-installerwix3.10

How to Use RadioButtonGroup Control with Indirect Property?


I am working on a installer using WIX Toolset which have a dialog, which takes a few inputs from user and pass them to parent dialog. For POC I did that for Edit Control that worked perfectly. But when I tried same using RadioButtonGroup It fails with

Unresolved reference to symbol 'Property:_TestRb' in section 'Fragment:'.(LGHT0094)

below is my parent dialog

<?xml version="1.0"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
    <Fragment>
        <UI>
            <DialogRef Id="spandlg"></DialogRef>
            <Property Id="TestProp" Value="Test"></Property>
            <Property Id="TestRadio" Value="1"></Property>
            <Dialog Id="parent_dlg" Width="370" Height="270" Title="parent.dlg">
                <Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Text="Next">
                    <Publish Property="_TestRb" Value="TestRadio" Order="2">1</Publish>
                    <Publish Property="_TestP" Value="TestProp" Order="1">1</Publish>
                    <Publish Event="SpawnDialog" Value="spandlg" Order="3">1</Publish>
                </Control>
                <Control Id="txtBox" Type="Edit" Height="15" Width="321" X="10" Y="16" Property="TestRadio"></Control>
                <Control Id="txtBox1" Type="Edit" Height="15" Width="321" X="10" Y="50" Property="TestProp"></Control>
                <Control Id="c" Type="PushButton" X="300" Y="243" Width="56" Height="17" Default="yes" Text="Cancel">
                    <Publish Event="EndDialog" Value="Exit" Order="2">1</Publish>
                </Control>
            </Dialog>
        </UI>
    </Fragment>
</Wix>

and this is dialog to be opened as Spawn

<?xml version="1.0"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
    <Fragment>
        <UI>
            <Dialog Id="spandlg" Width="370" Height="270" Title="spandlg">
                <Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Text="[Button_Next]">                 
                    <Publish Event="EndDialog" Value="Return"></Publish>
                </Control>
                <Control Id="textBox1" Type="Edit" Height="15" Width="176" X="9" Y="9" Property="_TestP" Indirect="yes" />
                <Control Id="radioButtonGroupBox1" Type="RadioButtonGroup" Height="75" Width="150" X="10" Y="36" 
                         Property="_TestRb" Indirect="yes"  >
                    <RadioButtonGroup Property="_TestRb">
                        <RadioButton X="3" Y="26" Height="18" Width="78" Text="radioButton2" Value="0" />
                        <RadioButton X="3" Y="3" Height="18" Width="78" Text="radioButton1" Value="1" />
                    </RadioButtonGroup>
                </Control>
            </Dialog>
        </UI>
    </Fragment>
</Wix>

I can't get what's wrong with code.


Solution

  • I was able to solve the Issue after removing,

    <Control Id="txtBox" Type="Edit" Height="15" Width="321" X="10" Y="16" Property="TestRadio"></Control>
    

    from parent_dlg dialog.

    It looks like, as Edit Control can change value of property TestRadio other then 0 and 1 which are invalid according to ICE34. But Error Message Unresolved reference to symbol 'Property:_TestRb' in section 'Fragment:' was not at all helpful.

    After defining Property _TestRb actual error was shown ICE34: 1 is not a valid default value for the property TestRadio. The property is an indirect RadioButtonGroup property of control spandlg.radioButtonGroupBox1 (via property _TestRb). (LGHT0204).