Recent

Author Topic: problem with tbufdataset at designtime  (Read 4780 times)

kjteng

  • Sr. Member
  • ****
  • Posts: 259
problem with tbufdataset at designtime
« on: October 28, 2021, 01:14:40 pm »
When I click the Active property in the object inspector, tbufdataset load the data correctly (from the file that I specified in the FILENAME property).  However if I click the Active property again (set it to false then set it back to True), the IDE crashes.
This does not occur in run time (where I can change the active property many times with no problem)
Any help?

p/s code attached

Zvoni

  • Hero Member
  • *****
  • Posts: 2315
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad

kjteng

  • Sr. Member
  • ****
  • Posts: 259
Re: problem with tbufdataset at designtime
« Reply #2 on: October 28, 2021, 05:37:28 pm »
Thank you for your reply.  Where can I download the amended pas file ?
I downloaded the bufdataset.pas from https://gitlab.com/freepascal.org/fpc/source/-/blob/600a5dd13fa707280908935b2a5bd14879125874/packages/fcl-db/src/base/bufdataset.pas. The problem still not solved.

BTW I just copied that file to c:\lazarus\fpc\3.2.0\source\packages\fcl-db\src\base and then rebuid the IDE ...is there anything/steps that I have missed out?

wp

  • Hero Member
  • *****
  • Posts: 11853
Re: problem with tbufdataset at designtime
« Reply #3 on: October 28, 2021, 06:02:38 pm »
The database components are different from other Lazarus components in the sense that they reside in the FCL and thus are not recompiled when you rebuild the IDE. Therefore, you must also recompile FPC - that's a story of its own... (but maybe it's enough to just recompile the fcl-db package) And be warned: when you copy a unit between different FPC versions there may be incompatible code in the copied unit so that compilation may abort.

It is much safer if you build FPC-trunk/main or FPC-fixes from the full sources (get them by git), or with the aid of fpcupdeluxe.

kjteng

  • Sr. Member
  • ****
  • Posts: 259
Re: problem with tbufdataset at designtime
« Reply #4 on: October 29, 2021, 05:56:12 am »

It is much safer if you build FPC-trunk/main or FPC-fixes from the full sources (get them by git), or with the aid of fpcupdeluxe.
Thanks you master for your reply. 
Sorry for asking again as I am new to this subject (I have not use fpk directly before, only know to program in the IDE) :-
1.  FPC-trunk - means download the source from the following site ?
         https://gitlab.com/freepascal.org/lazarus/lazarus/-/tree/main
2. Where can I find some guidance notes on 'how to recompile FPC' or 'how to recompile fcl-db'?
3. Alternatively, is there a way to re-install the lazarus in my pc so as to get everything updated?

Zvoni

  • Hero Member
  • *****
  • Posts: 2315
Re: problem with tbufdataset at designtime
« Reply #5 on: October 29, 2021, 09:44:12 am »
use fpcupdeluxe (look in third-party-forum)
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad

kjteng

  • Sr. Member
  • ****
  • Posts: 259
Re: problem with tbufdataset at designtime
« Reply #6 on: October 30, 2021, 08:33:20 am »
Thank you. I have managed to install using fpcupdeluxe as per your suggestion. There are new issues encountered. I have created a new topic here: https://forum.lazarus.freepascal.org/index.php/topic,56939.msg423229/topicseen.html#new
« Last Edit: October 30, 2021, 09:33:02 am by kjteng »

 

TinyPortal © 2005-2018