[Progress Communities] [Progress OpenEdge ABL] Forum Post: Mismatched parameters from method after moving to OE11.7.2

Status
Not open for further replies.
R

RJPowell

Guest
Morning, We have recently produced our first release using OpenEdge 11.7 and discovered an error when interfacing with a certain piece of equipment, which has necessitated some customer systems returning to using OpenEdge 11.6. The error is coming from within a library which is certified by Weights & Measures, so by necessity has been totally unchanged for a number of years. In fact, it has remained so unchanged that we still distribute an OpenEdge 11.3 version of the pl file for it (the first thing we tried was building it under 11.7 as the obvious answer was that there was just an incompatibility between versions). The code causing the error is along the lines of: using System.IO.Ports.*. class bcp.weighscale.WeighScale: method public integer Initialize(someParameters): define variable myPort as SerialPort no-undo. define variable errorCode as integer no-undo. openPort(output myPort, output errorCode). return errorCode. end method. method private void openPort(output myPort as SerialPort, output errorCode as integer): myPort = new SerialPort(someParameters). if valid-object(myPort) then myPort:Open(). /* Some checks to set errorCode go here */ end method. end class. This produces no syntax errors, compiles just fine, but when you try to run it you get: Source class 'System.IO.Ports.SerialPort, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' is not compatible with target class 'Progress.Lang.Error' for parameter 'myPort'. (13016) Routine Initialize bcp.weighscale.WeighScale sent called routine openPort bcp.weighscale.WeighScale mismatched parameters. (2570) As stated above, this code has been unchanged for years and has worked through OpenEdge 11.3 -> 11.6. It has only started doing this after moving the system to OpenEdge 11.7.2. Any assistance or ideas would be greatly appreciated, because I'm a little stumped here. Cheers, Robin

Continue reading...
 
Status
Not open for further replies.
Top