Autor Beitrag
lexmy3
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 140

WIN 2000 Prof. + Office 2000
Delphi 5 Enterprise
BeitragVerfasst: Mi 05.10.05 10:47 
Hallo, hier ein Amateur am Start!!!

Mein Problem:
Habe 10 Units erstellt, welche nacheinander auf-und zugehen und möchte Texte aus Edits in der Unit1 in ein RichEdit in der Unit10 sammeln.

Hier Fehlermeldung: Undefinierter Bezeichner Unit1
Habe unter Implementation Uses Unit1 eingegeben, hilft nix.

Mein Quelltext:

ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
unit Unit10;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls, CheckLst, ComCtrls;

type
  TFormCosts = class(TForm)
    CheckListBoxCosts: TCheckListBox;
    EditCosts: TEdit;
    ButtonEin: TButton;
    ButtonClear: TButton;
    ButtonBack: TButton;
    ButtonWeiter: TButton;
    RichEdit1: TRichEdit;
    procedure ButtonEinClick(Sender: TObject);
    procedure ButtonBackClick(Sender: TObject);
    procedure ButtonWeiterClick(Sender: TObject);
  private
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
  end;

var
  FormCosts: TFormCosts;

implementation

uses Unit9, Unit1;

{$R *.DFM}

procedure TFormCosts.ButtonEinClick(Sender: TObject);
begin
     CheckListBoxCosts.Items.Add (EditCosts.Text)
end;

procedure TFormCosts.ButtonBackClick(Sender: TObject);
begin
     FormDefaults.Show;
     close;
end;

procedure TFormCosts.ButtonWeiterClick(Sender: TObject);
begin

RichEdit1.Lines.Add (LabelVisual.Caption + ' ' + EditVisual.Text);
RichEdit1.Lines.Add (LabelLocation.Caption + ' ' + EditLocation.Text);
RichEdit1.Lines.Add (LabelProjektNo.Caption + ' ' + EditProjektNo.Text);
RichEdit1.Lines.Add (LabelName.Caption + ' ' + EditName.Text);
RichEdit1.Lines.Add (LabelDate.Caption + ' ' + EditDate.Text);
end;

end.


MFG Willi

Moderiert von user profile iconChristian S.: Delphi-Tags hinzugefügt.
Grishnak
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 221

Windows XP Home
Delphi 7 PE, Delphi 2005 PE
BeitragVerfasst: Mi 05.10.05 11:09 
Zeig' uns doch auch bitte den Quelltext von Unit1 und Unit9. (evtl. fehlt nur ein vorgestelltes 'Unit1.' bzw. 'Unit9.')

_________________
Mach' etwas idiotensicher und irgendjemand erfindet einen besseren Idioten!
lexmy3 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 140

WIN 2000 Prof. + Office 2000
Delphi 5 Enterprise
BeitragVerfasst: Mi 05.10.05 11:38 
user profile iconGrishnak hat folgendes geschrieben:
Zeig' uns doch auch bitte den Quelltext von Unit1 und Unit9. (evtl. fehlt nur ein vorgestelltes 'Unit1.' bzw. 'Unit9.')


Hi,

Habe inzwischen alle Objekte deklariert.
Das programm wird zwar compiliert aber macht net das was ich will.
dh. sammelt trotzdem nicht die EINTRÄGE aus Labels und Edits.

Warum???

ausblenden volle Höhe Unit1
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls, ComCtrls;

type
  TForm1 = class(TForm)
    ButtonWeiter: TButton;
    EditVisual: TEdit;
    EditLocation: TEdit;
    EditProjektNo: TEdit;
    EditName: TEdit;
    LabelVisual: TLabel;
    LabelLocation: TLabel;
    LabelProjektNo: TLabel;
    LabelName: TLabel;
    EditDate: TEdit;
    LabelDate: TLabel;
    LabelNEK: TLabel;

    procedure ButtonWeiterClick(Sender: TObject);
  private
    { Private-Deklarationen }
  public

    { Public-Deklarationen }
  end;

var
  Form1: TForm1;

implementation

uses Unit2, Unit3, Unit10;

{$R *.DFM}

// mit General Weiter // Form1 zu//
procedure TForm1.ButtonWeiterClick(Sender: TObject);
begin
     FormGeneral.Show;
     Form1.Visible:=True;
end;

end.



ausblenden volle Höhe unit10
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
unit Unit10;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls, CheckLst, ComCtrls, Unit1;

type
  TFormCosts = class(TForm)
    CheckListBoxCosts: TCheckListBox;
    EditCosts: TEdit;
    ButtonEin: TButton;
    ButtonClear: TButton;
    ButtonBack: TButton;
    ButtonWeiter: TButton;
    RichEdit1: TRichEdit;
    procedure ButtonEinClick(Sender: TObject);
    procedure ButtonBackClick(Sender: TObject);
    procedure ButtonWeiterClick(Sender: TObject);
  private
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
    EditVisual: TEdit;
    EditLocation: TEdit;
    EditProjektNo: TEdit;
    EditName: TEdit;
    LabelVisual: TLabel;
    LabelLocation: TLabel;
    LabelProjektNo: TLabel;
    LabelName: TLabel;
    EditDate: TEdit;
    LabelDate: TLabel;
  end;

var
  FormCosts: TFormCosts;

implementation

uses Unit9;

{$R *.DFM}

procedure TFormCosts.ButtonEinClick(Sender: TObject);
begin
     CheckListBoxCosts.Items.Add (EditCosts.Text)
end;

procedure TFormCosts.ButtonBackClick(Sender: TObject);
begin
     FormDefaults.Show;
     close;
end;

procedure TFormCosts.ButtonWeiterClick(Sender: TObject);
begin
     RichEdit1.Lines.Add (LabelVisual.Caption + ' ' + EditVisual.Text);
     RichEdit1.Lines.Add (LabelLocation.Caption + ' ' + EditLocation.Text);
     RichEdit1.Lines.Add (LabelProjektNo.Caption + ' ' + EditProjektNo.Text);
     RichEdit1.Lines.Add (LabelName.Caption + ' ' + EditName.Text);
     RichEdit1.Lines.Add (LabelDate.Caption + ' ' + EditDate.Text);
end;

end.


Moderiert von user profile iconChristian S.: Delphi-Tags hinzugefügt.
Christian S.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 20451
Erhaltene Danke: 2264

Win 10
C# (VS 2019)
BeitragVerfasst: Mi 05.10.05 11:40 
Hallo, lexmy3!

Bitte nutze für Deinen Delphi-Code die Delphi- anstatt der Code-Tags. Dadurch wird der Sourcecode mit Syntax-Highlighting angezeigt!

Danke
Christian :-)

_________________
Zwei Worte werden Dir im Leben viele Türen öffnen - "ziehen" und "drücken".
lexmy3 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 140

WIN 2000 Prof. + Office 2000
Delphi 5 Enterprise
BeitragVerfasst: Mi 05.10.05 12:01 
user profile iconChristian S. hat folgendes geschrieben:
Hallo, lexmy3!

Bitte nutze für Deinen Delphi-Code die Delphi- anstatt der Code-Tags. Dadurch wird der Sourcecode mit Syntax-Highlighting angezeigt!

Danke
Christian :-)


Wie Bitte??? Ich bin kein Informatiker!!!
Tino
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Veteran
Beiträge: 9839
Erhaltene Danke: 45

Windows 8.1
Delphi XE4
BeitragVerfasst: Mi 05.10.05 12:26 
user profile iconlexmy3 hat folgendes geschrieben:
Wie Bitte??? Ich bin kein Informatiker!!!

www.delphi-forum.de/..._bbcodes_source.html ;-)
Grishnak
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 221

Windows XP Home
Delphi 7 PE, Delphi 2005 PE
BeitragVerfasst: Mi 05.10.05 13:48 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
procedure TFormCosts.ButtonWeiterClick(Sender: TObject);
begin
     RichEdit1.Lines.Add (Form1.LabelVisual.Caption + ' ' + Form1.EditVisual.Text);
     RichEdit1.Lines.Add (Form1.LabelLocation.Caption + ' ' + Form1.EditLocation.Text);
     RichEdit1.Lines.Add (Form1.LabelProjektNo.Caption + ' ' + Form1.EditProjektNo.Text);
     RichEdit1.Lines.Add (Form1.LabelName.Caption + ' ' + Form1.EditName.Text);
     RichEdit1.Lines.Add (Form1.LabelDate.Caption + ' ' + Form1.EditDate.Text);
end;


Wenn du jeweils ein 'Form1.' vorstellst, bekommst du die Labels bzw. Edit-Felder aus der 1. Form.

Hilft dir das weiter?

_________________
Mach' etwas idiotensicher und irgendjemand erfindet einen besseren Idioten!
lexmy3 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 140

WIN 2000 Prof. + Office 2000
Delphi 5 Enterprise
BeitragVerfasst: Mi 05.10.05 14:53 
Danke Dir, Das war die Lösung

Mfg