Ajax javascript issues.

Javascript functions injected into the DOM using innerHTML will not work. So using something like:
<br />mydiv.innerHTML = [html result from ajax method call];<br />&hellip;<br /><div id=&ldquo;mydiv&rdquo;><br /></div><br />
make sure the [html result from ajax method call] doesn’t contain javascript, other then events (onclick, onblur, etc.).

Powershell Text Replace

Search a text file line by line, replacing text using regex’s.
<br />cat &lsquo;file.txt&rsquo; | foreach { $_ -replace &lsquo;find-text&rsquo;, &lsquo;replace-text&rsquo; }<br />

WIX: Skipping a dialog based on selected feature.

To skip dialogs you will need to modify the wxs files for the dialogs around your dialog. You need to add click events to the next and back buttons to handle the different paths based on the selected features.

<Publish Event=“NewDialog”
<![CDATA[&FeatureID = 3 AND !FeatureID <> 3]]>

You will also have to modify the WixUI_FeatureTree.wxs file to handle the newly created events. The default files can be copied from the WIX source.

One thing to note is the odd syntax for getting the state properities of objects.
&FeatureId is like FeatureId.ActionState
!FeatureId is like FeatureId.InstalledState

Inside the dialog…

<Control Id=“Next” Type=“PushButton”
X=“236” Y=“243” Width=“56” Height=“17”
Default=“yes” Text=“$(loc.WixUINext)”>
<Publish Event=“NewDialog”
<![CDATA[&FeatureID = 3 AND !FeatureID <> 3]]>
<Publish Event=“NewDialog”
<![CDATA[NOT (&FeatureID = 3 AND !FeatureID <> 3)]]>


Wix Tutorial

ActiveRecord dictionary mapping.

<br />[HasMany(typeof(MyObject), &ldquo;object_id&rdquo;, &ldquo;objecttable&rdquo;, RelationType = RelationType.Map,<br />Cascade = ManyRelationCascadeEnum.All, CustomAccess = Generics.Access, Lazy = true,<br />Index = &ldquo;name-of-key-column-in-objecttable&rdquo;, IndexType = &ldquo;System.String&rdquo;)]<br />public IDictionary<string, MyObject> Objects {&hellip;}<br />

Castle Project :: View topic – Dictionary and RelationType.Map, Index, IndexType

Brutalist Framework