Profile Picture

Compatibility problems of version 10 with version 9

Posted By Yuri Gaidoukevitch 14 Years Ago
Author
Message
Yuri Gaidoukevitch
Posted 14 Years Ago
View Quick Profile
Forum Newbie

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
Last Active: 13 Years Ago
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


bob milanov
Posted 14 Years Ago
View Quick Profile
Supreme Being

Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)

Group: Forum Members
Last Active: 6 Months Ago
Posts: 153, Visits: 11

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
Posted 14 Years Ago
View Quick Profile
Forum Newbie

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
Last Active: 14 Years Ago
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 ?

bob milanov
Posted 14 Years Ago
View Quick Profile
Supreme Being

Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)

Group: Forum Members
Last Active: 6 Months Ago
Posts: 153, Visits: 11

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
Posted 14 Years Ago
View Quick Profile
Forum Newbie

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
Last Active: 13 Years Ago
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
Posted 14 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Yesterday @ 1:54 AM
Posts: 3,054, Visits: 4,009

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





Similar Topics


Reading This Topic