CnPack Forum


 
Subject: TCnHashTable 怎么遍历
传奇迹说
新警察
Rank: 1



UID 40857
Digest Posts 0
Credits 46
Posts 15
点点分 46
Reading Access 10
Registered 2008-9-1
Status Offline
Post at 2010-4-26 11:52  Profile | Blog | P.M. 
TCnHashTable 怎么遍历

for I := 0 to TList.Count -1 do
  begin
    Obj:=TObject(TList[I]);
    Obj.Free;
  end;

TCnHashTable ???

有个函数
GetKeys
难道要 GetValues(GetKeys(I)) ???
感觉饶圈了啊
有Index 还要 Key....
Top
传奇迹说
新警察
Rank: 1



UID 40857
Digest Posts 0
Credits 46
Posts 15
点点分 46
Reading Access 10
Registered 2008-9-1
Status Offline
Post at 2010-4-27 14:32  Profile | Blog | P.M. 
UP
Top
Passion (LiuXiao)
管理员
Rank: 9Rank: 9Rank: 9


UID 359
Digest Posts 19
Credits 6750
Posts 3551
点点分 6750
Reading Access 102
Registered 2004-3-28
Status Offline
Post at 2010-4-27 20:29  Profile | Blog | P.M. 
TCnHashTable目前确实未提供直接遍历的方式,暂时只能用GetValues(GetKeys(I))。
TCnHashMap提供了StartEnum以及GetNext的遍历方式,目前可以使用。
Top
传奇迹说
新警察
Rank: 1



UID 40857
Digest Posts 0
Credits 46
Posts 15
点点分 46
Reading Access 10
Registered 2008-9-1
Status Offline
Post at 2010-4-28 21:32  Profile | Blog | P.M. 
谢谢 大大的回复
自己加还有点麻烦.
代码还没看完.
尝试中...
Top
 




All times are GMT++8, the time now is 2024-3-29 18:28

    本论坛支付平台由支付宝提供
携手打造安全诚信的交易社区 Powered by Discuz! 5.0.0  © 2001-2006 Comsenz Inc.
Processed in 0.007041 second(s), 7 queries , Gzip enabled

Clear Cookies - Contact Us - CnPack Website - Archiver - WAP