0

我正在使用具有对话框的 WIX 工具集进行安装程序,该对话框从用户那里获取一些输入并将它们传递给父对话框。对于 POC,我为编辑控制做到了这一点,效果很好。但是当我使用 RadioButtonGroup 尝试相同时它失败了

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

下面是我的父对话框

<?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>

这是作为 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>

我无法理解代码有什么问题。

4

2 回答 2

1

您应该在某处定义该属性。就像是

<Property Id="_TestRb" />

也许您交换了 Property 和 Value 属性?

于 2017-04-12T15:51:43.983 回答
0

删除后我能够解决问题,

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

parent_dlg对话框。

看起来,因为 Edit Control 可以更改其他属性TestRadio0的值,并且1根据ICE34是无效的。但是错误消息Unresolved reference to symbol 'Property:_TestRb' in section 'Fragment:'根本没有帮助。

定义属性_TestRb后显示实际错误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)

于 2017-04-13T07:33:39.433 回答