作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我想从对象实例动态获取属性值。我能够获取类属性、序数类型和字符串。 GetPropValue 的 delphi 源代码不支持 tkInterface。有没有办法使用属性信息获取接口(interface)。顺便说一句,所有公开的属性都是已发布的属性。
暂时,我使用 TObject 作为返回类型。 GetPropValue 返回对象实例的地址。我将其类型转换为 TObject 并返回结果。
最佳答案
如果我理解正确,你想使用 GetInterfaceProp()功能。用法与 GetPropValue()
相同,但它返回一个 IInterface
,您可以使用 ie Supports() 将其“转换”为正确的类型。 .
关于delphi - 从 GetPropValue 获取接口(interface),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7379042/
我正在使用 Delphi 的 GetPropValue() 函数来获取 TControl 类型的某些对象的某些属性的值。当我获得简单的属性值(例如 Value、Opacity 等)时,一切正常,但当我
我想从对象实例动态获取属性值。我能够获取类属性、序数类型和字符串。 GetPropValue 的 delphi 源代码不支持 tkInterface。有没有办法使用属性信息获取接口(interface
我是一名优秀的程序员,十分优秀!