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:  Remy Lebeau (TeamB) (no.spam@no.spam.com)
Date: Sat, 18 Dec 2004

"cantona" <parady…@gmail.com> wrote in message
news:E91ADD4A62B8E240parady…@gmail.com...

> When I try to there is always EAccessViolation with
> message 'Access violation at address xxxxxx ...........

Then you are not using it properly.

> var
>  AI, Title: string;
>  IdMessage1: TIdMessage;

You have declared an uninitialized object...

>  if IdNNTP1.GetArticle(StrToInt(AI), IdMessage1) then  //exception error
> at this line

... and then you are using it before you have instantiated it.

>
richedit1.Lines.AddStrings(TIdText(IdMessage1.MessageParts.Items[0]).Body);

You should be testing the Item's actual type before assuming that it is a
TIdText.

Gambit

Replies

In response to

Re: Can anyone show me an example of xx.GetArticle()? posted by cantona on Sat, 18 Dec 2004