Autor Beitrag
Lux
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 104

Win XP Home
D2005 Pers.
BeitragVerfasst: Mo 15.03.04 14:17 
Hy Leutz.
hab mal ne Megabescheuerte Frage.
Wie mache ich eine selbstgeschriebene Procedure für alle Units verfügbar?

Doch im Public bereich oder?
Wie schrebe ich sie denn da hin? Und wie kann ich dann von einer anderen Unit aus darauf zugreifen?

Ich weiß ist ne bescheuerte Frage aber ich meinem Lehrbuch finde ich dazu nichts :?
Loryn
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 34

Win 98, ME
D4 Stand.
BeitragVerfasst: Mo 15.03.04 15:25 
So:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
unit Unit1;

interface

// ggf. uses-Anweisungen, für Units, die von Unit1 im Interface-Abschnitt gebraucht werden

procedure aProcedure;

implementation

// ggf. uses-Anweisungen, für Units, die von Unit1 im Implementation-Abschnitt gebraucht werden

procedure aProcedure;
begin
  // macht gar nichts
end;

end.


In jeder Unit, in der aProcedure aufgerufen wird, muss Unit1 in der uses-Anweisung stehen (am Besten im Implementation-Abschnitt).

Loryn