Delphi XE2 TPointerList使用
我在尝试编译 XE2 中的某些组件时遇到以下问题。这些组件不是为 XE2 准备的,但我还是尝试编译它们。
在组件内,它的声明方式就像
FList : TList;
使用时一样,例如
SomeVariable := Integer(FList.List^[i]);
它会产生“需要指针类型”编译错误。
我可以像这样纠正它
SomeVariable := Integer(FList.List[i]);
,但天知道我需要多少时间来修复所有发生的错误。
是否有一些编译器指令或设置可以处理这个问题。我尝试过 {$X} 和 {$T} 没有效果。
在XE2 Delphi中TPointerList(TList.List属性)被声明为动态数组
type TPointerList = array of Pointer;
如果有人可以帮忙?
I have a following problem trying to compile some components in XE2. These components were not prepared for XE2, but I'm trying to compile them anyway.
Within a component it is declared like
FList : TList;
when used it is for example like
SomeVariable := Integer(FList.List^[i]);
It produces "Pointer type required" compile error.
I can be corrected it like this
SomeVariable := Integer(FList.List[i]);
but god knows how much time would I need to fix all occurencies of error.
Is there some compiler directive, or setting that can handle this. I've tried {$X} and {$T} without effect.
In XE2 Delphi TPointerList (TList.List property) is declared as dynamic array
type TPointerList = array of Pointer;
If anyone can help?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
a) Integer(FList[i]) 也可以。
b) 没有这样的设置。
c) 也许你可以搜索并替换 .List^[ -> [?
a) Integer(FList[i]) would also work.
b) There is no such setting.
c) Maybe you can Search&Replace .List^[ -> [ ?