Symbols are not created for primary keys in tables unless the
tableDefinition/@createSymbols="yes".

On Mon, Dec 7, 2009 at 6:33 AM, Maciej Oszutowski <im...@post.pl> wrote:

>
> Hi,
>
> I'm developing WIX extension which creates number of custom tables. One of
> them is similar to InstallExecuteSequence, another one is similar to
> CustomAction table. Don't ask me why, I just need it ;)
>
> Tables look as follows:
>
>  <tableDefinition name="MyExecuteSequence">
>    <columnDefinition name="Action" type="string" length="128"
> primaryKey="yes" category="identifier"/>
>    <columnDefinition name="Condition" type="string" length="255"
> nullable="yes" />
>    <columnDefinition name="Sequence" type="number" length="4"/>
>    <columnDefinition name="Text" type="string" length="128" nullable="yes"
> />
>    <columnDefinition name="Flags" type="number" length="4" nullable="yes"
> />
>  </tableDefinition>
>
>  <tableDefinition name="MyCustomAction">
>    <columnDefinition name="Key" type="string" length="128" primaryKey="yes"
> category="identifier"/>
>    <columnDefinition name="Module" type="string" length="128"
> nullable="no"/>
>    <columnDefinition name="Condition" type="string" length="255"
> nullable="yes"/>
>    <columnDefinition name="Exe" type="string" length="255" nullable="no" />
>    <columnDefinition name="Install" type="string" length="128"
> nullable="yes"/>
>    <columnDefinition name="Uninstall" type="string" length="128"
> nullable="yes"/>
>    <columnDefinition name="Flags" type="number" length="4" nullable="yes"/>
>  </tableDefinition>
>
> Action column in MyExecuteSequence may be one of predefined actions or link
> to MyCustomAction table, so I can't set foreign key there - just like in
> InstallExecuteSequence. To get some basic validation, in MyExecuteSequence
> parsing code I'm trying to create simple reference to MyCustomAction table:
>
> switch (attrib.LocalName)
> {
>    case "Action":
>        if (isCustomAction)
>        {
>            action =
> extension.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
>            extension.Core.CreateWixSimpleReferenceRow(sourceLineNumbers,
> "MyCustomAction", action);
>        }
>        else
>        {
>            extension.Core.UnexpectedAttribute(sourceLineNumbers, attrib);
>        }
>        break;
> ...
>
> WIX source code:
> <my:CustomAction Id="custom1" Module="Core" Exe="myca.exe"
> Install="/install" Uninstall="/uninstall"/>
>
> <my:ExecuteSequence>
>   <my:RunCustomAction Action="custom1" Text="executing custom1"
> Sequence="1000"/>
> </my:ExecuteSequence>
>
> Unfortunately when I try to compile it, I always get
> error LGHT0094: Unresolved reference to symbol 'MyCustomAction:custom1' in
> section 'Fragment:'.
>
> I checked .wixpdb file and MyCustomAction table is there, with custom1 in
> 'Key' column which is primary key of this table, so I have no idea what's
> wrong.
> If I remove creating reference - compilation succeeds, but I have no
> validation then.
>
> Any ideas how to make it work?
> --
> View this message in context:
> http://n2.nabble.com/WIX-extension-CreateWixSimpleReferenceRow-doesn-t-work-with-custom-tables-tp4126323p4126323.html
> Sent from the wix-users mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> Join us December 9, 2009 for the Red Hat Virtual Experience,
> a free event focused on virtualization and cloud computing.
> Attend in-depth sessions from your desk. Your couch. Anywhere.
> http://p.sf.net/sfu/redhat-sfdev2dev
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
>


-- 
virtually, Rob Mensching - http://RobMensching.com LLC
------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to