Not specifically a WiX issue, but perhaps relevant.
According to the MSDN for the ControlEvent table, both Event and Argument
are of type Formatted.
Column      Type           Key    Nullable
Event        Formatted    Y      N
Argument   Formatted    Y      N

However, testing seems to indicate that this may not be accurate. I modified
slightly the Published events of the Welcome dialog as follows:

...
      <Publish Dialog="WelcomeDlg" Control="Next" Property="WelcomeDlg_Next"
Value="{}" Order="1">1</Publish>
      <Publish Dialog="WelcomeDlg" Control="Next" Property="WelcomeDlg_Next"
Value="LicenseWarningDlg" Order="2"><![CDATA[UPGRADEFOUND AND LicenseStatus
<> 0]]></Publish>
      <Publish Dialog="WelcomeDlg" Control="Next" Property="WelcomeDlg_Next"
Value="LicenseAgreementDlg" Order="3"><![CDATA[NOT (UPGRADEFOUND AND
LicenseStatus <> 0)]]></Publish>
      <Publish Dialog="WelcomeDlg" Control="Next" Property="LastDialogStack"
Value="WelcomeDlg" Order="9">1</Publish>
      <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog"
Value="[WelcomeDlg_Next]" Order="10">WelcomeDlg_Next</Publish>
      <Publish Dialog="WelcomeDlg" Control="Next" Property="Redirect"
Value="{}" Order="12">1</Publish>
      <Publish Dialog="WelcomeDlg" Control="Next" Property="Redirect"
Value="[WelcomeDlg_Next]_Back" Order="14">1</Publish>
      <Publish Dialog="WelcomeDlg" Control="Next" Event="[[Redirect]]"
Value="WelcomeDlg" Order="15">1</Publish>
...

Results in the following log entries:
Action start 8:56:55: WelcomeDlg.
Action 8:56:55: WelcomeDlg. Dialog created
MSI (c) (90:F8) [08:56:56:782]: PROPERTY CHANGE: Adding WelcomeDlg_Next
property. Its value is 'LicenseAgreementDlg'.
MSI (c) (90:F8) [08:56:56:782]: PROPERTY CHANGE: Adding LastDialogStack
property. Its value is 'WelcomeDlg'.
MSI (c) (90:F8) [08:56:56:782]: PROPERTY CHANGE: Adding Redirect property.
Its value is 'LicenseAgreementDlg_Back'.
MSI (c) (90:F8) [08:56:56:782]: PROPERTY CHANGE: Adding [Redirect] property.
Its value is 'WelcomeDlg'.
Action 8:56:57: LicenseAgreementDlg. Dialog created

The last property change '[Redirect]' should actually be assigning the
LicenseAgreementDlg_Back property the value of 'WelcomeDlg'; at least if the
documentation for the table and the Formatted type are accurate. According
to MSDN the Formatted type allows the following:

The square brackets may be iterated and the property names are resolved from
inside out. For example, suppose the substring [[PropertyA]] appears in the
text. First, the value of property PropertyA is retrieved. If the value is a
valid property name, such as PropertyB, then the value of PropertyB is
retrieved, and the entire substring [[PropertyA]] is substituted with the
value of PropertyB. If PropertyA is not a valid property name, or if the
value of PropertyA is not a valid property name, then the substring is
blank.

So, according to this the Event value of [[Redirect]] should either be the
property name of the value of the value of Redirect, or blank. It should not
be [Redirect]. In fact, I would expect that I would be able to do this
without the redirect property, but this didn't work either:
[[WelcomeDlg_Next]_Back] (either in WiX or the ControlEvent table).

If you are wondering what brought me to this point, I am attempting to
resolve a pet peeve that I have had (for some time) with dialog sequencing.
Having to conditionally sequence the dialog logic forward makes sense,
although I could wish for something less verbose than having to explicitly
itemize each possible pathway. But having to do the same thing for the
backwards path never made any sense to me. A simple stack of where the user
has been solves the problem. I implemented a stack by appending the current
dialog name to a property, delimited by commas. However, the overhead of a
custom action to grab the last item from the property was noticeably slow on
a vm, and I was looking for an alternative. If the Event field supported the
double redirection that is documented, I could set the back property for the
'next' dialog, and eliminate the overhead of the custom action. With the
custom action each dialog back button has two publish events: DoAction,
GetLastDialog and NewDialog, [LastDlg]; where GetLastDialog sets LastDlg to
the last item and pops it from the stack.

For now I guess I live with the hourglass icon on vms, on a real machine
there is hardly a noticeable lag. I am curious, however, as to whether the
documentation or implementation is incorrect for the Event field. I suspect
that the field is not truly a Formatted type, but more likely text that
handles a property value.

thanks,
bill



------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to