Autor Beitrag
Marco D.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2750

Windows Vista
Delphi 7, Delphi 2005 PE, PHP 4 + 5 (Notepad++), Java (Eclipse), XML, XML Schema, ABAP, ABAP OO
BeitragVerfasst: Do 13.07.06 18:19 
Wenn bei meiner Komponente eine Property geändert wird, soll das jeweilige Feld geändert, aber auch gleichzeitig eine Prozedur aufgerufen werden. Wie stellt man so etwas an?

_________________
Pascal keeps your hand tied. C gives you enough rope to hang yourself. C++ gives you enough rope to shoot yourself in the foot
Born-to-Frag
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1094

Win XP SP2, Win 2000 SP4
Delphi 7, 2k5
BeitragVerfasst: Do 13.07.06 18:32 
ausblenden Delphi-Quelltext
1:
property MyString: String read FMyString write SetMyString;					


Dann mal STRG + SHIFT + C drücken dann wird die Prozedur sogar automatisch erstellt ab D7 glaub ich :zwinker:

_________________
Theorie ist wenn man alles weiß, aber nichts funktioniert. Praxis ist wenn alles funktioniert, aber niemand weiß warum.
Microsoft vereint Theorie und Praxis: Nichts funktioniert und niemand weiß warum.
Marco D. Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2750

Windows Vista
Delphi 7, Delphi 2005 PE, PHP 4 + 5 (Notepad++), Java (Eclipse), XML, XML Schema, ABAP, ABAP OO
BeitragVerfasst: Do 13.07.06 18:34 
Wie kommt die Prozedure SetMyString denn an den zugewiesenen Wert?

_________________
Pascal keeps your hand tied. C gives you enough rope to hang yourself. C++ gives you enough rope to shoot yourself in the foot
Born-to-Frag
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1094

Win XP SP2, Win 2000 SP4
Delphi 7, 2k5
BeitragVerfasst: Do 13.07.06 18:35 
mit Strg+Shift+C wird sie erstellt, ansonsten legst du sie selbst an im private-Abschnitt: proc SetMyString(const Value: String);

PS: Die Parameter werden bei write einfach nicht angegeben ;)

EDIT: Integer durch String getauscht :mrgreen:

_________________
Theorie ist wenn man alles weiß, aber nichts funktioniert. Praxis ist wenn alles funktioniert, aber niemand weiß warum.
Microsoft vereint Theorie und Praxis: Nichts funktioniert und niemand weiß warum.
Marco D. Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2750

Windows Vista
Delphi 7, Delphi 2005 PE, PHP 4 + 5 (Notepad++), Java (Eclipse), XML, XML Schema, ABAP, ABAP OO
BeitragVerfasst: Do 13.07.06 18:40 
Wo muss sich denn für das Tastenkürzel die Schreibmarke befinden?
Und der Parameter Value enthält den der Property zugewiesenen Wert?

_________________
Pascal keeps your hand tied. C gives you enough rope to hang yourself. C++ gives you enough rope to shoot yourself in the foot
Born-to-Frag
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1094

Win XP SP2, Win 2000 SP4
Delphi 7, 2k5
BeitragVerfasst: Do 13.07.06 18:47 
user profile iconMarco D. hat folgendes geschrieben:
Wo muss sich denn für das Tastenkürzel die Schreibmarke befinden?

Meinst du den Cursor?
Ist egal..

user profile iconMarco D. hat folgendes geschrieben:
Und der Parameter Value enthält den der Property zugewiesenen Wert?

:zustimm:

_________________
Theorie ist wenn man alles weiß, aber nichts funktioniert. Praxis ist wenn alles funktioniert, aber niemand weiß warum.
Microsoft vereint Theorie und Praxis: Nichts funktioniert und niemand weiß warum.
Marco D. Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2750

Windows Vista
Delphi 7, Delphi 2005 PE, PHP 4 + 5 (Notepad++), Java (Eclipse), XML, XML Schema, ABAP, ABAP OO
BeitragVerfasst: Do 13.07.06 22:53 
user profile iconBorn-to-Frag hat folgendes geschrieben:
user profile iconMarco D. hat folgendes geschrieben:
Wo muss sich denn für das Tastenkürzel die Schreibmarke befinden?

Meinst du den Cursor?
Ist egal..

Hm eben gings, jetzt nicht mehr :( Wo genau muss der Cursor denn hin?

_________________
Pascal keeps your hand tied. C gives you enough rope to hang yourself. C++ gives you enough rope to shoot yourself in the foot
Marco D. Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2750

Windows Vista
Delphi 7, Delphi 2005 PE, PHP 4 + 5 (Notepad++), Java (Eclipse), XML, XML Schema, ABAP, ABAP OO
BeitragVerfasst: Do 13.07.06 23:04 
Er muss hinter 'Write'. Ich habs rausgefunden ;)

_________________
Pascal keeps your hand tied. C gives you enough rope to hang yourself. C++ gives you enough rope to shoot yourself in the foot