Posted 14 years ago
by Ashton
-
Developer,
Schema Solutions LLC
Version: 4.0.0283
Platform: .NET 2.0
Environment: Windows 7 (64-bit)
I am getting the following exception when using SyntaxEditor to show an Intelliprompt list:
Some notes about the issue:
1. The issue occurs in a dialog window where the dialog does not have a parent (ie was opened as .ShowDialog())
2. The prompt is show during the CodeSnippetFieldActivated event for a snippet field
3. Items are added as such:
// create and init the list
IntelliPromptMemberList list = _editor.IntelliPrompt.MemberList;
list.Clear();
list.Sorted = true;
// add the items
foreach (SnippetFieldListItem item in items)
{
list.Add(new IntelliPromptMemberListItem(item.Display, -1, null, null, item.ReplaceText));
}
4. List is shown via: list.Show(range.StartOffset, range.Length);
5. User picks an item from the list and presses Enter to select the item, immediately after pressing enter the exception below appears
************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
at ActiproSoftware.SyntaxEditor.IntelliPromptMemberList.c()
at m.d()
at ae.a(EventArgs A_0)
at ActiproSoftware.WinUICore.PopupControl.HidePopup()
at ActiproSoftware.SyntaxEditor.IntelliPromptMemberList.Complete()
at ActiproSoftware.SyntaxEditor.IntelliPromptMemberList.ActiproSoftware.SyntaxEditor.ISyntaxEditorEditModeHandler.OnKeyTyping(KeyTypingEventArgs e)
at ActiproSoftware.SyntaxEditor.SyntaxEditor.a(EditorView A_0, Keys A_1, Char A_2, Boolean A_3)
at ActiproSoftware.SyntaxEditor.SyntaxEditor.OnKeyDown(KeyEventArgs e)
at System.Windows.Forms.Control.ProcessKeyEventArgs(Message& m)
at System.Windows.Forms.Control.ProcessKeyMessage(Message& m)
at System.Windows.Forms.Control.WmKeyChar(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at ActiproSoftware.SyntaxEditor.SyntaxEditor.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
It has the effect of closing my window. I have the issue on 4.0.283 but I have had the issue on previous versions as well. I have not upgraded to 285 but can if you think that will fix the issue.
thanks,
Ashton
Some notes about the issue:
1. The issue occurs in a dialog window where the dialog does not have a parent (ie was opened as .ShowDialog())
2. The prompt is show during the CodeSnippetFieldActivated event for a snippet field
3. Items are added as such:
// create and init the list
IntelliPromptMemberList list = _editor.IntelliPrompt.MemberList;
list.Clear();
list.Sorted = true;
// add the items
foreach (SnippetFieldListItem item in items)
{
list.Add(new IntelliPromptMemberListItem(item.Display, -1, null, null, item.ReplaceText));
}
4. List is shown via: list.Show(range.StartOffset, range.Length);
5. User picks an item from the list and presses Enter to select the item, immediately after pressing enter the exception below appears
************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
at ActiproSoftware.SyntaxEditor.IntelliPromptMemberList.c()
at m.d()
at ae.a(EventArgs A_0)
at ActiproSoftware.WinUICore.PopupControl.HidePopup()
at ActiproSoftware.SyntaxEditor.IntelliPromptMemberList.Complete()
at ActiproSoftware.SyntaxEditor.IntelliPromptMemberList.ActiproSoftware.SyntaxEditor.ISyntaxEditorEditModeHandler.OnKeyTyping(KeyTypingEventArgs e)
at ActiproSoftware.SyntaxEditor.SyntaxEditor.a(EditorView A_0, Keys A_1, Char A_2, Boolean A_3)
at ActiproSoftware.SyntaxEditor.SyntaxEditor.OnKeyDown(KeyEventArgs e)
at System.Windows.Forms.Control.ProcessKeyEventArgs(Message& m)
at System.Windows.Forms.Control.ProcessKeyMessage(Message& m)
at System.Windows.Forms.Control.WmKeyChar(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at ActiproSoftware.SyntaxEditor.SyntaxEditor.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
It has the effect of closing my window. I have the issue on 4.0.283 but I have had the issue on previous versions as well. I have not upgraded to 285 but can if you think that will fix the issue.
thanks,
Ashton