Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 Jan : How to use TIdText in Indy 10
| Subject: | How to use TIdText in Indy 10 |
| Posted by: | "John Mitson" (jrm..@hawaii.rr.com) |
| Date: | Sat, 27 Jan 2007 09:18:33 |
When attempting to use TIdText from Indy 10 I get an undeclared
identifier error. I understand this code worked in earlier versions of
Indy. Appreciate any your guidance.
John
TIdText(IdMessage1.MessageParts.Items[0]).Body.Text
> uses
> Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
> Dialogs, StdCtrls, IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient,
> IdExplicitTLSClientServerBase, IdMessageClient, IdNNTP, IdMessage;
>
> type
> TForm1 = class(TForm)
> ngListBtn: TButton;
> IdNNTP1: TIdNNTP;
> ngListMemo: TMemo;
> ngSelectGroupBtn: TButton;
> ngGroupMemo: TMemo;
> IdMessage1: TIdMessage;
> Button1: TButton;
> Memo1: TMemo;
> procedure ngListBtnClick(Sender: TObject);
> procedure ngSelectGroupBtnClick(Sender: TObject);
> procedure Button1Click(Sender: TObject);
> private
> { Private declarations }
> public
> { Public declarations }
> end;
>
> var
> Form1: TForm1;
>
> implementation
>
> {$R *.dfm}
>
>
> procedure TForm1.Button1Click(Sender: TObject);
> begin
> IdNNTP1.GetArticle(26352,IdMessage1);
> Memo1.Lines.Text := TIdText(IdMessage1.MessageParts.Items[0]).Body.Text;
> end;