Autor Beitrag
NTM
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 120

Win XP
2005 Prof
BeitragVerfasst: Fr 01.12.06 20:00 
Hallo zusammen,
ich habe ien kleines Problem. ich eine procedure geschrieben.



ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
procedure gesamtSumme;     // berechnet Gesamtsumme aus berechneten Feldern!
var sum: Currency;
begin
 with Form1 do
 begin
  Query1.DisableControls;
  sum := 0; Query1.First;
  while not Query1.EOF do
  begin
   sum := sum + Query1GesamtPreis.Value;
   Query1.Next
  end;
  Query1.EnableControls;
  Table1.Edit;
  Table1GesamtNetto.Value := sum;
  Table1.Post
 end
end;


nun mein Problem wie kann ich diese procedure über einen Button z.B. dirket ansprechen.

Danke für eure Hilfe

Moderiert von user profile iconGausi: Delphi-Tags hinzugefügt
Ironwulf
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 733
Erhaltene Danke: 2



BeitragVerfasst: Fr 01.12.06 20:10 
wenn die procedure in der selben unit ist musst du nur
gesamtsumme;
schreiben liegts in einer andren
dann Unit.GesamtSumme;
NTM Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 120

Win XP
2005 Prof
BeitragVerfasst: Fr 01.12.06 20:18 
das macht er nicht. Sobald ich das So schreibe du es unten beschrieben wir der Name direkt rot.
Marc.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1876
Erhaltene Danke: 129

Win 8.1, Xubuntu 15.10

BeitragVerfasst: Fr 01.12.06 20:27 
du musst deine prozedur zusätzlich unter private deklarieren!
beispiel:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
type
 TTyp = class
 public
 private
  procedure_xy(i:integer);
end;

implementation

procedure TTyp.Prozedur_xy(i: integer);
begin
 ...
end;
mkinzler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 4106
Erhaltene Danke: 13


Delphi 2010 Pro; Delphi.Prism 2011 pro
BeitragVerfasst: Fr 01.12.06 20:33 
Zitat:
du musst deine prozedur zusätzlich unter private deklarieren!
Dann macht er aus ner Prozedur ne Methode, das ist aber nicht notwendig.
Hast die die Unit per Uses eingebunden? Steht die Prozedur im Interface der Unit?

_________________
Markus Kinzler.
NTM Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 120

Win XP
2005 Prof
BeitragVerfasst: Fr 01.12.06 20:33 
Danke
NTM Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 120

Win XP
2005 Prof
BeitragVerfasst: Fr 01.12.06 20:34 
Danke nochmals ich werde beides ausprobieren.
NTM Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 120

Win XP
2005 Prof
BeitragVerfasst: Fr 01.12.06 20:38 
Hallo zusammen,
jetzt bekomme ich folgende meldung ich weiß aber nicht ob das im zusammen hang steht

Nicht genügend Schlüsselfeldinformationen zum Aktualisieren