[fpc-devel] Streaming readonly properties
Vincent Snijders
vsnijders at quicknet.nl
Thu Dec 14 15:14:39 CET 2006
Martin Schreiber schreef:
> On Thursday 14 December 2006 08.54, Vincent Snijders wrote:
>>> procedure ttestcomp.setsubcomponent(const avalue: ttestsubcomponent);
>>> begin
>>> fsubcomponent.assign(avalue);
>>> end;
>> The problem with this solution, is the "write setsubcomponent;" part of the
>> declaration.
>>
>> I don't want the users of the LabeledEdit component can change the Label
>> subcomponent.
>>
>
> " fsubcomponent.assign(avalue);"
> does not change the instance of the subcomponent, it copies some properties
> from avalue to fsubcomponent if fsubcomponent.assign or avalue.assignto are
> implemented, otherwise it throws an exception.
>
I understand now. Thanks for explaining this.
Vincent
More information about the fpc-devel
mailing list