Fórum Erro E2003 no Delphi 10.4 #618787
05/10/2022
0
Alguem pode me ajudar estou com um problema no delphi esta retornando o erro [dcc32 Error] UPrincipal.pas(37): E2003 Undeclared identifier: ''Ascendente''
Segue o código
unit UPrincipal;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, UPadrao, Data.DB, Vcl.Menus,
System.ImageList, Vcl.ImgList, Vcl.ComCtrls, Vcl.ExtCtrls, Vcl.DBCtrls,
Vcl.Grids, Vcl.DBGrids, Vcl.StdCtrls, Vcl.Buttons, Vcl.ToolWin;
type
TFrmPrincipal = class(TFrmPadrao)
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure SpeedButton3Click(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure DBGrid1TitleClick(Column: TColumn);
private
{ Private declarations }
public
{ Public declarations }
end;
var
FrmPrincipal: TFrmPrincipal;
implementation
{$R *.dfm}
uses UDm;
procedure TFrmPrincipal.DBGrid1TitleClick(Column: TColumn);
begin
inherited;
Ascendente:= not Ascendente ; // erro aqui nesta linha
If Ascendente then
Dm.tabEntSaid.IndexFieldNames := Column.Fieldname + '' ASC''
else
Dm.tabEntSaid.IndexFieldNames := Column.FieldName + '' DESC'';
End;
procedure TFrmPrincipal.FormClose(Sender: TObject; var Action: TCloseAction);
begin
Dm.TabEntSaid.close;
end;
procedure TFrmPrincipal.FormShow(Sender: TObject);
begin
inherited;
Dm.TabEntSaid.open;
end;
procedure TFrmPrincipal.SpeedButton3Click(Sender: TObject);
begin
inherited;
Close;
end;
end.
Segue o código
unit UPrincipal;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, UPadrao, Data.DB, Vcl.Menus,
System.ImageList, Vcl.ImgList, Vcl.ComCtrls, Vcl.ExtCtrls, Vcl.DBCtrls,
Vcl.Grids, Vcl.DBGrids, Vcl.StdCtrls, Vcl.Buttons, Vcl.ToolWin;
type
TFrmPrincipal = class(TFrmPadrao)
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure SpeedButton3Click(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure DBGrid1TitleClick(Column: TColumn);
private
{ Private declarations }
public
{ Public declarations }
end;
var
FrmPrincipal: TFrmPrincipal;
implementation
{$R *.dfm}
uses UDm;
procedure TFrmPrincipal.DBGrid1TitleClick(Column: TColumn);
begin
inherited;
Ascendente:= not Ascendente ; // erro aqui nesta linha
If Ascendente then
Dm.tabEntSaid.IndexFieldNames := Column.Fieldname + '' ASC''
else
Dm.tabEntSaid.IndexFieldNames := Column.FieldName + '' DESC'';
End;
procedure TFrmPrincipal.FormClose(Sender: TObject; var Action: TCloseAction);
begin
Dm.TabEntSaid.close;
end;
procedure TFrmPrincipal.FormShow(Sender: TObject);
begin
inherited;
Dm.TabEntSaid.open;
end;
procedure TFrmPrincipal.SpeedButton3Click(Sender: TObject);
begin
inherited;
Close;
end;
end.
Luiz Czapievski
Curtir tópico
+ 0
Responder
Posts
06/10/2022
Raimundo Pereira
Ascendente seria uma variável do tipo boolean ? Se sim, declare a mesma no Form.
var
FrmPrincipal: TFrmPrincipal;
Ascendente : Boolean;
var
FrmPrincipal: TFrmPrincipal;
Ascendente : Boolean;
Responder
Gostei + 0
06/10/2022
Luiz Czapievski
Ascendente seria uma variável do tipo boolean ? Se sim, declare a mesma no Form.
var
FrmPrincipal: TFrmPrincipal;
Ascendente : Boolean;
Valeu Raimundo, deu serto, um grande abraço.
var
FrmPrincipal: TFrmPrincipal;
Ascendente : Boolean;
Valeu Raimundo, deu serto, um grande abraço.
Responder
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)
Inserção de url
Descrição
Url
Utilizamos cookies para fornecer uma melhor experiência para nossos usuários, consulte nossa política de privacidade.
Aceitar