Hi,
perhaps everything would be clearer, if the default property was
accessed with ^ ?
var
wrapper: TWrapper;
begin
wrapper := TWrapper.Create;
wrapper^ := THelperA.Create;
end.
Cheers,
Benito
Am 14.09.2018 um 10:50 schrieb Ryan Joseph:
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 - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal