How is Control Condition supposed to work?

7 messages Options
Embed this post
Permalink
little.forest

How is Control Condition supposed to work?

Reply Threaded More More options
Print post
Permalink
We use Wix 3.0.


How is Control condition supposed to work?

I've this code:
<Control Id="MigrateSettingsCheckBox" Type="CheckBox" X="20" Y="220" Width="290" Height="17"
Property="MIGRATE_SETTING_CHECKBOX_VALUE" CheckBoxValue="1"
Text="Migrate settings from old version." >
<Condition Action="show">Not Installed and NEED_MIGRATE_SETTING</Condition>
</Control>


I'd like to see the checkbox shows if the condition is true, but not show if it's false. But the result is, no matter what, the checkbox always shows up.
What's wrong?

Thanks.


      __________________________________________________________________
Looking for the perfect gift? Give the gift of Flickr!

http://www.flickr.com/gift/
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users
little.forest

Re: How is Control Condition supposed to work?

Reply Threaded More More options
Print post
Permalink
Hi all,


If you know how to show/hide a checkbox based on a property which is set on runtime, please let me know. We're eager to see the solution.

Basically, we need to show the end user a dialog to tell them if they want to migrate their existing settings from old version to new. I'm having trouble to conditionally show a dialog(http://n2.nabble.com/How-to-detect-files-presence-and-conditionally-show-a-new-added-dialog-page-td3855938i20.html ). Well, we can show it, but we'll have to click the next button two times to get it move forward.

Anyways, discussed with our team, we're even okay by just conditionally show/hide a checkbox. If this work, we can give up the conditionally showing dialog which cause much too much trouble. But "conditionally show/hide checkout" doesn't work either. Can you point out my problem? Here is the code:
<Control Id="MigrateSettingsCheckBox" Type="CheckBox" X="20" Y="220" Width="290" Height="17"
Property="MIGRATE_SETTING_CHECKBOX_VALUE" CheckBoxValue="1"
Text="Migrate settings from old version." >
<Condition Action="show">Not Installed and NEED_MIGRATE_SETTING</Condition>
</Control>

The reason we have to "conditionally" show the checkbox is that, some of our users may not have old version of software, they probably just buy the new version. So there is no point to always show that checkbox. We have a custom action(DLL) can detect if the end user needs to migrate settings, and further set a property on runtime. This checkbox's show action is associated with that property. Does it make sense?

Many many thanks.



________________________________
From: little.forest <[hidden email]>
To: [hidden email]
Sent: Tuesday, October 27, 2009 1:25:15 AM
Subject: [WiX-users] How is Control Condition supposed to work?

We use Wix 3.0.


How is Control condition supposed to work?

I've this code:
<Control Id="MigrateSettingsCheckBox" Type="CheckBox" X="20" Y="220" Width="290" Height="17"
Property="MIGRATE_SETTING_CHECKBOX_VALUE" CheckBoxValue="1"
Text="Migrate settings from old version." >
<Condition Action="show">Not Installed and NEED_MIGRATE_SETTING</Condition>
</Control>


I'd like to see the checkbox shows if the condition is true, but not show if it's false. But the result is, no matter what, the checkbox always shows up.
What's wrong?

Thanks.


      __________________________________________________________________
Looking for the perfect gift? Give the gift of Flickr!

http://www.flickr.com/gift/
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users



      __________________________________________________________________
Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your favourite sites. Download it now
http://ca.toolbar.yahoo.com.
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users
Blair-2

Re: How is Control Condition supposed to work?

Reply Threaded More More options
Print post
Permalink
If you want to use a condition to show or hide it, all properties used in
that condition need to be set before you open the dialog (make sure that
NEED_MIGRATE_SETTING is set by something not triggered by this dialog). If
while the dialog is open you want to change the visibility of the checkbox
you subscribe to an event.

-----Original Message-----
From: little.forest [mailto:[hidden email]]
Sent: Tuesday, October 27, 2009 1:59 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] How is Control Condition supposed to work?

Hi all,


If you know how to show/hide a checkbox based on a property which is set on
runtime, please let me know. We're eager to see the solution.

Basically, we need to show the end user a dialog to tell them if they want
to migrate their existing settings from old version to new. I'm having
trouble to conditionally show a
dialog(http://n2.nabble.com/How-to-detect-files-presence-and-conditionally-s
how-a-new-added-dialog-page-td3855938i20.html ). Well, we can show it, but
we'll have to click the next button two times to get it move forward.

Anyways, discussed with our team, we're even okay by just conditionally
show/hide a checkbox. If this work, we can give up the conditionally showing
dialog which cause much too much trouble. But "conditionally show/hide
checkout" doesn't work either. Can you point out my problem? Here is the
code:
<Control Id="MigrateSettingsCheckBox" Type="CheckBox" X="20" Y="220"
Width="290" Height="17"
Property="MIGRATE_SETTING_CHECKBOX_VALUE" CheckBoxValue="1"
Text="Migrate settings from old version." >
<Condition Action="show">Not Installed and NEED_MIGRATE_SETTING</Condition>
</Control>

The reason we have to "conditionally" show the checkbox is that, some of our
users may not have old version of software, they probably just buy the new
version. So there is no point to always show that checkbox. We have a custom
action(DLL) can detect if the end user needs to migrate settings, and
further set a property on runtime. This checkbox's show action is associated
with that property. Does it make sense?

Many many thanks.



________________________________
From: little.forest <[hidden email]>
To: [hidden email]
Sent: Tuesday, October 27, 2009 1:25:15 AM
Subject: [WiX-users] How is Control Condition supposed to work?

We use Wix 3.0.


How is Control condition supposed to work?

I've this code:
<Control Id="MigrateSettingsCheckBox" Type="CheckBox" X="20" Y="220"
Width="290" Height="17"
Property="MIGRATE_SETTING_CHECKBOX_VALUE" CheckBoxValue="1"
Text="Migrate settings from old version." >
<Condition Action="show">Not Installed and NEED_MIGRATE_SETTING</Condition>
</Control>


I'd like to see the checkbox shows if the condition is true, but not show if
it's false. But the result is, no matter what, the checkbox always shows up.
What's wrong?

Thanks.


      __________________________________________________________________
Looking for the perfect gift? Give the gift of Flickr!

http://www.flickr.com/gift/
----------------------------------------------------------------------------
--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users



      __________________________________________________________________
Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your
favourite sites. Download it now
http://ca.toolbar.yahoo.com.
----------------------------------------------------------------------------
--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users
little.forest

Re: How is Control Condition supposed to work?

Reply Threaded More More options
Print post
Permalink
Thanks Blair.


"need to be set before you open the dialog" - do you mean to set the property before the install wizard dialog? That must be on a very early stage. Currently, we have this code:
<CustomAction Id="SetSearchFolderProp"
Property="SETTING_FOLDERS_PROP"
Value="$(var.WIX_UPGRADE_SETTING_PARAMS)"
/>

        <Binary Id="DetectSettingMigrationBin" SourceFile="DetectSetting.dll" />
<CustomAction Id="DetectSettingMigrationCA"
BinaryKey="DetectSettingMigrationBin"
                      DllEntry="DetectSetting"
Execute="firstSequence"
/>


<InstallUISequence>
<Custom Action="SetSearchFolderProp" After="AppSearch" />
<Custom Action="DetectSettingMigrationCA" After="SetSearchFolderProp" />
</InstallUISequence>


How can I schedule it to make sure it is "set before I open the dialog"?

"If
while the dialog is open you want to change the visibility of the checkbox
you subscribe to an event." - how to subscribe an event?

Thanks.



________________________________
From: Blair <[hidden email]>
To: General discussion for Windows Installer XML toolset. <[hidden email]>
Sent: Tuesday, October 27, 2009 2:24:54 PM
Subject: Re: [WiX-users] How is Control Condition supposed to work?

If you want to use a condition to show or hide it, all properties used in
that condition need to be set before you open the dialog (make sure that
NEED_MIGRATE_SETTING is set by something not triggered by this dialog). If
while the dialog is open you want to change the visibility of the checkbox
you subscribe to an event.

-----Original Message-----
From: little.forest [mailto:[hidden email]]
Sent: Tuesday, October 27, 2009 1:59 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] How is Control Condition supposed to work?

Hi all,


If you know how to show/hide a checkbox based on a property which is set on
runtime, please let me know. We're eager to see the solution.

Basically, we need to show the end user a dialog to tell them if they want
to migrate their existing settings from old version to new. I'm having
trouble to conditionally show a
dialog(http://n2.nabble.com/How-to-detect-files-presence-and-conditionally-s
how-a-new-added-dialog-page-td3855938i20.html ). Well, we can show it, but
we'll have to click the next button two times to get it move forward.

Anyways, discussed with our team, we're even okay by just conditionally
show/hide a checkbox. If this work, we can give up the conditionally showing
dialog which cause much too much trouble. But "conditionally show/hide
checkout" doesn't work either. Can you point out my problem? Here is the
code:
<Control Id="MigrateSettingsCheckBox" Type="CheckBox" X="20" Y="220"
Width="290" Height="17"
Property="MIGRATE_SETTING_CHECKBOX_VALUE" CheckBoxValue="1"
Text="Migrate settings from old version." >
<Condition Action="show">Not Installed and NEED_MIGRATE_SETTING</Condition>
</Control>

The reason we have to "conditionally" show the checkbox is that, some of our
users may not have old version of software, they probably just buy the new
version. So there is no point to always show that checkbox. We have a custom
action(DLL) can detect if the end user needs to migrate settings, and
further set a property on runtime. This checkbox's show action is associated
with that property. Does it make sense?

Many many thanks.



________________________________
From: little.forest <[hidden email]>
To: [hidden email]
Sent: Tuesday, October 27, 2009 1:25:15 AM
Subject: [WiX-users] How is Control Condition supposed to work?

We use Wix 3.0.


How is Control condition supposed to work?

I've this code:
<Control Id="MigrateSettingsCheckBox" Type="CheckBox" X="20" Y="220"
Width="290" Height="17"
Property="MIGRATE_SETTING_CHECKBOX_VALUE" CheckBoxValue="1"
Text="Migrate settings from old version." >
<Condition Action="show">Not Installed and NEED_MIGRATE_SETTING</Condition>
</Control>


I'd like to see the checkbox shows if the condition is true, but not show if
it's false. But the result is, no matter what, the checkbox always shows up.
What's wrong?

Thanks.


      __________________________________________________________________
Looking for the perfect gift? Give the gift of Flickr!

http://www.flickr.com/gift/
----------------------------------------------------------------------------
--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users



      __________________________________________________________________
Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your
favourite sites. Download it now
http://ca.toolbar.yahoo.com.
----------------------------------------------------------------------------
--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users



      __________________________________________________________________
Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your favourite sites. Download it now
http://ca.toolbar.yahoo.com.
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users
Richard-45

Re: How is Control Condition supposed to work?

Reply Threaded More More options
Print post
Permalink
In reply to this post by little.forest

In article <[hidden email]>,
    "little.forest" <[hidden email]>  writes:

> How is Control condition supposed to work?

For the most robust results, I use combinations of show *and* hide
actions with mutually exclusive conditions.

> I've this code:
> <Control Id="MigrateSettingsCheckBox" Type="CheckBox" X="20" Y="220" Width="
290" Height="17"
> Property="MIGRATE_SETTING_CHECKBOX_VALUE" CheckBoxValue="1"
> Text="Migrate settings from old version." >
> <Condition Action="show">Not Installed and NEED_MIGRATE_SETTING</Condition>
> </Control>

In your case you don't provide a value for the Hidden attribute on
your <Control>, so it is shown by default.  Your nested <Condition>
specifies additional logic about when the control should be shown,
but no logic about when the control should be hidden.
--
"The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
 <http://legalizeadulthood.wordpress.com/the-direct3d-graphics-pipeline/>

      Legalize Adulthood! <http://legalizeadulthood.wordpress.com>

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users
Richard-45

Re: How is Control Condition supposed to work?

Reply Threaded More More options
Print post
Permalink
In reply to this post by little.forest

In article <[hidden email]>,
    "little.forest" <[hidden email]>  writes:

> Basically, we need to show the end user a dialog to tell
> them if they want t o migrate their existing settings from
> old version to new. I'm having trouble to conditionally
> show a dialog(http://n2.nabble.com/How-to-detect-files-presen
> ce-and-conditionally-show-a-new-added-dialog-page-td3855938i20.html
> ). Well, w e can show it, but we'll have to click the next button two
> times to get it mov e forward.

Take a look at my recent blog post on branching dialog wizard
sequences: <http://wp.me/pyVNs-fC>
--
"The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
 <http://legalizeadulthood.wordpress.com/the-direct3d-graphics-pipeline/>

      Legalize Adulthood! <http://legalizeadulthood.wordpress.com>

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users
Richard-45

Re: How is Control Condition supposed to work?

Reply Threaded More More options
Print post
Permalink
In reply to this post by little.forest

In article <[hidden email]>,
    "little.forest" <[hidden email]>  writes:

> <CustomAction Id="SetSearchFolderProp"
> Property="SETTING_FOLDERS_PROP"
> Value="$(var.WIX_UPGRADE_SETTING_PARAMS)"
> />
>
>         <Binary Id="DetectSettingMigrationBin" SourceFile="DetectSetting.dll
" />

> <CustomAction Id="DetectSettingMigrationCA"
> BinaryKey="DetectSettingMigrationBin"
>                       DllEntry="DetectSetting"
> Execute="firstSequence"
> />
>
>
> <InstallUISequence>
> <Custom Action="SetSearchFolderProp" After="AppSearch" />
> <Custom Action="DetectSettingMigrationCA" After="SetSearchFolderProp" />
> </InstallUISequence>

> How can I schedule it to make sure it is "set before I open the dialog"?

Dialogs are scheduled as actions in the InstallUISequence.  So you
need to make sure that the CAs setting your property appear in the
sequence before the dialogs.

> "If
> while the dialog is open you want to change the visibility of the checkbox
> you subscribe to an event." - how to subscribe an event?

Nest a <Subscribe> element in your <Control> element.
--
"The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
 <http://legalizeadulthood.wordpress.com/the-direct3d-graphics-pipeline/>

      Legalize Adulthood! <http://legalizeadulthood.wordpress.com>

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users