Recent

Author Topic: inherited links doesn't work  (Read 1313 times)

mangakissa

  • Hero Member
  • *****
  • Posts: 1086
inherited links doesn't work
« on: November 19, 2015, 04:25:37 pm »
Al my forms are related to a base form.
I have a datamodule with one TSQLQuery on it. Creating a new datamodule with this base gives me an copy of TSQLQyery. Now I put anothr TSQLQuery on datamodule. By events I link the methods of the TSQLQuery in the base datamodule. But when compiling the application, the links of the methods are removed in my just created TSQLquery.

This is only when the option 'Auto remove empty methods' is set.

On Delphi empty methods is standard, but doesn't remove the link.

I also tested with option 'Auto remove empty methods' is set off. I removed the empty events manually. save the application. Now it give me an option if I still want to keep the links. If I say yes, the links of the metods are still available.

Lazarus 2.06 (64b) / FPC 3.0.4 / Windows 10
stucked on Delphi 10.3.1

exdatis

  • Hero Member
  • *****
  • Posts: 668
    • exdatis
Re: inherited links doesn't work
« Reply #1 on: November 22, 2015, 12:36:00 pm »
I use this(baseForm):
    {dataSet actions}
    procedure doFirstRec(var dataSet : TZAbstractDataset);
    procedure doPriorRec(var dataSet : TZAbstractDataset);
    procedure doNextRec(var dataSet : TZAbstractDataset);
    procedure doLastRec(var dataSet : TZAbstractDataset);
    procedure doInsertRec(var dataSet : TZAbstractDataset);
    procedure doDeleteRec(var dataSet : TZAbstractDataset);
    procedure doEditRec(var dataSet : TZAbstractDataset);
    procedure doSaveRec(var dataSet : TZAbstractDataset);
    procedure doCancelRec(var dataSet : TZAbstractDataset);
    {actions after open(dataSet)}
    procedure doAfterOpenDataSet(var dataSet : TZAbstractDataset);
    {sort grid}
    procedure doSortDbGrid(var dataSet : TZAbstractDataset; Column : TColumn);
    {enable-disable btns}
    procedure disableScrollBtns;
    procedure enableScrollBtns;
    {abstract procedure onDbEvent}
    procedure onActFirst; virtual; abstract;
    procedure onActPrior; virtual; abstract;
    procedure onActNext; virtual; abstract;
    procedure onActLast; virtual; abstract;
    procedure onActInsert; virtual; abstract;
    procedure onActDelete; virtual; abstract;
    procedure onActEdit; virtual; abstract;
    procedure onActSave; virtual; abstract;
    procedure onActCancel; virtual; abstract;
// onActFirst e.g (virtual, abstract) I can set DataSet
  e.g onActFirst ---> doFirstRec(myDataSet)
                         or doFirstRec(dataSetFive ... etc.)

works perferkt.

 

TinyPortal © 2005-2018