tag:blogger.com,1999:blog-8730195.post4688201347656605302..comments2024-03-12T05:45:37.655-07:00Comments on Coding Power Unleashed: A simple Generic List: TListRoland Beenhakkerhttp://www.blogger.com/profile/05387682563668003098noreply@blogger.comBlogger11125tag:blogger.com,1999:blog-8730195.post-36130395647571033882022-02-22T06:53:46.511-08:002022-02-22T06:53:46.511-08:00Excellent - simple code that actually works!
One t...Excellent - simple code that actually works!<br />One typo - Uses clause should contain Generics.Defaults not generics.default<br />Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8730195.post-20361705061331874412011-05-23T08:24:17.596-07:002011-05-23T08:24:17.596-07:00In update 25-09-2008, where you say:
PersonsList:...In update 25-09-2008, where you say:<br /><br />PersonsList:= TList.Create;<br /><br />...you probably meant:<br /><br />PersonsList:= TList<TPerson>.create<br /><br />But your blog software removed what it thought was an unrecognized html tag.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8730195.post-16017781079152638972008-09-25T19:34:00.000-07:002008-09-25T19:34:00.000-07:00Great article!But D2009 IDE shows the code hint:Pe...Great article!<BR/>But D2009 IDE shows the code hint:<BR/>PersonsList.Add[]; // square bracket, not parenthesis.<BR/>This is a low-level bug.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8730195.post-80217174144419195902008-09-25T12:44:00.000-07:002008-09-25T12:44:00.000-07:00Great article, that's the first useful use of anon...Great article, that's the first useful use of anonymous methods in Delphi I've seen.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8730195.post-46810708591501521232008-09-25T08:23:00.000-07:002008-09-25T08:23:00.000-07:00no, there is no generic counterpart for TThreadLis...no, there is no generic counterpart for TThreadList.Olaf Monienhttps://www.blogger.com/profile/02628979334210981429noreply@blogger.comtag:blogger.com,1999:blog-8730195.post-90314697989024647372008-09-25T08:19:00.000-07:002008-09-25T08:19:00.000-07:00And what about Thread safety and ThreadLists, Inte...And what about Thread safety and ThreadLists, InterfaceLists etc?<BR/><BR/>Just thought that TList{T} should work ok with interfaces!?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8730195.post-90562164127858425712008-09-25T07:48:00.000-07:002008-09-25T07:48:00.000-07:00@anonymous,Yes.TList{T}, TQueue{T}, TStack{T} and ...@anonymous,<BR/><BR/>Yes.<BR/><BR/>TList{T}, TQueue{T}, TStack{T} and TDictionary{TKey, TValue} all have object counterparts to manage lifetimes. e.g. TObjectList{T}Bruce McGeehttps://www.blogger.com/profile/09952420043727301654noreply@blogger.comtag:blogger.com,1999:blog-8730195.post-17250982503977539172008-09-25T06:48:00.000-07:002008-09-25T06:48:00.000-07:00So is there TObjectList{T} or something similar to...So is there TObjectList{T} or something similar to handle object lifetime?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8730195.post-41644736487168166462008-09-25T02:00:00.000-07:002008-09-25T02:00:00.000-07:00@animalOf course you are right that you will have ...@animal<BR/>Of course you are right that you will have to create the TList and free it.<BR/>Added it to the post.Roland Beenhakkerhttps://www.blogger.com/profile/05387682563668003098noreply@blogger.comtag:blogger.com,1999:blog-8730195.post-80120483712343887252008-09-25T01:41:00.000-07:002008-09-25T01:41:00.000-07:00There are two things that should be mentioned in t...There are two things that should be mentioned in that context:<BR/><BR/>- the non-generic versions of all these container classes still exist (in Contnrs.pas), in other words the non-generic and generic classes are "parallel" implementations.<BR/><BR/>- the generic version of TList is of course no longer pointer based, but the fully object aware predecessor of TObjectList.Olaf Monienhttps://www.blogger.com/profile/02628979334210981429noreply@blogger.comtag:blogger.com,1999:blog-8730195.post-8544167135620374352008-09-25T01:37:00.000-07:002008-09-25T01:37:00.000-07:00I guess you left out the construction/deconstructi...I guess you left out the construction/deconstruction for TList<TPerson> for briefness only, didn't you?Oliverhttps://www.blogger.com/profile/13989141827105859369noreply@blogger.com