Re: Migration from Indy 9 to Indy 10

Giganews Newsgroups
Subject: Re: Migration from Indy 9 to Indy 10
Posted by:  Remy Lebeau \(Indy Team\) (re…@lebeausoftware.org)
Date: Fri, 19 Nov 2010

"Louis Valmeras" <valmlou…@hotmail.com> wrote in message
news:5EBE7F8FA6C6E340valmlou…@hotmail.com...

> I cannot use again my code I wrote before to send emails with attachments.

There are major architectural changes between Indy 9 and 10.  Not all Indy 9
code will migrate as-is to Indy 10, you may have to make tweaks here and
there.

> I was using TIdText with TIdMessage->MessageParts.
> TIdtext is unknown. So I am obliged to include <IdText.hpp>

Yes.  TIdText was declared in IdMessage.hpp in Indy 9, but moved to its own
unit in Indy 10.

> after that I get 30 error messages related to InGlobal.hpp

Such as?

> And I also have the message below saying that TIdAttachment is abstract:

Because it really is.  TIdAttachment was changed into an abstract base class
in Indy 10.  You have to use descendant classes now.  Indy 10 natively
implements two such classes, TIdAttachmentFile and TIdAttachmentMemory.
Since TIdAttachment is abstract now, you can implement custom classes if
needed.  When migrating Indy 9 code, use TIdAttachmentFile, which offers the
equivilent functionality as Indy 9's TIdAttachment class.

--
Remy Lebeau (TeamB)

Replies

In response to

Migration from Indy 9 to Indy 10 posted by Louis Valmeras on Sat, 20 Nov 2010