![]() |
Der linkes Seite kann nichts zugewiesen werden?
Hi!
Ich geb's zu, ich bin zu doof! Ich habe eine Klasse, die ein Record als Protected-Eicgenschaft besitzt und diese als Property veröffentlicht:
Code:
Wenn ich der Eigenschaft nun was zuweisen will
type
TPointFloat = record fX: Double; fY: Double; end; TVectorPoint = class private rPoint: TPointFloat; { ... } public property PointFloat: TPointFloat read rPoint write rPoint; { ... } end;
Code:
sagt mir der Compiler, dass "Der linken Seite nichts zugeseisen werden kann"...
oVectorPoint.PointFloat.fX := ClientWidth / 2;
Wo ist denn da des Pudels Kern? |
Re: Der linkes Seite kann nichts zugewiesen werden?
Code:
das würde funktionieren!
var pf : TPointFloat;
... pf.fX := ClientWidth / 2; pf.fY := 0; oVectorPoint.PointFloat := pf; und das nachfolgende auch
Delphi-Quellcode:
aber wenn dann kann man auch gleich ableiten
type
TPointFloat = class fX: Double; fY: Double; end; TVectorPoint = class private fPoint: TPointFloat; { ... } public property PointFloat: TPointFloat read fPoint write fPoint; { ... } end; oVectorPoint.PointFloat.fX := ClientWidth / 2; [edit=Luckie]Warum hört ihr eigentlich immer mittendrin mit den Delphi-Tags auf? Mfg, Luckie[/edit] |
Alle Zeitangaben in WEZ +1. Es ist jetzt 23:10 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz