<div dir="auto"><div class="gmail_quote" dir="auto"><div dir="ltr">Ryan Joseph <<a href="mailto:ryan@thealchemistguild.com">ryan@thealchemistguild.com</a>> schrieb am Do., 6. Sep. 2018, 16:33:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
> On Sep 6, 2018, at 9:25 PM, Michael Van Canneyt <<a href="mailto:michael@freepascal.org" target="_blank" rel="noreferrer">michael@freepascal.org</a>> wrote:<br>
> <br>
> No, the whole point of default is that they should be for any kind of field.<br>
> For example if you want a nullable boolean, you'll do something like<br>
> <br>
> Type<br>
>    TNullable<T>= Record<br>
>    Private<br>
>      F : T;<br>
>      isAssigned : Boolean;<br>
>      Function GetValue : T;<br>
>      Procedure SetValue(aValue : T);<br>
>      Property Value : T Read GetValue Write SetValue; default;<br>
>      Property IsNull : Boolean Read GetISNull Write SetIsNull;<br>
>    end;<br>
<br>
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.<br></blockquote></div><div dir="auto"><br></div><div dir="auto">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. </div><div dir="auto"><br></div><div dir="auto">Regards, </div><div dir="auto">Sven </div><div class="gmail_quote" dir="auto"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"></blockquote></div></div>