* * *

Author Topic: Version 2.3.0 of IBX for Lazarus is now available for download  (Read 3599 times)

zoltanleo

  • Full Member
  • ***
  • Posts: 122
Re: Version 2.3.0 of IBX for Lazarus is now available for download
« Reply #15 on: May 06, 2018, 07:16:06 pm »
I do respond to requests from users for requests for new features.
Am I to understand that you will add this functionality to the component?  :)
Win7 Ultim x64/Deb 9.4 i386:
Lazarus 1.9(r.58520); FPC 3.1.1 (r.39452),
IBX by -Rik-; FB 3.0.2

Sorry for my bad English, I'm using translator ;)

tonyw

  • Full Member
  • ***
  • Posts: 118
    • MWA Software
Re: Version 2.3.0 of IBX for Lazarus is now available for download
« Reply #16 on: May 07, 2018, 10:19:21 am »
I do respond to requests from users for requests for new features.
Am I to understand that you will add this functionality to the component?  :)
What I will probably do is to add an example of how to select the FB library and do it so that the code can be easily copied and pasted into your project. Although if I can think of a better way to do this, then I will.

Zoran

  • Hero Member
  • *****
  • Posts: 1244
    • http://wiki.lazarus.freepascal.org/User:Zoran
Re: Version 2.3.0 of IBX for Lazarus is now available for download
« Reply #17 on: May 07, 2018, 04:41:27 pm »
A small suggestion:

As described in Firebird Pascal API User guide (section 2.5), on top of IB.pas, there are two definitions:
Quote
{$DEFINE USEFIREBIRD3API}
{$DEFINE USELEGACYFIREBIRDAPI}
which say that the ibintf package will be compiled with support for both legacy api and new api.

Now we can change this by commenting out one of these if we do not intend to use it.

Although commenting out a line is quite simple, I just prefer not to change the original sources. So I'd suggest you change these lines to:
Quote
{$IF NOT DEFINED(USEFIREBIRD3API) AND NOT DEFINED(USELEGACYFIREBIRDAPI)}
// only if none of this is already defined, define both:
  {$DEFINE USEFIREBIRD3API}
  {$DEFINE USELEGACYFIREBIRDAPI}
{$ENDIF}

This way, I will be able put -dUSEFIREBIRD3API in my project's compiler options and my project will be compiled with fbintf library supporting new api only. If none of these options is added to the project options, both will be included.
In my opinion this is cleaner way than changing the sources.

tonyw

  • Full Member
  • ***
  • Posts: 118
    • MWA Software
Re: Version 2.3.0 of IBX for Lazarus is now available for download
« Reply #18 on: May 07, 2018, 04:53:34 pm »
A small suggestion:

As described in Firebird Pascal API User guide (section 2.5), on top of IB.pas, there are two definitions:
Quote
{$DEFINE USEFIREBIRD3API}
{$DEFINE USELEGACYFIREBIRDAPI}
which say that the ibintf package will be compiled with support for both legacy api and new api.

Now we can change this by commenting out one of these if we do not intend to use it.

Although commenting out a line is quite simple, I just prefer not to change the original sources. So I'd suggest you change these lines to:
Quote
{$IF NOT DEFINED(USEFIREBIRD3API) AND NOT DEFINED(USELEGACYFIREBIRDAPI)}
// only if none of this is already defined, define both:
  {$DEFINE USEFIREBIRD3API}
  {$DEFINE USELEGACYFIREBIRDAPI}
{$ENDIF}

This way, I will be able put -dUSEFIREBIRD3API in my project's compiler options and my project will be compiled with fbintf library supporting new api only. If none of these options is added to the project options, both will be included.
In my opinion this is cleaner way than changing the sources.
I can see the sense of that and will look into adding the idea.

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus