(IP 2003). I have a ddl with values that correspond to view names. SwitchView is called based on the selection in the list. Here is the offending snippet:
function msoxd__Job_uglyHack.view_attr::OnAfterChange(eventObj)
{
var sChangedNode = XDocument.DOM.selectSingleNode("//d:Job/@uglyHack.view").nodeValue;
if (eventObj.IsUndoRedo || eventObj.Operation != "Insert")
{
// An undo or redo operation has occurred and the DOM is read-only.
return;
}
XDocument.View.SwitchView(sChangedNode);
}
I feel like I've missed something really obvious, but I'm just not seeing it.