[fpc-devel] Streaming readonly properties
Martin Schreiber
fpmse at bluewin.ch
Thu Dec 14 13:58:32 CET 2006
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.
Martin
More information about the fpc-devel
mailing list