Posted 20 years ago
by painetraine

I am getting the following error:
Error in Start : The offset '209' added to the length '478' must be less than or equal to the count of characters in the document.
at ActiproSoftware.SyntaxEditor.Document.ᐂ(Int32 , Int32 )
at ActiproSoftware.SyntaxEditor.Document.GetSubstring(Int32 offset, Int32 length)
at ActiproSoftware.SyntaxEditor.EditorView.get_SelectedText()
This occurs when I do the following steps:
1. Paste some text into SyntaxEditor
2. Highlight the Text
3. Press F5 or some other key
My code then does one of the following that must be causing the error (since these are the only lines that reference the editor control in the function where the error occurs)
strText = this.editor.Document.CurrentView.Selection.View.SelectedText;
if (strText == "")
strText = this.editor.Text;
It doesn't happen every time but just on occassion and I can't figure out why this would be happening.
Thanks
Error in Start : The offset '209' added to the length '478' must be less than or equal to the count of characters in the document.
at ActiproSoftware.SyntaxEditor.Document.ᐂ(Int32 , Int32 )
at ActiproSoftware.SyntaxEditor.Document.GetSubstring(Int32 offset, Int32 length)
at ActiproSoftware.SyntaxEditor.EditorView.get_SelectedText()
This occurs when I do the following steps:
1. Paste some text into SyntaxEditor
2. Highlight the Text
3. Press F5 or some other key
My code then does one of the following that must be causing the error (since these are the only lines that reference the editor control in the function where the error occurs)
strText = this.editor.Document.CurrentView.Selection.View.SelectedText;
if (strText == "")
strText = this.editor.Text;
It doesn't happen every time but just on occassion and I can't figure out why this would be happening.
Thanks