App developed under 9.0, seeing errors in 9.1.2 not present in 9.0!
Developed an application under 9.0 running normally there. Testing in 9.1.2 and seeing OLE errors and object reference errors. Were there changes in 9.1 that will require redevelopment of an App in 9.1.2? I am seeing errors related to Object reference not set to an instance of an object. There must be differences between 9.0 and later versions. Any suggestions as to how to proceed?
0
Answers
-
As an Example
Public Function AdjThresh() As SimpleScript AdjThresh = New SimpleScript Dim doc1
With measure.ThresholdTool.Gadgets.Histogram(AdjThresh) .CheckState = MediaCy.IQL.Application.McCommand.mcCheckState.Checked .Run() End With
Is throwing "Object reference not set to an instance of an object" error.
0 -
There are other differences as well. In v9.0 the use of GetSetting as in where dBF is a floating point array
dPF(0,0)=GetSetting("Hook", "PassFail", "AMin",.34 )
Functioned normally.
In 9.1.x you must convert:
dPF(0,0)=CDbl(GetSetting("Hook", "PassFail", "AMin",.34 ))
0 -
Rod,I am not able to reproduce the error you are reporting, maybe it happens later in the macro? In general there are no major changes in version 9.1.2, but as the script interpreter is being improved to provide better compliance with VB.NET as well as better performance there might be small differences which we do our best to keep to a minimum.Pierre0
-
This works okay by itself:
Imports MediaCy.Addins.ThresholdTool.Gadgets Imports MediaCy.Commands Public Module Macros Public Function Test() As SimpleScript Test = New SimpleScript With Measure.ThresholdTool.Gadgets.Histogram(Test) .CheckState = MediaCy.IQL.Application.McCommand.mcCheckState.Unchecked .Run() End With With Measure.ThresholdTool.Gadgets.Histogram(Test) .CheckState = MediaCy.IQL.Application.McCommand.mcCheckState.Checked .Run() End With End Function
But this does not in the larger App and gens the Obj error:
'Sub Routines Public Function AdjThresh() As SimpleScript AdjThresh = New SimpleScript Dim doc1 With measure.ThresholdTool.Gadgets.Histogram(AdjThresh) .CheckState = MediaCy.IQL.Application.McCommand.mcCheckState.Checked .Run() End WithEnd Function
This will be messy to debug, something has changed it seems.
0 -
It looks like you have a name conflict, maybe there's a variable called measure or something similar? It's also possible that your imports of namespaces are different in the app and cause measure.ThresholdTool.Gadgets.Histogram to malfunction.0
-
What I do not understand is, I did not touch my code other than to add the string conversion calls. Nothing related to Imports have changed. Why would I now be seeing problems in 9.1.2 that were not visible in 9.0?0
-
Rod,We use a third party library for our macro interpreter, which we test and validate with our own apps and macros. I don't remember seeing major differences between 9.0 and 9.1.2 but there may be occasional changes, often resulting from actual fixes which may introduce slight behavior changes. If you'd like us to help with any issue resulting from the conversion, please feel free to send your project to our tech support engineers who will be able to clarify things.Pierre0
-
Who would you suggest?0
-
Rod,I'll contact you by email to sort out the incompatility.Pierre0
Categories
- All Categories
- 961 Image-Pro v9 and higher
- 9 Image-Pro FAQs
- 18 Image-Pro Download & Install
- 448 Image-Pro General Discussions
- 486 Image-Pro Automation (Macros, Apps, Reports)
- 20 AutoQuant Deconvolution
- 2 AutoQuant Download & Install
- 18 AutoQuant General Discussions
- 195 Image-Pro Plus v7 and lower
- 3 Image-Pro Plus Download & Install
- 106 Image-Pro Plus General Discussions
- 86 Image-Pro Plus Automation with Macros
- 19 Legacy Products
- 16 Image-Pro Premier 3D General Discussions
- 26 Image-Pro Insight General Discussions