Well, there is no problem with this file. It parses correctly.
I think the error come from the file just after, see in the debug window, send it to me please.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have read the manual and others documents explaining how to use the DelphiCodetoDoc. However I have tried use without success.
Error: Could not convert the unit: unexpected token in factor
Unit Code:
unit fCFESelecionarAtribuicao;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
FGERALBASEUES, Grids, DBGrids, gridsUES, uBotoesCadEstruturado, StdCtrls,
StdCtrlsUES;
type
TfrmCFESelecionarAtribuicao = class(TfrmGeralBaseUES)
dgdAssunto: TDBGridUES;
btnCancelar: TButtonUES;
btnOk: TButtonUES;
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormShow(Sender: TObject);
procedure btnOkClick(Sender: TObject);
procedure btnCancelarClick(Sender: TObject);
private
procedure CarregarGrid;
{ Private declarations }
public
{ Public declarations }
end;
var
frmCFESelecionarAtribuicao: TfrmCFESelecionarAtribuicao;
implementation
uses
uTiposADOUES, uFormsBase, uTrataErros;
{$R *.DFM}
//OK
procedure TfrmCFESelecionarAtribuicao.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
inherited;
Action:= cafree;
end;
procedure TfrmCFESelecionarAtribuicao.FormShow(Sender: TObject);
begin
inherited;
CarregarGrid;
end;
procedure TfrmCFESelecionarAtribuicao.CarregarGrid;
var
oAtribuicao : OleVariant;
rsAtribuicao : ADORecordset;
begin
oAtribuicao := CreateInstance('neCFE.EstrutOrgan');
try
screen.Cursor := crHourGlass;
dgdAssunto.ADORecordset := nil;
rsAtribuicao := ToADORecordset(oAtribuicao.ConsultarAtribuicao(
VarToStr(StrToInt(Parametro['estrutura'])),
Integernull));
dgdAssunto.ADORecordset := rsAtribuicao;
finally
screen.Cursor := crDefault;
oAtribuicao := unassigned;
end; //finally
end;
procedure TfrmCFESelecionarAtribuicao.btnOkClick(Sender: TObject);
begin
inherited;
self.Parametro['estrutura'] := dgdAssunto.valorCampo['CFE_unidade_estrutura_codigo'];
self.Parametro['assunto'] := dgdAssunto.valorCampo['assunto'];
self.Parametro['sequencial'] := dgdAssunto.valorCampo['sequencial'];
self.Parametro['DataHoraAltr'] := dgdAssunto.valorCampo['data_hora_altr'];
close;
end;
procedure TfrmCFESelecionarAtribuicao.btnCancelarClick(Sender: TObject);
begin
inherited;
close;
end;
initialization
RegistrarClasse(TfrmCFESelecionarAtribuicao);
end.
Well, there is no problem with this file. It parses correctly.
I think the error come from the file just after, see in the debug window, send it to me please.