CnPack Forum


 
Subject: 又是TntFrame惹的祸,改名出错
gaoyanan (高亚男)
普通灌水员
Rank: 2



UID 39457
Digest Posts 0
Credits 62
Posts 22
点点分 62
Reading Access 10
Registered 2008-4-1
Status Offline
Post at 2010-9-26 16:49  Profile | Blog | P.M.  | QQ
又是TntFrame惹的祸,改名出错

错误模块:组件名属性编辑器

CnWizards版本:0.9.6.569

错误现象:对于TntFrame,以及重载对象,修改组件名称时,出现“Invalid class typecast.”错误。

组件来源:TMS Unicode Component Pack v1.7.0.3


很郁闷,上次是无法在窗体上引用TntFrame,这次是改名错,难道大家不用TntFrame?或者认为别人一定要从TFrame继承?

请修正  TFrame   ---》  TCustomFrame
Top
Passion (LiuXiao)
管理员
Rank: 9Rank: 9Rank: 9


UID 359
Digest Posts 19
Credits 6766
Posts 3559
点点分 6766
Reading Access 102
Registered 2004-3-28
Status Offline
Post at 2010-9-26 18:48  Profile | Blog | P.M. 
请问复现的具体步骤?我们好查一下。
Top
gaoyanan (高亚男)
普通灌水员
Rank: 2



UID 39457
Digest Posts 0
Credits 62
Posts 22
点点分 62
Reading Access 10
Registered 2008-4-1
Status Offline
Post at 2010-9-26 20:42  Profile | Blog | P.M.  | QQ
1.安装TMS Unicode Component Pack或者TNTWare组件包。
2.File --》New ---》 Other...,选择“TntFrame(Unicode)”
3.在object Inspector栏中双击“Name”属性,或者点击该属性右侧的“...”。

此时,该问题出现。当然,可以直接修改该属性。怀疑“组件名属性编辑器”代码中直接判断TFrame  对象,而不是TCustomFrame。

因为TntFrame是从TCustomFrame继承的,而我们一般情况下是从TFrame  继承。

PS:TNTWare是一个免费的unicode组件包,后来卖给了TMS ,两者核心基本一致。
Top
gaoyanan (高亚男)
普通灌水员
Rank: 2



UID 39457
Digest Posts 0
Credits 62
Posts 22
点点分 62
Reading Access 10
Registered 2008-4-1
Status Offline
Post at 2010-9-26 20:45  Profile | Blog | P.M.  | QQ
这个问题是在一次修改二次继承的框架NAME属性时发现的,一开始还以为自己的问题,因为我手工修改了frm文件中一些对象的类。后来发现更换计算机并重新建立新项目,该问题依旧。

抱歉,没下载debug版本,这次没去拜读源代码。
Top
Passion (LiuXiao)
管理员
Rank: 9Rank: 9Rank: 9


UID 359
Digest Posts 19
Credits 6766
Posts 3559
点点分 6766
Reading Access 102
Registered 2004-3-28
Status Offline
Post at 2010-9-27 20:13  Profile | Blog | P.M. 
非常感谢报告。经过查证,确实是我们对TCusomFrame判断的一处失误。现已改正。下一版本将集成此修改。
Top
Passion (LiuXiao)
管理员
Rank: 9Rank: 9Rank: 9


UID 359
Digest Posts 19
Credits 6766
Posts 3559
点点分 6766
Reading Access 102
Registered 2004-3-28
Status Offline
Post at 2010-9-27 23:03  Profile | Blog | P.M. 
烦请下载最新的每日构建版0.9.7.590.
http://www.cnpack.org/downbuilds.php
Top
 




All times are GMT++8, the time now is 2024-5-15 23:36

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

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