1
In my application made in Delphi 7, is created some Runtime objects in the standard form, as buttons manipulate record, procedures and common functions. There is one standard form of queries, another for editing records and another for reporting. The standard record editing form has the "Save" format, it has the following:
//Evento Salvar de FrmPadraoEdit
procedure TFrmPadraoEdit.Salvar(Sender: TObject);
begin
ToolBar.Setfocus;
//Demais instruções
//deve continuar para a procedure Salvar do form herdado
end;
As the "btnSalvar" button is also in the standard form, the "Save" event is already assigned to it.
It turns out that for each inherited form, the "Save" event has different instructions. In the standard form, after calling the "Save" event itself, can you continue the instructions for the "Save" event from the inherited form? Ex:
//Evento Salvar de FrmDisciplinasEdit
procedure TFrmDisciplinasEdit.Salvar(Sender: TObject);
begin
//Aqui deveria continuar a execução
DM.cdsDisciplinasATIVO.Value := 1;
DM.cdsDisciplinasCREATED_BY.Value := V_LOGIN;
//Demais instruções...
DM.cdsDisciplinas.Post;
Close;
end;
So he doesn’t perform the instruction:
DM.cdsDisciplinasATIVO.Value := 1;
?– Junior Moreira
No, because it’s only being called the Save of the Frmpadraoedit.
– Carlos Andrade
is missing the override in the header of the Tfrmdisciplinasedit.Save(Sender: Tobject); ?
– Tiago Rodrigues
opa, I’ll try and already put the result
– Carlos Andrade