Hello!

Hello!

Being a bit daft today, I could do with a bit of help!

So, this is my class declaration:

TAttachmentList = class( TInterfacedPersistent,IAttachmentList )
  private
    FGroupID: Integer;
    FSequence: Integer;
    FDescription : String;
    FAttachmentList : TInterfaceList;
    FAttachments : Spring.Collections.IInterfaceList;
  protected
    procedure AddAttachment(AnAttachment: IAttachment);
    procedure DelAttachment(AnAttachment: IAttachment);
    function Get(Index: Integer): IAttachment;
    function GetAttachmentCount: Integer;
    function GetDescription: string;
    procedure SetDescription(Value: string);
    procedure SetGroupID(Value: Integer);
    function GetGroupID: Integer;
    function GetListType: TAttachmentListType;
    function NewAttachment: IAttachment;
    function GetAttachments: Spring.Collections.IEnumerable;
  public
    constructor Create;virtual;
    destructor Destroy;override;
  end;

And this is my uses list:

uses Classes, uInterfaces, IOUtils, Spring.Collections, uApplicationTypes;

When doing a syntax check, the error says:
[DCC Error] uInterfacesImpl.pas(33): E2003 Undeclared identifier: 'IInterfaceList<>'

Needless to say, he's lying. because I have declared it :D

Delphi XE, Windows 8.1 .

Anybody's got a clue?

A

Comments

  1. And where exactly do you see IInterfaceList** in Spring.Collections? :) Use IList. IInterfaceList is to overcome the missing covariance in certain cases.

    ReplyDelete
  2. And where declared you 'IInterfaceList<>'?
    You use TInterfacePersistent as base class, so you need free the objects on your own. TInterfacePersistent does not have ref counting ;-)

    ReplyDelete
  3. Line 1043 in Spring.Collections.

    I downloaded the zip last night and I do see it.

    A

    ReplyDelete
  4. Do you? I see IInterfaceList = interface(IList)

    ReplyDelete

Post a Comment