Posted 17 years ago
by Charles W. Hooks
Version: 4.0.0235
Platform: .NET 2.0
Environment: Windows XP (32-bit)
I looked thru the forums and didn't see the bug I am experiencing reported.
I have the syntax editor placed on a tab.
The following line work successfully when the tab that has the syntax editor has focus:
syntaxEditor.Document.Text = script;
When a different tab has focus and that line is called I get the following stack trace:
System.IndexOutOfRangeException: Index was outside the bounds of the array.
at bf.b(Int32 A_0)
at bm.a(Int32 A_0)
at ActiproSoftware.SyntaxEditor.DisplayLineCollection.e(Int32 A_0)
at ActiproSoftware.SyntaxEditor.EditorView.OffsetToPosition(Int32 offset)
at ActiproSoftware.SyntaxEditor.Selection.a(Int32 A_0, Int32 A_1, Int32 A_2)
at ActiproSoftware.SyntaxEditor.Selection.get_EndEditPosition()
at ActiproSoftware.SyntaxEditor.EditorView.get_HorizontalScrollBarMaximum()
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.d(Object A_0, DocumentModificationEventArgs A_1)
at ActiproSoftware.SyntaxEditor.Document.b(DocumentModificationEventArgs A_0)
at ActiproSoftware.SyntaxEditor.Document.a(DocumentModification A_0, Boolean A_1)
at ActiproSoftware.SyntaxEditor.Document.set_Text(String value)
at Kaleidoscope.Model.Screen.SubControls.TextEditor.KcEditorControl.SetScript(String script)
at AbacusStudio.Designers.SurfaceDesigner.SurfaceDesignerControl.RunAtChanged(RunAtType runAt)
at AbacusStudio.Designers.SurfaceDesigner.FieldDetailsEditorControl.OnRunAtChanged(RunAtType runAt)
at AbacusStudio.Components.EventListControl.OnRunAtChanged(RunAtType runAt)
at AbacusStudio.Components.EventListControl.comboBoxScriptType_SelectedIndexChanged(Object sender, EventArgs e)
at System.Windows.Forms.ComboBox.OnSelectedIndexChanged(EventArgs e)
at System.Windows.Forms.ComboBox.WmReflectCommand(Message& m)
at System.Windows.Forms.ComboBox.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)
Even if I catch the exception, the syntax editor become corrupt, switching the tab with the syntax editor on it, generates endless exceptions that basically kills the app and the syntax editor has a red X thru it with no text displayed.
I have the syntax editor placed on a tab.
The following line work successfully when the tab that has the syntax editor has focus:
syntaxEditor.Document.Text = script;
When a different tab has focus and that line is called I get the following stack trace:
System.IndexOutOfRangeException: Index was outside the bounds of the array.
at bf.b(Int32 A_0)
at bm.a(Int32 A_0)
at ActiproSoftware.SyntaxEditor.DisplayLineCollection.e(Int32 A_0)
at ActiproSoftware.SyntaxEditor.EditorView.OffsetToPosition(Int32 offset)
at ActiproSoftware.SyntaxEditor.Selection.a(Int32 A_0, Int32 A_1, Int32 A_2)
at ActiproSoftware.SyntaxEditor.Selection.get_EndEditPosition()
at ActiproSoftware.SyntaxEditor.EditorView.get_HorizontalScrollBarMaximum()
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.d(Object A_0, DocumentModificationEventArgs A_1)
at ActiproSoftware.SyntaxEditor.Document.b(DocumentModificationEventArgs A_0)
at ActiproSoftware.SyntaxEditor.Document.a(DocumentModification A_0, Boolean A_1)
at ActiproSoftware.SyntaxEditor.Document.set_Text(String value)
at Kaleidoscope.Model.Screen.SubControls.TextEditor.KcEditorControl.SetScript(String script)
at AbacusStudio.Designers.SurfaceDesigner.SurfaceDesignerControl.RunAtChanged(RunAtType runAt)
at AbacusStudio.Designers.SurfaceDesigner.FieldDetailsEditorControl.OnRunAtChanged(RunAtType runAt)
at AbacusStudio.Components.EventListControl.OnRunAtChanged(RunAtType runAt)
at AbacusStudio.Components.EventListControl.comboBoxScriptType_SelectedIndexChanged(Object sender, EventArgs e)
at System.Windows.Forms.ComboBox.OnSelectedIndexChanged(EventArgs e)
at System.Windows.Forms.ComboBox.WmReflectCommand(Message& m)
at System.Windows.Forms.ComboBox.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)
Even if I catch the exception, the syntax editor become corrupt, switching the tab with the syntax editor on it, generates endless exceptions that basically kills the app and the syntax editor has a red X thru it with no text displayed.