Recent

Author Topic: DBGrid DataSource JsonDataSet, DBGrid can't show data.  (Read 3282 times)

BrunoK

  • Hero Member
  • *****
  • Posts: 623
  • Retired programmer
Re: DBGrid DataSource JsonDataSet, DBGrid can't show data.
« Reply #15 on: June 26, 2024, 10:23:08 am »
Zvoni, jesusr,

Your sarcasms are unfair, bird00101011 is using a lazarus Wiki example, so I imagine, is learning lazarus and FPC.

In the Wiki explanation, there is no mention of binding the OnCreate in the form object inspector to procedure TForm1.FormCreate(Sender: TObject); maybe the Wiki could be improved ...

As I wrote above he managed to supply a compilable project for testing.



Zvoni

  • Hero Member
  • *****
  • Posts: 2738
Re: DBGrid DataSource JsonDataSet, DBGrid can't show data.
« Reply #16 on: June 26, 2024, 10:43:47 am »
Zvoni, jesusr,

Your sarcasms are unfair, bird00101011 is using a lazarus Wiki example, so I imagine, is learning lazarus and FPC.

In the Wiki explanation, there is no mention of binding the OnCreate in the form object inspector to procedure TForm1.FormCreate(Sender: TObject); maybe the Wiki could be improved ...

As I wrote above he managed to supply a compilable project for testing.
Then he should have read the Wiki on HOW TO USE Lazarus FIRST: https://wiki.lazarus.freepascal.org/Howdy_World_(Hello_World_on_steroids)
There you have the explanation how to bind Events to procedures.

"Copy/Paste"-ers don't get any pity from me

And, since i stated he doesn't seem to be a rookie (DB with JSON), he probably did already some coding in other languages and/or IDE's, and there he would have had the same "problem"
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

BrunoK

  • Hero Member
  • *****
  • Posts: 623
  • Retired programmer
Re: DBGrid DataSource JsonDataSet, DBGrid can't show data.
« Reply #17 on: June 26, 2024, 12:20:43 pm »

Then he should have read the Wiki on HOW TO USE Lazarus FIRST: https://wiki.lazarus.freepascal.org/Howdy_World_(Hello_World_on_steroids)
There you have the explanation how to bind Events to procedures.
More useful link is https://wiki.lazarus.freepascal.org/Howdy_World_(Hello_World_on_steroids), you link is incomplete.

In that page there is not once the mention of F11 to pop up the object inspector when a form is displayed, just suggestion to go thru the menu ..., F12 is mentionned many times.

As per stupidly copy pasting, that's something I do all the time to see what things have in the stomach.

First things I did when OP posted the project were :
  • Extract project and load in lazarus
  • Compile / run and see that the grid is not filled up as per OP complaint.
  • Put break point in FormCreate and run
  • See that code is not called -> check form in OI -> problem solved
Total time, few minutes, thanks to the compilable project.

 

TinyPortal © 2005-2018