Posted 18 years ago
by Justin Stenning
-
Manager, Research & Development,
netcat.biz Pty Ltd
Version: 4.0.0235
Hi,
I'm not sure whether I have hit a bug, or whether I am doing this wrong:
I have a single SyntaxEditor control, and I am swapping multiple Document objects into it when switching between tabs like this:However I have found that if I scroll down a document, make a selection, and then swap to another document about 1 out of 5 times the above line of code will generate an ArgumentOutOfRangeException.
Exception info:I have not yet tried creating a completely cut down test, however I have removed the syntax language and reproduced the error.
Is there something I should be doing before attempting to swap the Document object or is this a problem with SyntaxEditor?
In the short term I will create an editor for each document - however I would much prefer to use the document swapping method.
Cheers,
J
I'm not sure whether I have hit a bug, or whether I am doing this wrong:
I have a single SyntaxEditor control, and I am swapping multiple Document objects into it when switching between tabs like this:
editor.Document = myDocument1;
Exception info:
System.ArgumentOutOfRangeException was unhandled by user code
Message="Specified argument was out of the range of valid values.\r\nParameter name: index"
Source="ActiproSoftware.SyntaxEditor.Net20"
ParamName="index"
StackTrace:
at ActiproSoftware.SyntaxEditor.DocumentLineCollection.get_Item(Int32 index)
at bm.b(Int32 A_0, Int32 A_1)
at ActiproSoftware.SyntaxEditor.DisplayLineCollection.e(Int32 A_0)
at ActiproSoftware.SyntaxEditor.EditorView.l()
at ActiproSoftware.SyntaxEditor.EditorView.ArrangeCore()
at ActiproSoftware.WinUICore.UIElement.Arrange(Rectangle newBounds)
at ActiproSoftware.SyntaxEditor.SyntaxEditor.ArrangeCore()
at ActiproSoftware.WinUICore.UIControl.Arrange(Rectangle newBounds)
at ActiproSoftware.WinUICore.UIControl.UpdateLayout()
at ActiproSoftware.WinUICore.UIControl.Invalidate(InvalidationLevels levels, InvalidationTypes types)
at ActiproSoftware.SyntaxEditor.SyntaxEditor.a(co A_0)
at ActiproSoftware.SyntaxEditor.SyntaxEditor.a(Document A_0)
at ActiproSoftware.SyntaxEditor.SyntaxEditor.set_Document(Document value)
Is there something I should be doing before attempting to swap the Document object or is this a problem with SyntaxEditor?
In the short term I will create an editor for each document - however I would much prefer to use the document swapping method.
Cheers,
J