The method in a write specifier must be a procedure that takes the number and type of parameters listed in the property's index parameter list, in the same order, plus an additional value or const parameter of the same type as the property.įor example, the access methods for the array properties above might be declared as: The method in a read specifier must be a function that takes the number and type of parameters listed in the property's index parameter list, in the same order, and whose result type is identical to the property's type. Unlike arrays, which can use only ordinal-type indexes, array properties allow indexes of any type.įor array properties, access specifiers must list methods rather than fields. The format of an index parameter list is the same as that of a procedure's or function's parameter list, except that the parameter declarations are enclosed in brackets instead of parentheses. Property Objects : TObject read GetObject write SetObject property Pixels : TColor read GetPixel write SetPixel property Values : string read GetValue write SetValue
0 Comments
Leave a Reply. |