CnPack Forum


 
Subject: 反馈BUG:cnpack 格式化错误 缺失有效符号 当前标识符 constructor
guanlianan
新警察
Rank: 1



UID 388007
Digest Posts 0
Credits 13
Posts 5
点点分 13
Reading Access 10
Registered 2017-3-13
Status Offline
Post at 2017-3-13 14:13  Profile | Blog | P.M. 
反馈BUG:cnpack 格式化错误 缺失有效符号 当前标识符 constructor

反馈BUG:
cnpack 格式化错误 缺失有效符号 当前标识符 constructor


Image Attachment: 1.jpg (2017-3-13 14:13, 129.51 K)

Top
Passion (LiuXiao)
管理员
Rank: 9Rank: 9Rank: 9


UID 359
Digest Posts 19
Credits 6838
Posts 3591
点点分 6838
Reading Access 102
Registered 2004-3-28
Status Offline
Post at 2017-3-13 16:41  Profile | Blog | P.M. 
感谢报告,请问能否将出错的源文件发我们?master@cnpack.org

(出错框刚好挡住了关键的源码)
Top
guanlianan
新警察
Rank: 1



UID 388007
Digest Posts 0
Credits 13
Posts 5
点点分 13
Reading Access 10
Registered 2017-3-13
Status Offline
Post at 2017-3-13 19:25  Profile | Blog | P.M. 
回复 #2 Passion 的帖子

您好,已经把源文件发给您了
Top
Passion (LiuXiao)
管理员
Rank: 9Rank: 9Rank: 9


UID 359
Digest Posts 19
Credits 6838
Posts 3591
点点分 6838
Reading Access 102
Registered 2004-3-28
Status Offline
Post at 2017-3-13 23:00  Profile | Blog | P.M. 
收到。经分析,是TTypeName = object 这种老式的声明里原先不支持published以及constructor/destructor,现已修正让其支持了,下一每日构建版本将集成。
Top
guanlianan
新警察
Rank: 1



UID 388007
Digest Posts 0
Credits 13
Posts 5
点点分 13
Reading Access 10
Registered 2017-3-13
Status Offline
Post at 2017-3-14 08:12  Profile | Blog | P.M. 
回复 #4 Passion 的帖子

原来TTypeName = object 是老式的声明吗?

但是我声明为 TTypeName = class的时候,在构造里初始化FParamDict: TDictionary<string, string>;就会报错,

只有声明为TTypeName = object的时候才正常初始化。请问,我应该怎么做才能实现我的要求?

感谢回答!
Top
Passion (LiuXiao)
管理员
Rank: 9Rank: 9Rank: 9


UID 359
Digest Posts 19
Credits 6838
Posts 3591
点点分 6838
Reading Access 102
Registered 2004-3-28
Status Offline
Post at 2017-3-14 13:34  Profile | Blog | P.M. 
新的每日构建版887已支持,可下载试用:http://www.cnpack.org/downbuilds.php

请问构造函数里是如何初始化FParamDict: TDictionary<string, string>;的?感觉这样简单的语句照理不应该出错才对。
Top
guanlianan
新警察
Rank: 1



UID 388007
Digest Posts 0
Credits 13
Posts 5
点点分 13
Reading Access 10
Registered 2017-3-13
Status Offline
Post at 2017-3-15 08:05  Profile | Blog | P.M. 
回复 #6 Passion 的帖子

在发给您的源文件(uWxHelper.pas)里可以看到以下的构造函数初始化代码:

constructor TWxHelper.Create;
begin
  FParamDict := TDictionary<string, string>.Create;
end;
Top
guanlianan
新警察
Rank: 1



UID 388007
Digest Posts 0
Credits 13
Posts 5
点点分 13
Reading Access 10
Registered 2017-3-13
Status Offline
Post at 2017-3-18 08:04  Profile | Blog | P.M. 
回复 #6 Passion 的帖子

在发给您的源文件(uWxHelper.pas)里可以看到以下的构造函数初始化代码:
代码很简单,就一句:

constructor TWxHelper.Create;
begin
  FParamDict := TDictionary<string, string>.Create;
end;
Top
 




All times are GMT++8, the time now is 2024-11-22 12:57

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

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