| Autor |
Beitrag |
lexmy3
      
Beiträge: 140
WIN 2000 Prof. + Office 2000
Delphi 5 Enterprise
|
Verfasst: 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:
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 public 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 Christian S.: Delphi-Tags hinzugefügt.
|
|
Grishnak
      
Beiträge: 221
Windows XP Home
Delphi 7 PE, Delphi 2005 PE
|
Verfasst: 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 
      
Beiträge: 140
WIN 2000 Prof. + Office 2000
Delphi 5 Enterprise
|
Verfasst: Mi 05.10.05 11:38
Grishnak 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???
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 public
end;
var Form1: TForm1;
implementation
uses Unit2, Unit3, Unit10;
{$R *.DFM}
procedure TForm1.ButtonWeiterClick(Sender: TObject); begin FormGeneral.Show; Form1.Visible:=True; end;
end. |
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 public 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 Christian S.: Delphi-Tags hinzugefügt.
|
|
Christian S.
      
Beiträge: 20451
Erhaltene Danke: 2264
Win 10
C# (VS 2019)
|
Verfasst: 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 
      
Beiträge: 140
WIN 2000 Prof. + Office 2000
Delphi 5 Enterprise
|
Verfasst: Mi 05.10.05 12:01
Christian 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
      

Beiträge: 9839
Erhaltene Danke: 45
Windows 8.1
Delphi XE4
|
Verfasst: Mi 05.10.05 12:26
lexmy3 hat folgendes geschrieben: | | Wie Bitte??? Ich bin kein Informatiker!!! |
www.delphi-forum.de/..._bbcodes_source.html 
|
|
Grishnak
      
Beiträge: 221
Windows XP Home
Delphi 7 PE, Delphi 2005 PE
|
Verfasst: Mi 05.10.05 13:48
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 
      
Beiträge: 140
WIN 2000 Prof. + Office 2000
Delphi 5 Enterprise
|
Verfasst: Mi 05.10.05 14:53
Danke Dir, Das war die Lösung
Mfg
|
|