Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Tools for Microsoft .Net & .Net Compact Framework
 QCChart2D and QCChart2D CF (VB and C#)
 SetDataset Problem. is it a bug?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

wlc

4 Posts

Posted - 11 Sep 2003 :  12:29:57  Show Profile  Reply with Quote

here is another test. it also fails.

1. given class scope variable:

Private localPlot1 As SimpleScatterPlot

i added the following method to UserChartControl1 class:

Public Sub setDataSet4()
Dim numPoints As Integer = 24
Dim x1(numPoints - 1) As Double
Dim y4(numPoints - 1) As Double

Dim i As Integer

For i = 0 To numPoints - 1
x1(i) = CDbl(i) / (numPoints)
y4(i) = x1(i) - 0.1 + 0.8 * ChartSupport.GetRandomDouble() - 0.15
Next

Dim Dataset4 As New SimpleDataset("Fourth", x1, y4)

localPlot1.SetDataset(Dataset4)

End Sub

2. In InitializeChart() i set localPlot1 as follows:

....

Dim thePlot1 As New SimpleScatterPlot(pTransform1, Dataset2, ChartObj.CROSS, attrib1)

localPlot1 = thePlot1

3. NOTE: at this point i can call

setDataSet4()

in the sub IntitializeChart and it works fine

4. but the call from Form1 fails:

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click

(BP) Me.UserChartControl11.setDataSet4()
Me.UserChartControl11.UpdateDraw

End Sub

Exception: Object reference not set to instance of object

5. using the debugger i break at (BP) and step into SetDataSet4:

using QuickWatch i look at localPlot1 and it looks ok

6. the call in SetDataSet fails at

localPlot1.SetDataset(Dataset4)


conclusion: mysterious. i need to solve this today.










bill clarke

quinncurtis

1164 Posts

Posted - 11 Sep 2003 :  13:04:25  Show Profile  Reply with Quote
You should continue the previous thread and not start a new one.

In your prevouse post you describe an situation where your technique works. We are 99.9% certian the your problem with plot1 is some sort of programming error. In order for us to debug your code we will need to have the complete source to a simple example program that reproduces the problem when you press the button. Send the complete zipped project as an attachment to support@quinn-curtis.com. We cannot promise an answer today.

Quinn-Curtis Customer Support
Go to Top of Page

quinncurtis

1164 Posts

Posted - 11 Sep 2003 :  15:22:27  Show Profile  Reply with Quote
Turned out to be a bug in the DLL after all. Sorry to attribute it to a programming error. That is the last time I will be 99.9% certain about something.

Registered owners of the software can download updated version using their orignal download links.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Quinn-Curtis Forums © 2000-07 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07