Board index » delphi » HELP: TList,TCollection and pointers
Stiv
![]() Delphi Developer |
Wed, 28 Sep 2005 06:08:44 GMT
HELP: TList,TCollection and pointers
Hello everybody!
I have a problem with the TList object in Delphi and I would be very thankful if you could help me resolving the problem and the online tutorials where I could read more explanations about the problem. I have done several researches with Google but the tutorials I found didn't document well the TList and TCollection classes. I only found some texts with instructions not applicable to my problem. I have a list of objects (defined by myself). At the moment of exiting Stiv ----------------------------------------------------------- Here is a reduced version of the procedure I use to save the data from procedure managerCampi.salva; // The list "lstOggetti" is global in this program. begin for i:=0 to (lstOggetti.Count - 1) do { objAttuale:=attributi(lstOggetti[i]); Doesn't work!} { p_objAttuale := (lstOggetti.Items[i]); Doesn't work! { objAttuale:=(lstOggetti.Items[i] as attributi); Doesn't work} strRiga:= objAttuale.nome; CloseFile(fileBackup); end; |