Autor Beitrag
Fingolfin
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 20



BeitragVerfasst: Sa 05.04.03 23:32 
Hallöle, ich habe da mal wieder 'ne komische Frage.

Man kann ja mithilfe von Interfaces Methoden mehreren Klassen bereitstellen, die dann in diesen implementiert werden.

Soweit so gut, mit Eigenschaften geht dies anscheinend nicht.
Aber ein bekannter hat mir mal erzählt, daß man zumindest in Java Properties in ein Interface reincasten kann oder so ähnlich, also eine Mehrfachvererbung simulieren.

Gibt es etwas ähnliches für Delphi?

Danke schonmal,

Fingolfin

(OOP rulez :twisted: )
AndyB
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1173
Erhaltene Danke: 14


RAD Studio XE2
BeitragVerfasst: So 06.04.03 07:17 
Wenn du mit Properties nicht die Felder meinst:
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
ITest = interface
  function GetProp: Integer;
  procedure SetProp(Value: Integer);

  property Prop: Integer read GetProp write SetProp;
end;

_________________
Ist Zeit wirklich Geld?
Fingolfin Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 20



BeitragVerfasst: So 06.04.03 10:28 
Woah, das is mar ja peinlich. :shock:

Ich wußte echt nicht, daß man das so umsetzen kann, vielen Dank.