Einzelnen Beitrag anzeigen

Elvis

Registriert seit: 25. Nov 2005
Ort: München
1.909 Beiträge
 
Delphi 2010 Professional
 
#2

Re: Endlosschleife bei Property

  Alt 19. Jul 2007, 11:28
Wo speicherst du denn den Wert für Property1, hmm?
Momentan sieht das bei dir so aus:
Um Property1 auszulesen, muss er GetProperty1 ausführen, welches Property1 ausliest, was GetProperty1 ausführt, welches...
Du musst die Werte schon irgendwo abspeichern. Im Normalfall würde man dafür ein Feld benutzen:
Delphi-Quellcode:
private
  fProperty : Mööp;
public
  property Property1 : Mööp read fProperty1 write SetPropert1;
...
procedure TSomeType.SetProperty1(const aValue : Mööp);
begin
  fProperty1 := aValue;
end;
Robert Giesecke
I’m a great believer in “Occam’s Razor,” the principle which says:
“If you say something complicated, I’ll slit your throat.”
  Mit Zitat antworten Zitat