Compatibility problems of version 10 with version 9


Author
Message
Yuri Gaidoukevitch
Yuri Gaidoukevitch
Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)
Group: Forum Members
Posts: 5, Visits: 1
We've been using Nevron chart for WinForms for many years, the last version was 9.7.15.12.
This week we have updated it to the version 10.1.6.12 and have several issues with it.

1. In designer mode and at run-time reading the State from resources (created in old version)
this.nChartControl1.State = ((Nevron.Chart.WinForm.NState)(resources.GetObject("nChartControl1.State")));
gives error: "Unable to cast object of type 'Nevron.Chart.WinForm.NState' to type 'Nevron.Chart.WinForm.NState'."
The same happens trying to load the state from file in designer using "Load From File ..." button ("Unable to cast object of type Nevron.Chart.NChartDocumentState to Nevron.Chart.NChartDocumentState." ). It looks like compatibility problem between version 10 and 9. We've done a lot of development in design mode, so we don't want to loose it or doing everything again in the new version. What can you recommend?

2. We used the following piece of code to set the license:

If (Nevron.NLicenseManager.Instance.Chart.EvaluationMode) Then
Nevron.NLicenseManager.Instance.LockLicense = False
Nevron.NLicenseManager.Instance.SetLicense(New Nevron.NLicense("XXX"))
Nevron.NLicenseManager.Instance.LockLicense = True
End If

In the new version Nevron.NLicenseManager.Instance.Chart doesn't exist. What can we use instead?

Thank you,

Yuri Gaidoukevitch

Blagovest Milanov
Blagovest Milanov
Supreme Being (148 reputation)Supreme Being (148 reputation)Supreme Being (148 reputation)Supreme Being (148 reputation)Supreme Being (148 reputation)Supreme Being (148 reputation)Supreme Being (148 reputation)Supreme Being (148 reputation)Supreme Being (148 reputation)
Group: Forum Members
Posts: 154, Visits: 15

Hi Yuri,

1. This is caused by the fact that binary serialization in .NET is not backward compatible. To solve the issue just delete the line of code:

this.nChartControl1.State = ((Nevron.Chart.WinForm.NState)(resources.GetObject("nChartControl1.State")));

it will be automatically regenerated by the designer next time you open the form.

2. We have removed queries for individual products regarding licensing - it can be reintroduced if needed however

Nevron.NLicenseManager.Instance.LockLicense = False
Nevron.NLicenseManager.Instance.SetLicense(New Nevron.NLicense("XXX"))
Nevron.NLicenseManager.Instance.LockLicense = True

(without the if) will work just fine. Is there any reason why you need to check if the component is in evaluation mode? BTW you can also achieve the same effect by having a static boolean field.

Let me know if you meet any problems.

Best regards,
Bob


K DR
K DR
Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)
Group: Forum Members
Posts: 5, Visits: 1
But if you remove that line, that means you lose your settings ? How to prevent that and make a clean migration ?
Blagovest Milanov
Blagovest Milanov
Supreme Being (148 reputation)Supreme Being (148 reputation)Supreme Being (148 reputation)Supreme Being (148 reputation)Supreme Being (148 reputation)Supreme Being (148 reputation)Supreme Being (148 reputation)Supreme Being (148 reputation)Supreme Being (148 reputation)
Group: Forum Members
Posts: 154, Visits: 15

Hi,

You should save the control state to an .XML file, then change the references and remove the .State line of code in the InitializeComponent and import the saved state. You can load / save the control state by right clicking on the control in designer mode and choosing the Save to File /Load from File verbs. Make sure to select .XML as the output format as .NET binary serialization is not backward compatible.

Let me know if you meet any problems.

Best regards,
Bob


Yuri Gaidoukevitch
Yuri Gaidoukevitch
Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)
Group: Forum Members
Posts: 5, Visits: 1

Bob,

I tried using your suggestion, but saving the chart to XML file shows error: "There was an error reflecting type 'Nevron.Chart.NChartDocumentState'" and the XML file is not created. (I tried saving the version 9.7.15.12)

What can you recommend to fix this problem?

Thanks,

Yuri Gaidoukevitch


Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K

Hi Yuri,

Try using the custom xml - it should be able to recover if the component model has changed. Let us know if the problem persists...



Best Regards,
Nevron Support Team


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search