Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is this? "TList does not contain a member named ..." in Delphi

I've added some of the new Generics into my Delphi 2009 program.

In the Structure window of the Delphi IDE, I'm getting a bunch of errors of the form:

'TList` 1' does not contain a member named 'JumpID' at line 1031 (1031:57) 

My declarations and lines seem fine to me. And my program Builds without any errors and runs without problems.

The relevent declarations are:

uses 
  Generics.Collections;

type
  TLocJump = record
    LocID: string;
    JumpID: string;
  end;

var
  LocJumpList: TList<TLocJump>;
  CurCursorID: string;
  I: integer;

And this is line 1031 that the message is referring to:

  CurCursorID := LocJumpList[I].JumpID;

Could anyone explain what this message is, and what I can do to fix it?

like image 910
lkessler Avatar asked Aug 14 '10 01:08

lkessler


2 Answers

It's a glitch in Error Insight. Really the only thing you can do to fix it is to turn Error Insight off. Or ignore it. It's not fixed in D2010 either. Hopefully it will be in the next version...

like image 194
Mason Wheeler Avatar answered Nov 08 '22 21:11

Mason Wheeler


you can use like this

CurCursorID := LocJumpList.Items[I].JumpID;

like image 3
unicorn64 Avatar answered Nov 08 '22 20:11

unicorn64