Autor Beitrag
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8549
Erhaltene Danke: 478

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Do 06.02.03 21:36 
mein Programm hat mehrere Formulare, d.h. auch mehrere Units.

In dem einen Unit (zu einer Eingabe-Form) sind verschiedene Variablen definiert, die dort eingegeben werden.
Jetzt möchte ich mit diesen Variablen in den anderen Units weiterarbeiten. Wie geht das?
bis11
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1247
Erhaltene Danke: 2

Apple Mac OSX 10.11

BeitragVerfasst: Do 06.02.03 21:41 
Indem Du die Variablen in dem Public-Teil von Deiner Unit deklarierst.
HeLe
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 21



BeitragVerfasst: Mo 17.02.03 17:41 
bis11 hat folgendes geschrieben:
Indem Du die Variablen in dem Public-Teil von Deiner Unit deklarierst.


öhhh, also eine unit hat keinen public-abschnitt.
entweder du schreibst sie als globale variablen in den interface-abschnitt der unit (was stilistisch nicht so schön ist) oder in den public-abschnitt einer klasse, die im interface-abschnitt deklariert ist (in deinem fall wohl in die formular-klasse)

so, en bißchen klugscheißerei ist immer gut :wink:
Tino
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Veteran
Beiträge: 9839
Erhaltene Danke: 45

Windows 8.1
Delphi XE4
BeitragVerfasst: Mo 17.02.03 17:52 
@Gausi: Schau dir bitte diese Topic mal an.