troubleshooting Question

Im missing the connection between the objects, can someone point me in the right direction.

Avatar of Mike Littlewood
Mike LittlewoodFlag for United Kingdom of Great Britain and Northern Ireland asked on
20 Comments2 Solutions353 ViewsLast Modified:
Should be a fairly easy solutioin but I must be missing something obvious.

Ive got a new class created
TCBRecord = class
    Variable1, Variable2, etc
    <Procedures to set variables, functions to read>
    <read/write properties>

TMyForm = class(TForm)
  MyBook : TList

I create a TCBRecord and then add it to MyBook

The thing is that MyBook is not linked to TCBRecord, but to the form it is on.

Im trying to now read the entries from MyBook but I cant access the records.
Obvisouly Im putting the variables in the wrong places but I cant see how to re-arrange things.

The TList must be linked to the form as I want to try and read variables from the records in MyList to display in a stringgrid

Why cant I do
  For iCnt := 0 to (MyBook.Count - 1) do
    Stringgrid.Cells[Col, Row] := MyBook[iCnt].variable1

So MyBook[iCnt].variable1 is incorrect, how can I now access the data
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 2 Answers and 20 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 20 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros