Recent

Author Topic: TBufDataset not saving  (Read 7087 times)

wp

  • Hero Member
  • *****
  • Posts: 11923
Re: TBufDataset not saving
« Reply #15 on: January 26, 2018, 06:39:44 pm »
If I remember correctly the bug that you suffer from was fixed in a single line change:
  • Open source file dbcombobox.inc, it is in folder lcl/include of your Lazarus installation
  • Find the procedure and add the line FDataLink.Modified as shown below (to be on the safe side, make a backup copy of the file before you change it):
Code: Pascal  [Select][+][-]
  1. procedure TDBComboBox.Select;
  2. begin
  3.   //avoid reseting text when calling select
  4.   FDataLink.OnDataChange := nil;
  5.   try
  6.     if FDataLink.Edit then
  7.     begin
  8.        FDataLink.Modified;    // <---- ADD THIS LINE
  9.        FDataLink.UpdateData;
  10.        inherited Select;
  11.     end
  12.     else
  13.     begin
  14.        FDatalink.Reset;
  15.        DataChange(Self);
  16.     end;
  17.   finally
  18.     FDataLink.OnDataChange := @DataChange;
  19.   end;
  20. end;
  • Then recompile your program, Lazarus will automatically recompile the modified DBCombobox.
When a new version will be released this fix will be contained automatically.

"Trunk" is the development version of Lazarus - this is what will be released as Lazarus 1.10 or 2.0. You can get it with svn as described by GetMem. It is remarkably stable, I work with it regularly. But of course, fatal issues can occur from time to time, if they are not fixed within a few days write a message to the Lazarus mailing list. Or you can revert to an older revision with svn easily, normally you don't need the ultra-freshest version.

"fixes" is the branch preparing for bug-fix release of the current version, 1.8. You work with it in the same way, but containing less experimental code, its stability should be better than that of trunk although very rare fatal issues cannot be excluded.
« Last Edit: January 26, 2018, 06:46:17 pm by wp »

RedOctober

  • Sr. Member
  • ****
  • Posts: 452
Re: TBufDataset not saving
« Reply #16 on: January 26, 2018, 10:01:31 pm »
I have installed both Fixes and Trunk.  Under Trunk, another bug is introduced, so I abandoned it.  Under Fixes, the problem with the DBComboBoxes is fixed and my project is working better.
Thanks for the help wp and GetMem.

wp

  • Hero Member
  • *****
  • Posts: 11923
Re: TBufDataset not saving
« Reply #17 on: January 26, 2018, 10:12:02 pm »
Under Trunk, another bug is introduced, so I abandoned it.
What is wrong with trunk? If you don't report it it will only be fixed if somebody else sees and reports it.

 

TinyPortal © 2005-2018