Posted 15 years ago by Nicols C.
Avatar
Hello,

I am new with SyntaxEditor At the moment I am testing the evaluation version, I include the SyntaxEditor in a Project to substitute my poor-friendly RichTextBox editor, and now I am testing the editor features. After some tests I found tree problems with splits:

Problem 1) If I follow this sequence I get an NullReferenceException:

1) Split Horizontal with this code:

if (currentMenuEditor.Document.HasVerticalSplit)
currentMenuEditor.Document.VerticalSplitPosition = 0;
if (!currentMenuEditor.Document.HasHorizontalSplit)
{
currentMenuEditor.Document.HorizontalSplitPosition = (int)
(currentMenuEditor.Document.DisplayRectangle.Height / 2);
}

2) Split Vertical with this code:

if (currentMenuEditor.Document.HasHorizontalSplit)
currentMenuEditor.Document.HorizontalSplitPosition = 0;
if (!currentMenuEditor.Document.HasVerticalSplit)
{
currentMenuEditor.Document.VerticalSplitPosition = (int)
(currentMenuEditor.Document.DisplayRectangle.Width / 2);
}

3) This exception is thrown:

System.NullReferenceException: Object reference not set to an instance of an object.
at ActiproSoftware.WinUICore.UIObject.ActiproSoftware.WinUICore.IUIComponent.NotifyMouseLeaveEvent(EventArgs e)
at ActiproSoftware.WinUICore.UIObject.OnMouseLeave(UIComponentMouseEventArgs e)
at ActiproSoftware.WinUICore.UIObject.ActiproSoftware.WinUICore.IUIComponent.RaiseMouseLeaveEvent(UIComponentMouseEventArgs e)
at ActiproSoftware.WinUICore.UIObject.?(IUIComponent , UIComponentMouseEventArgs )
at ActiproSoftware.WinUICore.UIObject.OnMouseMove(UIComponentMouseEventArgs e)
at ActiproSoftware.WinUICore.ViewSplitter.UIViewSplitter.OnMouseMove(UIComponentMouseEventArgs e)
at ActiproSoftware.WinUICore.UIObject.ActiproSoftware.WinUICore.IUIComponent.RaiseMouseMoveEvent(UIComponentMouseEventArgs e)
at ActiproSoftware.WinUICore.UIControl.OnMouseMove(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseMove(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.UserControl.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.ComponentManager.System.Windows.Forms.UnsafeNativeMethods+IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.DoEvents()
at q.b(TopLevelMenuItemBase A_0, Boolean A_1, Boolean A_2, Point A_3)
at TD.SandBar.TopLevelMenuItemBase.Show()
at TD.SandBar.MenuBar.OnItemPush(ToolbarItemBase item, Point position)
at TD.SandBar.ToolBar.OnMouseDown(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at TD.SandBar.ToolBar.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.ComponentManager.System.Windows.Forms.UnsafeNativeMethods+IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at Dlya.Architect.Ide.MainEntry.Main() in c:\mydocuments\desarrollo\architect\cdigo\1.0\dlya.architect.ide.main\mainentry.cs:line 54

**********************************

Problem 2) If I use the mouse to split the editor, and if I move the mouse quickly to remove a "split", sometime the split button is not showed correctly and some scrollbars are not hiding. I would publish an image showing the situation if I could publish images in this forum.

**********************************

Problem 3) This it is a minor problem. While I am splitting the editor there is a delay when drawing that produces a "wake effect". During a moment you could see the same scroll bar drawn in several places.

The effect could be reduced using the WM_SETREDRAW API. Other option in order to avoid to use the GDI API could be perform the resize operation in the Idle event. So, after you resize the views the editor is painted immediately.


Finals notes: I couldn't reproduce problem 1 and 2 in your examples. Maybe there is some other control in my project that it is affecting the SyntaxEditor.

Any help?, thanks,

Nicols

Comments (3)

Posted 15 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Could you email me a test application that does demonstrate the problems since you said our test application doesn't show them? Thanks!


Actipro Software Support

Posted 15 years ago by Nicols C.
Avatar
I am trying to isolate the problems. Until now I could isolate the first problem. When I can isolate both problems, I will send you the example by mail.

Thanks,
Nicols

[ 08-06-2004: Message edited by: Nicols C. ]
Posted 15 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
The next maintenance release will have a fix for the first problem. Thanks for the test app!


Actipro Software Support

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

Add Comment

Please log in to a validated account to post comments.