Posted 17 years ago
by ibrahim

I have subclassed DynamicSyntaxLanguage and set IntelliPromptCodeSnippetsSupported property to true. I used the protected constructor to load language syntax from an XML resource file.
I am getting this NullReferenceException while calling ShowInsertSnippetPopup. Can you please help.
object.
Stacktrace: at am.a(Int32 A_0)
at aw.a(EventArgs A_0)
at ActiproSoftware.WinUICore.PopupControl.ShowPopup(Control owner, Boolean activate)
at ActiproSoftware.SyntaxEditor.IntelliPromptCodeSnippets.ShowInsertSnippetPopup(Int32 offset, String labelText, CodeSnippetFolder folder, CodeSnippetTypes type)
Here is the offending code
bool ret = this.syntaxEditor1.IntelliPrompt.CodeSnippets.ShowInsertSnippetPopup(this.syntaxEditor1.Caret.Offset, "Insert Snippet:", this._SnippetFolder, CodeSnippetTypes.Expansion);
if (ret == false)
{
InfoBox.Show("Could not activate snippet.");
return;
}
I am getting this NullReferenceException while calling ShowInsertSnippetPopup. Can you please help.
object.
Stacktrace: at am.a(Int32 A_0)
at aw.a(EventArgs A_0)
at ActiproSoftware.WinUICore.PopupControl.ShowPopup(Control owner, Boolean activate)
at ActiproSoftware.SyntaxEditor.IntelliPromptCodeSnippets.ShowInsertSnippetPopup(Int32 offset, String labelText, CodeSnippetFolder folder, CodeSnippetTypes type)
Here is the offending code
bool ret = this.syntaxEditor1.IntelliPrompt.CodeSnippets.ShowInsertSnippetPopup(this.syntaxEditor1.Caret.Offset, "Insert Snippet:", this._SnippetFolder, CodeSnippetTypes.Expansion);
if (ret == false)
{
InfoBox.Show("Could not activate snippet.");
return;
}