Hi,
When I set the footer- and header-text with SetHeaderAndFooterText I am receiving an exception:
Editor.Document.SetHeaderAndFooterText("script{ $text = \"", "\"; }");
Object reference not set to an instance of an object.
at ActiproSoftware.Windows.Controls.SyntaxEditor.Outlining.Implementation.OutliningManager.#Ugc(IOutliningSource #ql, TextSnapshotRange #Ayf)
at ActiproSoftware.Windows.Controls.SyntaxEditor.Outlining.Implementation.OutliningManager.#0gc(Nullable'1 #Cyf, TextSnapshotRange #Ayf, Boolean #Dyf)
at ActiproSoftware.Windows.Controls.SyntaxEditor.Outlining.Implementation.OutliningManager.OnDocumentTextChanged(Object #xhb, TextSnapshotChangedEventArgs #yhb)
at ActiproSoftware.Text.Implementation.TextDocumentBase.OnTextChanged(TextSnapshotChangedEventArgs e)
at ActiproSoftware.Text.Implementation.CodeDocument.OnTextChanged(TextSnapshotChangedEventArgs e)
at ActiproSoftware.Text.Implementation.TextDocumentBase.SetHeaderAndFooterText(String headerText, String footerText)
at IamConsole.View.WorkflowDocument.TextDataItemView.OnInitialized(EventArgs e)
After inspecting the header and footer afterwards, the header and footer appear to have the correct values:
((ActiproSoftware.Text.Implementation.TextDocumentBase)(Editor.Document)).CurrentSnapshot.HeaderText == "script{ $text = \""
Simply ignoring the exception seems to work for me, but I would like to prevent this from happening.
Regards,
Aernout