Recent

Author Topic: [IT WORKED AROUND]Are not TBufDataset and TDBGrid good friends?  (Read 12400 times)

SunyD

  • Guest
Re: Are not TBufDataset and TDBGrid good friends?
« Reply #15 on: February 21, 2017, 05:48:59 pm »
Your bug report will have better chances if you supply a minimal project that reproduces the issue.
There is example project included.

jacmoe

  • Full Member
  • ***
  • Posts: 249
    • Jacmoe's Cyber SoapBox
Re: Are not TBufDataset and TDBGrid good friends?
« Reply #16 on: February 21, 2017, 05:54:34 pm »
There is example project included.
D'oh - :-[
That's great!  ;D
more signal - less noise

valdir.marcos

  • Hero Member
  • *****
  • Posts: 1106
Re: Are not TBufDataset and TDBGrid good friends?
« Reply #17 on: February 21, 2017, 05:58:49 pm »
While checkout is being done ...
I do not know if I understand you very well, but is it your birthday today? If I'm right, happy birthday! And for your number of posts, I and many of us must thank you!
(sorry my english)

tnx   :) 59... Number of posts doesn't count, about 20% was useful and accurate. About 5% without offending people by accident  :o

Thaddy, happy birthday!
Thanks for all your help.

molly

  • Hero Member
  • *****
  • Posts: 2330
Re: Are not TBufDataset and TDBGrid good friends?
« Reply #18 on: February 21, 2017, 06:06:12 pm »
Thaddy, happy birthday!
Thanks for all your help.
+ 1

hrayon

  • Full Member
  • ***
  • Posts: 118
Re: Are not TBufDataset and TDBGrid good friends?
« Reply #19 on: February 21, 2017, 07:25:12 pm »
Hello GetMem, I assume you have not seen the problem happen since you are selecting the last record on the grid. Try to select some from the middle and do the resizing by dragging the window border.

Thanks Soner A. for registering the bug report.

hrayon

  • Full Member
  • ***
  • Posts: 118
Re: Are not TBufDataset and TDBGrid good friends?
« Reply #20 on: February 21, 2017, 08:09:16 pm »
More bad news ... I did a test here with a virtual machine and the error occurred in linux also: Lubuntu 15.04, but I confess that sometimes I resized and it seemed that everything was fine, but I insisted a little and the error happened. Unfortunately, for the end user, if an error can happen it will happen.

balazsszekely

  • Guest
Re: Are not TBufDataset and TDBGrid good friends?
« Reply #21 on: February 21, 2017, 08:20:24 pm »
@hrayon
Since I deleted my original project, I downloaded @Soner A. test project from the bugtracker and indeed the bug is there.

PS: Under windows you can catch WM_ENTERSIZEMOVE/WM_EXITSIZEMOVE message, then lock the window update. I just tested it works fine, but:
   1. By this you only treat the symptom not the problem itself
   2. The window is not updated until you finish resizing, alternatively you can lock only the grid
   3. It's windows only

However until the bug is fixed, you can use this solution as a workaround.
« Last Edit: February 21, 2017, 08:49:09 pm by GetMem »

SunyD

  • Guest
Re: Are not TBufDataset and TDBGrid good friends?
« Reply #22 on: February 21, 2017, 10:35:10 pm »
Today I found out when the bug occurs. Check my new note on bug report:
http://bugs.freepascal.org/view.php?id=31375#c98361

Maybe someone can solve it.

hrayon

  • Full Member
  • ***
  • Posts: 118
Re: Are not TBufDataset and TDBGrid good friends?
« Reply #23 on: February 21, 2017, 11:14:46 pm »
@GetMem
Thank you!
Sorry my ignorance, but how to "lock the window update" or the same to the grid? By canvas? Do you have some small code snippet?
I was trying by canvas, but don't works here. I do not understand perfectly the paint engine:
The capturing messages is ok:
Code: Pascal  [Select][+][-]
  1. ...
  2. function WndCallback(AHWND: HWND; uMsg: UINT; wParam: WParam; lParam: LParam): LRESULT; stdcall;
  3. begin
  4.   case uMsg of
  5.     WM_ENTERSIZEMOVE:
  6.     begin
  7.       //block dbgrid here
  8.     end;
  9.     WM_EXITSIZEMOVE:
  10.     begin
  11.      //unblock dbgrid here
  12.     end;
  13.   end;
  14.   Result := CallWindowProc(PrevWndProc, Ahwnd, uMsg, WParam, LParam);
  15. end;
  16. ...
  17.  

balazsszekely

  • Guest
Re: Are not TBufDataset and TDBGrid good friends?
« Reply #24 on: February 22, 2017, 06:58:28 am »
@hrayon

See attachment. As I said, is just a  temporary workaround(windows only) until the bug is fixed. Please test!

hrayon

  • Full Member
  • ***
  • Posts: 118
Re: Are not TBufDataset and TDBGrid good friends?
« Reply #25 on: February 22, 2017, 11:36:17 am »
Thank you very much!

balazsszekely

  • Guest
Re: [IT WORKED AROUND]Are not TBufDataset and TDBGrid good friends?
« Reply #26 on: February 22, 2017, 11:59:16 am »
@hrayon
You're welcome.

@Soner A.
I did a little background check. Interestingly enough with Laz1.4.4 /FCP 2.6.4 everything works fine,  in Laz 1.6/FPC 3.0 the bug is already present. So it was introduced somewhere between the two versions. This is most likely a FPC issue(db, sqldb, bufdataset ...), but I can tell for sure. You should locate the exact revision which caused the regression.  By locating the exact revision, you can find out what went wrong and  create a patch, otherwise you might have to wait month before it get fixed. Unfortunately I don't have the time or the motivation to do it.

 

TinyPortal © 2005-2018