Page 1 of 1

Synchronous Repaint Call (wait until painting is complete)

Posted: Mon Apr 06, 2009 10:26 pm
by 13049268
Dear Narcis,

I'm having a problem writing data to four fastline data sets on four separate charts on a single UI.

I'm basicallly solving simultaneous equations very frequently (5msec) and then writing the output to a graph.

My problem sounds very similar to that reported by Dimitri Goethals in the version 2 forum (who suspected that "the UI thread is flooded, and not
all the plots get the time to update themselves properly.").

When I try to solve it using the same technique I find that I cannot access
Steema.TeeChart.TChart.Invoke.

Is invocation accessible?

Yours Sincerely,

Andy Pybus

Posted: Tue Apr 07, 2009 7:28 am
by narcis
Hi Andy,

Have you tried calling Invoke from a TChart object already declared, for example: tChart1.Invoke(...)?

If this doesn't help please post Dimitri's thread URL here too.

Thanks in advance.

Posted: Tue Apr 07, 2009 8:21 am
by 13049268
Thanks for your help. I'll try it in the next couple of days.

The URL is:

http://www.berneda.com/publicnews/steem ... 000000.htm

Andy

Posted: Tue Apr 14, 2009 12:39 am
by 13049268
I'm still having problems trying to chart four physiological waves in real time.

Very occasionally I get the following exception:

System.IndexOutOfRangeException was unhandled
Message="Index was outside the bounds of the array."
Source="TeeChart"
StackTrace:
at Steema.TeeChart.Styles.ValueList.get_Item(Int32 index)
at Steema.TeeChart.Styles.FastLine.CalcPosition(Int32 index, Int32& x, Int32& y)
at Steema.TeeChart.Styles.FastLine.PrepareFastLine()
at Steema.TeeChart.Styles.FastLine.Draw()
at Steema.TeeChart.Styles.Series.DrawSeries()
at Steema.TeeChart.Chart.InternalDraw(Graphics g, Boolean noTools)
at Steema.TeeChart.Chart.InternalDraw(Graphics g)
at Steema.TeeChart.TChart.Draw(Graphics g)
at Steema.TeeChart.TChart.OnPaint(PaintEventArgs pe)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)
at System.Windows.Forms.Control.WmPaint(Message& m)
at System.Windows.Forms.Control.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.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at MSEPatient.Program.Main() in C:\Simulation Projects\MSE\MSEPatientXGA\MSEPatientXGA\Program.cs:line 18
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:

I am not able to catch the exception within my code. (I don't have Teechart Source Code.)

Can you advise me?

Andy

Posted: Tue Apr 14, 2009 8:50 am
by narcis
Hi Andy,

Which TeeChart version are you using? Could you please check if latest release available at the client area solves the problem at your end?

If it doesn't can you please send us a simple example project we can run "as-is" to reproduce the problem here?

You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.

Thanks in advance.