I'm having trouble calling the following procedure on my form
:
procedure TDM_Maquinas.IBDSMaquinasCOD_LINHASetText(Sender: TField; const Text: string);
begin
if Text <> '' then
begin
if Text = 'Linha 1' then
sender.AsInteger := 1
else if Text = 'Linha 2' then
Sender.AsInteger := 2
end;
end;
On the save button:
procedure TForm.salvar(Sender: TObject);
var
ValorLinha : Integer;
begin
ValorLinha := DM_Maquinas.IBDSMaquinasCOD_LINHASetText(DBComboBox2.Field, 'Linha 1'); //erro
end;
I'm having the wrong line up:
E2010 Incompatible types: 'Integer' and 'procedure, untyped pointer or untyped parameter '
If we change the type of the ValueLine variable to String
the error persists.