<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body smarttemplateinserted="true">
<div id="smartTemplate4-template">Hi,<br>
<br>
<p>perhaps everything would be clearer, if the default property
was accessed with ^ ? <br>
</p>
<br>
<pre wrap="">
var
wrapper: TWrapper;
begin
wrapper := TWrapper.Create;
wrapper^ := THelperA.Create;
end.
</pre>
<br>
Cheers,<br>
Benito </div>
<br>
<br>
<br>
<div class="moz-cite-prefix">Am 14.09.2018 um 10:50 schrieb Ryan
Joseph:<br>
</div>
<blockquote type="cite"
cite="mid:38DE0F7B-6988-42A6-9F46-E2E0E83851B7@thealchemistguild.com">
<pre wrap="">How should this syntax work? TWrapper needs to allow assignments of TWrapper for constructors but it also should accept assignments of THelperA for the default write property.
Is that a problem or should TWrapper be able to assign both? It looks strange so I thought I would ask.
==========================================
type
THelperA = class
end;
type
TWrapper = class
objA: THelperA;
property helperA: THelperA read objA write objA; default;
end;
var
wrapper: TWrapper;
begin
wrapper := TWrapper.Create;
wrapper := THelperA.Create;
end.
Regards,
Ryan Joseph
_______________________________________________
fpc-pascal maillist - <a class="moz-txt-link-abbreviated" href="mailto:fpc-pascal@lists.freepascal.org">fpc-pascal@lists.freepascal.org</a>
<a class="moz-txt-link-freetext" href="http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal">http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal</a></pre>
</blockquote>
<br>
</body>
</html>