Board index » delphi » QUESTION: List of classes in TList
Peter Kohout
![]() Delphi Developer |
Mon, 16 Mar 1998 03:00:00 GMT
QUESTION: List of classes in TList
I am a raw beginner to Pascal and am struggling with OOP.
Recently I was writing a programme to simulate a few circles moving in a window and bouncing off the "window walls" ( I know, not very inspiring stuff but its a start).I defined a class to hold the co-ordinates,speed and direction of my balls and then stored these in a TList.Here is where my problems began.. What is actually held in the TList object? Does it contain the instances of the classes or just the pointers to them. If it only holds pointers, then do I need to typecast to refer to the object? Question 2: what is the best way to simulate movement.with Delphi? Please don't laugh at me Thanking you in advance Peter. |