Hi
When using an automation variable (its a driver in this case), I face the ffw problem:
A variable ist declarated with "withevents=yes". Now the trigger "DriverObject::OnError(errorCode : Integer;message : Text[1024])" is visible.
When an error occurs, the code in this trigger gets excecuted. Thats cool. But afterwards the regular navision error message pops up and says: "this message is for c/al programmers....". This seems not so cool.
My question: is there away to avoid navision from showing the error message, since the error has already been handled in the error handler of the automation variable.
btnGo - OnPush()
IF ISCLEAR(DriverObject) THEN
CREATE(DriverObject);
DriverObject.Open;
DriverObject::OnStatusChange(statusCode : Integer)
DriverObject::OnError(errorCode : Integer;message : Text[1024])
ERROR('error caught');
Any comments on this are appreciated.
Regards
Thomas
Comments
It looks like the raiseevent from the automation control is causing somekind of problem in navision.
"The call to member open failed. EFTDriver returned the following message: failed to connect to driver process."
Regards
Thomas
This message is for C/AL programmers:
This Automation variable has not been instantiated.
You can instantiate it by either creating or assigning it.
...is not an error but a warning?
I am assuming that was the error message you were talking about.
By the way: What did you mean by:
Is "withevents" a property in your Automation object?
Thank you for the input.
The error message was a specific one (one from the driver).
WithEvents: This is a property of the automation variable (see property of any automation variable)
Regards
Thomas