Issue with Intelliprompt List

SyntaxEditor for Windows Forms Forum

Posted 9 years ago by Ashton - Developer, Schema Solutions LLC
Version: 4.0.0283
Platform: .NET 2.0
Environment: Windows 7 (64-bit)
Avatar
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

Comments (2)

Posted 9 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Ashton,

It might be the null you are passing to pre-text in the IntelliPromptMemberListItem constructor. I think I found the place where it could be happening if that is null. Try making it String.Empty to see if it fixes it for now.


Actipro Software Support

Posted 9 years ago by Ashton - Developer, Schema Solutions LLC
Avatar
That fixed the issue.

Thanks for the help.
The latest build of this product (v2018.1 build 0341) was released 7 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.