Recent

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

zoltanleo

  • Sr. Member
  • ****
  • Posts: 486
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?  :)
Win10 LTSC x64/Deb 11 amd64(gtk2/qt5)/Darwin Cocoa (Monterey):
Lazarus x32/x64 2.3(trunk); FPC 3.3.1 (trunk), FireBird 3.0.10; IBX by TonyW

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

tonyw

  • Sr. Member
  • ****
  • Posts: 319
    • 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: 1829
    • 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

  • Sr. Member
  • ****
  • Posts: 319
    • 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.

 

TinyPortal © 2005-2018