CnPack Forum


 
Subject: 助手代码有个bug
niaoge
灌水司司长
Rank: 6Rank: 6



UID 9910
Digest Posts 0
Credits 438
Posts 143
点点分 438
Reading Access 10
Registered 2007-4-8
Status Offline
Post at 2009-3-12 15:12  Profile | Blog | P.M. 
助手代码有个bug

function TCnInputHelper.UpdateCurrList(ForcePopup: Boolean): Boolean;
var
  i, Idx: Integer;
  Symbol: string;
begin
  List.Items.BeginUpdate;
  try
    Symbol := UpperCase(FMatchStr);
    //这个判断是在原有list进行筛选,而不用再重新生成列表,用于加快速度
    //但这个条析永远都不会成立
   //因为只要 Length(FLastStr) - Length(Symbol) = 1 成立, Pos(UpperCase(FLastStr), Symbol) = 1) 就不成立
    if (Length(Symbol) > 1) and (Length(FLastStr) - Length(Symbol) = 1) and
      (Pos(UpperCase(FLastStr), Symbol) = 1) then

   //应改为
    if (Length(Symbol) > 1) and (Length(FLastStr) - Length(Symbol) = -1) and
      (Pos(UpperCase(FLastStr), Symbol) = 1) then
Top
niaoge
灌水司司长
Rank: 6Rank: 6



UID 9910
Digest Posts 0
Credits 438
Posts 143
点点分 438
Reading Access 10
Registered 2007-4-8
Status Offline
Post at 2009-3-13 16:32  Profile | Blog | P.M. 
我改过了,助手没有问题,貌似速度快了点
Top
zjy
管理员
Rank: 9Rank: 9Rank: 9



UID 2
Digest Posts 6
Credits 2385
Posts 1543
点点分 2385
Reading Access 102
Registered 2002-12-16
Location China
Status Offline
Post at 2009-3-15 22:30  Profile | Site | Blog | P.M. 
这几天服务器CVS挂了

所以还没提交上去。多谢 niaoge 细心指出!




Zhou JingYu
CnPack Administrator
http://www.cnpack.org/
Top
niaoge
灌水司司长
Rank: 6Rank: 6



UID 9910
Digest Posts 0
Credits 438
Posts 143
点点分 438
Reading Access 10
Registered 2007-4-8
Status Offline
Post at 2009-3-16 02:50  Profile | Blog | P.M. 


QUOTE:
原帖由 zjy 于 2009-3-15 22:30 发表
所以还没提交上去。多谢 niaoge 细心指出!

Top
zjy
管理员
Rank: 9Rank: 9Rank: 9



UID 2
Digest Posts 6
Credits 2385
Posts 1543
点点分 2385
Reading Access 102
Registered 2002-12-16
Location China
Status Offline
Post at 2009-3-16 22:49  Profile | Site | Blog | P.M. 
已经提交了





Zhou JingYu
CnPack Administrator
http://www.cnpack.org/
Top
please_air
灌水科科长
Rank: 3Rank: 3



UID 23669
Digest Posts 0
Credits 108
Posts 41
点点分 108
Reading Access 10
Registered 2007-8-21
Status Offline
Post at 2009-3-20 13:19  Profile | Blog | P.M. 
麻烦编译一个出来
Top
 




All times are GMT++8, the time now is 2024-11-23 05:46

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

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