Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2013-09

DB aware components

6 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Antonio Fortuny

Hi Folks.

Is it normal that when a TDBGrid is dropped onto a TFrame (or descendant) the DataSource property cannot be assigned to a TSqlQuery dropped onto a TDataModule ? In other words, in the properties inspectior of the TDBGrid, the Datasource property shows nothing. The TDataModule is in the uses clause of the TFrame Interface. Otherwise when the TDbGrid is dopp?d onto a TForm, the DataSource shows all TDataset descendants dropped into the TDataModule. It appears to be the same for all data aware components that I have tested so far. Finally, assigning the datasource at runtime appears to work. But this is a workaround.

Antonio.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130916/22adb8a8/attachment.html>

Reply by email

Mattias Gaertner
to Antonio Fortuny
Show quoted text 12 lines
Hi Folks. Is it normal that when a TDBGrid is dropped onto a TFrame (or descendant) the DataSource property cannot be assigned to a TSqlQuery dropped onto a TDataModule ? In other words, in the properties inspectior of the TDBGrid, the Datasource property shows nothing. The TDataModule is in the uses clause of the TFrame Interface. Otherwise when the TDbGrid is dopp?d onto a TForm, the DataSource shows all TDataset descendants dropped into the TDataModule. It appears to be the same for all data aware components that I have tested so far. Finally, assigning the datasource at runtime appears to work. But this is a workaround.

Maybe a result of Juha's change:
http://wiki.freepascal.org/Lazarus_1.2.0_release_notes#TComponentPropertyEditor_behavior_was_changed

Mattias

Reply by email

Antonio Fortuny
to Mattias Gaertner

Le 16/09/2013 11:12, Mattias Gaertner a ?crit :

Show quoted text 17 lines
On Mon, 16 Sep 2013 10:52:08 +0200 Antonio Fortuny wrote: > Hi Folks. > > Is it normal that when a TDBGrid is dropped onto a TFrame (or > descendant) the DataSource property cannot be assigned to a TSqlQuery > dropped onto a TDataModule ? In other words, in the properties > inspectior of the TDBGrid, the Datasource property shows nothing. > The TDataModule is in the uses clause of the TFrame Interface. > Otherwise when the TDbGrid is dopp??d onto a TForm, the DataSource shows > all TDataset descendants dropped into the TDataModule. It appears to be > the same for all data aware components that I have tested so far. > Finally, assigning the datasource at runtime appears to work. But this > is a workaround. Maybe a result of Juha's change: http://wiki.freepascal.org/Lazarus_1.2.0_release_notes#TComponentPropertyEditor_behavior_was_changed

Could be but I'm currently using 1.0.12 and not 1.2. I'm moving and re-engineering a Delphi application and I wonder how much time I'll loose recoding the Datasources properties :-(

Show quoted text 8 lines
Mattias -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

Antonio Fortuny
to Antonio Fortuny: Hi Folks. Is it normal that when a TDBGrid is dropped onto a TFrame (or descendant) the…

Same for TImageList.
A TImageList is dropped onto a TDataModule, included in the interface uses, but a TToolBar does not see the TImagesList in the TDataModule. This breaks completely the porting from Delphi.
I'm really very disapponted.

I've made another test as explained in the Wiki page http://wiki.freepascal.org/Frames
- build a new TFrame
- add the unit to the project units list (otherwise it is not droppable)
- drop it onto a TTabSheet of a TPageCpntrol in the main form
- drop a TSqlQuery onto the TFrame: this time, the objects in the TDataModule created before, are displayed in properties of the TFrame components (database for TSqlQuery, i.e.).
It's a long way to ...
This way does not allow to create independent TFrames and fill them with all pertinent components and code and that's exactly what I need. All the TFrames are independent and dynamically created as the user runs thru the application.

Antonio.

Reply by email