Re: Can anyone show me an example of xx.GetArticle()?

Giganews Newsgroups
Subject: Re: Can anyone show me an example of xx.GetArticle()?
Posted by:  cantona (parady…@gmail.com)
Date: Sat, 18 Dec 2004

When I try to there is always EAccessViolation with message 'Access
violation at address xxxxxx ...........
I dont know why is that..Please help ..Thanks

procedure TTGetForm.ListBox1Click(Sender: TObject);
var
  AI, Title: string;
  IdMessage1: TIdMessage;
begin
  Title := ListBox1.Items[ListBox1.ItemIndex];
  AI := Copy(Title, Pos('AI:', Title) + 3, Length(Title));

  IdNNTP1.SelectArticle(StrToInt(AI));
  ShowMessage(AI);  // AI  is Index number for the article.

  if IdNNTP1.GetArticle(StrToInt(AI), IdMessage1) then  //exception error
at this line
  begin
  if IdMessage1.MessageParts.Count >0 then
    begin
      richedit1.Lines.AddStrings(TIdText(IdMessage1.MessageParts.Items[0]).Body);
    end;
  end;
end;

"Remy Lebeau (TeamB)" <no.spam@no.spam.com> ¼¶¼g©ó¶l¥ó·s»D:2E415A0353B8E240no.spam@no.spam.com...
>
> "cantona" <parady…@gmail.com> wrote in message
> news:C3487E9E52B8E240parady…@gmail.com...
>
>> Can anyone show me an example of xx.GetArticle()?
>> I dont know what is TIdMessage and TIdStrings....
>
> TIdMessage is a component that wraps the data for an email message.
>
> TIdStrings is an Indy wrapper for the VCL's TString class.
>
> Refer to Indy's documentation.
>
> Gambit

Replies

In response to

Re: Can anyone show me an example of xx.GetArticle()? posted by Remy Lebeau (TeamB) on Fri, 17 Dec 2004