Ryan Joseph <r...@thealchemistguild.com> schrieb am Do., 6. Sep. 2018, 16:33:
> > > > On Sep 6, 2018, at 9:25 PM, Michael Van Canneyt <mich...@freepascal.org> > wrote: > > > > No, the whole point of default is that they should be for any kind of > field. > > For example if you want a nullable boolean, you'll do something like > > > > Type > > TNullable<T>= Record > > Private > > F : T; > > isAssigned : Boolean; > > Function GetValue : T; > > Procedure SetValue(aValue : T); > > Property Value : T Read GetValue Write SetValue; default; > > Property IsNull : Boolean Read GetISNull Write SetIsNull; > > end; > > Thanks for the example. I didn’t even know it was intended for the default > property to have functions as the read/write values. I thought read/write > was always going to map directly to a field. > No, it was always (as far as the idea exists at least) the idea that all abilities of a property should be available for non-indexed default properties as well. Regards, Sven >
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal