gpt4 book ai didi

delphi - Delphi中存储的关键字

转载 作者:行者123 更新时间:2023-12-03 14:36:14 25 4
gpt4 key购买 nike

Delphi 允许在定义属性时使用存储的关键字,如下所示:

property Fields: TIndexDefs read FFields write SetFields stored FieldsStored;

关键字的目的是什么以及它的作用是什么?

最佳答案

来 self 的 Delphi 7 帮助文件:

The optional stored, default, andnodefault directives are calledstorage specifiers. They have noeffect on program behavior, butcontrol whether or not to save thevalues of published properties in formfiles.

The stored directive must be followedby True, False, the name of a Booleanfield, or the name of a parameterlessmethod that returns a Boolean value.For example,

property Name: TComponentName read FName write SetName stored False;

If a property has no stored directive,it is treated as if stored True werespecified.

它控制是否在表单的 .DFM 文件中存储与组件相关的属性。

关于delphi - Delphi中存储的关键字,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2072096/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com