Thema: Delphi Read Write Property

Einzelnen Beitrag anzeigen

ozz

Registriert seit: 26. Jun 2005
131 Beiträge
 
#1

Read Write Property

  Alt 31. Mär 2006, 16:19
Hallo zusammen,
ich bin mal wieder etwas blind. Ich habe eine Klasse MyClass. Diese enthält eine Property Stopwords(mit Lese- und Schreibzugriff). In meinem Hauptprogramm habe ich davon eine Instanz mit dem Namen IMyClass. Wenn ich per .add Werte der Property zuordne, wird die Write der Property nicht aufgerufen. Was mache ich da falsch?
Danke für die Hilfe.
Delphi-Quellcode:

type MyClass = class
 FStopwords:TStringList;
 procedure WriteStopwordlist(value:TStringList);
 
 property Stopwords: TStringList read FStopwords write WriteStopwordlist;
end;
Delphi-Quellcode:
begin;
....
IMyClass.Stopwords.Add(StopwordListView.Items[i].Caption);
...
end
  Mit Zitat antworten Zitat