Discussion:
[WiX-users] Error importing table: ControlEvent
Peter Mounce
2005-05-09 11:23:25 UTC
Permalink
Hi

I'm having a problem with my setup: I want to get it to launch a text file
depending on the value of a checkbox on the "you're done" dialog.

I get the error (using v2.0.2722):
"
fatal error LGHT0010: There was an error importing table: ControlEvent with
file: C:\Temp\qtosz4ei\ControlEvent.idt
"

I have a UI Fragment, and have added:

<Control Id="ShowChangeLog" Type="Checkbox" X="145" Y="110" Width="150"
Height="17" Property="SHOWCHANGELOG" CheckBoxValue="1">
<Text>Show changelog?</Text>
</Control>
<Control Id="Finish" Type="PushButton" X="236" Y="243" Width="56"
Height="17" Default="yes" Cancel="yes" Text="[ButtonText_Finish]">
<Publish Event="DoAction" Value="NotePadChangeLog">
SHOWCHANGELOG = 1
</Publish>
<Publish Event="EndDialog" Value="Return">1</Publish>
</Control>
...
<Property Id="NOTEPAD">notepad.exe</Property>
<Property Id="SHOWCHANGELOG">1</Property>
<CustomAction Id="NotePadChangeLog" Property="NOTEPAD"
ExeCommand="[SourceDir]Changes.txt" Return="asyncNoWait" />


to my UIFragment.wxs file.

I have added:

<File Id="ChangeLog" Name="Changes.txt"
src="$(var.SolutionDir)\docs\CHANGELOG.txt" />

to my main .wxs code file inside the "main" component.

I have scheduled the custom action:

<InstallExecuteSequence>
...
<Custom Action="NotePadChangeLog" After="InstallFinalize">NOT
Installed</Custom>
</InstallExecuteSequence>


I have tried putting the properties and custom action definitions inside the
main .wxs file as opposed to the UI Fragment, on the offchance that the
order of definitions mattered (but it can't, right?).

So I'm a bit stuck. Am I doing something silly?


Additionally, it would be nice to have the facility to refer to files and
components inside attributes by their IDs. So for example, in the
ExeCommand above, I'd like to be able to write
ExeCommand="$(var.IDs.ChangeLog.Name)" or something like that to get the
filename and path without having to use the SourceDir property and then the
filename.

By the way, what happens if I want to address a file in the ExeCommand, and
its long and short names differ? Say I'd set Name="Changes.txt" and
LongName="Changelog.txt", and wanted to launch the file as I'm trying now -
what'd happen if I picked the one it wasn't named? Seems like another
annoyance of 8:3 names :-(

Peter Mounce
IML Ltd

e: mailto:***@iml.co.uk w: http://www.iml.co.uk
t: (01428) 727476 f: (01428) 727011
Bob Arnson
2005-05-09 15:23:20 UTC
Permalink
Post by Peter Mounce
"
ControlEvent with
file: C:\Temp\qtosz4ei\ControlEvent.idt
"
<Control Id="ShowChangeLog" Type="Checkbox" X="145" Y="110"
Width="150"
Height="17" Property="SHOWCHANGELOG" CheckBoxValue="1">
<Text>Show changelog?</Text>
</Control>
<Control Id="Finish" Type="PushButton" X="236" Y="243" Width="56"
Height="17" Default="yes" Cancel="yes" Text="[ButtonText_Finish]">
<Publish Event="DoAction" Value="NotePadChangeLog">
SHOWCHANGELOG = 1
</Publish>
<Publish Event="EndDialog" Value="Return">1</Publish>
</Control>
Just a guess, but try condensing that SHOWCHANGELOG = 1 to one line.
Post by Peter Mounce
By the way, what happens if I want to address a file in the
ExeCommand, and
its long and short names differ? Say I'd set Name="Changes.txt" and
LongName="Changelog.txt", and wanted to launch the file as
I'm trying now -
what'd happen if I picked the one it wasn't named? Seems like another
annoyance of 8:3 names :-(
To avoid problems like this, use [#file] syntax to refer to a file's Id.

sig://boB
http://bobs.org
Rob Mensching
2005-05-09 21:02:42 UTC
Permalink
If Bob's first suggestion works, then that would be a bug in the WiX
toolset. Looking at the code, I think I've found the issue. The newlines
are being preserved which upsets the IDT later. I'll start working on a fix
for this but feel free to file a bug to track the issue.

-----Original Message-----
From: wix-users-***@lists.sourceforge.net
[mailto:wix-users-***@lists.sourceforge.net] On Behalf Of Bob Arnson
Sent: Monday, May 09, 2005 8:23 AM
To: 'Peter Mounce'; wix-***@lists.sourceforge.net
Subject: RE: [WiX-users] Error importing table: ControlEvent
Post by Peter Mounce
"
ControlEvent with
file: C:\Temp\qtosz4ei\ControlEvent.idt
"
<Control Id="ShowChangeLog" Type="Checkbox" X="145" Y="110"
Width="150"
Height="17" Property="SHOWCHANGELOG" CheckBoxValue="1">
<Text>Show changelog?</Text>
</Control>
<Control Id="Finish" Type="PushButton" X="236" Y="243" Width="56"
Height="17" Default="yes" Cancel="yes" Text="[ButtonText_Finish]">
<Publish Event="DoAction" Value="NotePadChangeLog">
SHOWCHANGELOG = 1
</Publish>
<Publish Event="EndDialog" Value="Return">1</Publish>
</Control>
Just a guess, but try condensing that SHOWCHANGELOG = 1 to one line.
Post by Peter Mounce
By the way, what happens if I want to address a file in the
ExeCommand, and
its long and short names differ? Say I'd set Name="Changes.txt" and
LongName="Changelog.txt", and wanted to launch the file as
I'm trying now -
what'd happen if I picked the one it wasn't named? Seems like another
annoyance of 8:3 names :-(
To avoid problems like this, use [#file] syntax to refer to a file's Id.

sig://boB
http://bobs.org



-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
Bob Arnson
2005-05-09 22:09:31 UTC
Permalink
Post by Rob Mensching
If Bob's first suggestion works, then that would be a bug in the WiX
toolset. Looking at the code, I think I've found the issue.
The newlines
are being preserved which upsets the IDT later. I'll start
working on a fix
for this but feel free to file a bug to track the issue.
I noticed it before (maybe in this particular case, though I thought it was
in an execute-sequence bit) and assumed it was WAD (XML or WiX, wasn't
sure). Actually, I remember that it was in a CDATA section, which makes
sense that it would be literal.

Let this be a lesson: If a reasonable thing (like vertical whitespace in
source code) doesn't work, speak up.

sig://boB
http://bobs.org

Loading...