PDA

View Full Version : "use error.pkg" missing in dfbtrdrv.pkg



Bernhard Mandl
12-Sep-2005, 01:50 PM
The package "dfbtrcrv.pkg" that is distributed with PSQL CK3 contains a new
class "cDfbtrdrvHandler" that uses procedures from "error.pkg" but does not
include this package.

The causes complier errors in simple 3.x programs like this one:

/*
use dfbtrdrv.pkg
abort

Martin Moleman
13-Sep-2005, 03:06 AM
Bernhard,

Thanks for reporting, we will fix it for the next build.

Regards,

Martin Moleman
Dta Access Europe


"Bernhard Mandl" <b.mandl@_NOSPAM_a1.net> wrote in message
news:iiZjir8tFHA.4044@dacmail.dataaccess.com...
> The package "dfbtrcrv.pkg" that is distributed with PSQL CK3 contains a
> new class "cDfbtrdrvHandler" that uses procedures from "error.pkg" but
> does not include this package.
>
> The causes complier errors in simple 3.x programs like this one:
>
> /*
> use dfbtrdrv.pkg
> abort
>
>

Bernhard Mandl
13-Sep-2005, 07:09 AM
"use error.pkg" means that the global object Error_Info_Objectr_Info_Object
is created which means that all errors cause the "Error_Info_Img" message
box to pop up.

This is very undesired because it breaks all my 3.x legacy programs (these
expect that an error message is displayed on the last line of the screen)

I will revert to the old dfbtrdrv.pkg for now.

It would be great if you could modify the new dfbtrdrv.pkg so that it does
not require error.pkg.

Regards,
Bernhard

"Martin Moleman" <martin.moleman@dataaccess.nl> schrieb im Newsbeitrag
news:mpDhaoDuFHA.2172@dacmail.dataaccess.com...
> Bernhard,
>
> Thanks for reporting, we will fix it for the next build.
>
> Regards,
>
> Martin Moleman
> Dta Access Europe
>
>
> "Bernhard Mandl" <b.mandl@_NOSPAM_a1.net> wrote in message
> news:iiZjir8tFHA.4044@dacmail.dataaccess.com...
>> The package "dfbtrcrv.pkg" that is distributed with PSQL CK3 contains a
>> new class "cDfbtrdrvHandler" that uses procedures from "error.pkg" but
>> does not include this package.
>>
>> The causes complier errors in simple 3.x programs like this one:
>>
>> /*
>> use dfbtrdrv.pkg
>> abort
>>
>>
>
>

Bernhard Mandl
13-Sep-2005, 09:36 AM
My suggestion is to remove all "Send Ignore_error" and "Send Trap_Error"
lines and document that these functions may trigger error 20491 if an old
PSQL CK is installed.

So anyone who uses these functions can trap this error as desired and we
have no dependency from error.pkg

A simple "use ui" at the top must be added though (otherwise class array
will be unknown)

Bernhard Mandl
13-Sep-2005, 10:04 AM
I have modified dfbtrdrv.pkg so that it compiles under 3.x (without
additional use/include) and that it does not auto include error.pkg.

Procedures that are declared in error.pkg are only called if error.pkg is
included before dfbtrdrv.pkg. So everyone can decide if he wants to use
dfbtrdrv.pkg with or without error.pkg

I hope this one is OK for you.

Martin Moleman
14-Sep-2005, 03:08 AM
Bernhard,

The Dfbtrdrv.pkg must also be usable in VDF and your solution won't work
there.
I will see if i can figure out a general solution.

Maybe it would be better to build a separate 'legacy style' version of the
pkg.
The cDfbtrdrvHandler class is just a wrapper around the call_driver
functions. The class could be removed, and even the functions could be
rewritten to act as commands (like some of the other driver functions) or
maybe legacy style subroutines.

Regards,

Martin Moleman
Data Access Europe




"Bernhard Mandl" <b.mandl@_NOSPAM_a1.net> wrote in message
news:teoG2RHuFHA.2208@dacmail.dataaccess.com...
>I have modified dfbtrdrv.pkg so that it compiles under 3.x (without
>additional use/include) and that it does not auto include error.pkg.
>
> Procedures that are declared in error.pkg are only called if error.pkg is
> included before dfbtrdrv.pkg. So everyone can decide if he wants to use
> dfbtrdrv.pkg with or without error.pkg
>
> I hope this one is OK for you.
>
>
>

Bernhard Mandl
14-Sep-2005, 05:16 AM
I guess it should be easy to adjust my solution so it does also work with
VDF.

Something like

#IFDEF Error_Info_Img.n
Send Ignore_error To Error_object_Id 20491 // this is for DF 3.x ("Send
Ignore_error" only if error.pkg is included before)
#ELSE
#IF (!@>=40)
Send Ignore_error To Error_object_Id 20491 // this is for VDF (always
"Send Ignore_error", untested but but something like this should work)
#ENDIF
#ENDIF