Autor Beitrag
achterburg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 50



BeitragVerfasst: Fr 03.10.03 23:37 
Hallo,

ich habe ein Problem, und zwar kommt bei diesem Quelltext:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
 
procedure TForm1.hallo;
begin
showmessage('HALLO');
end;
   
procedure TForm1.IdTCPServer1Execute(AThread: TIdPeerThread);
VAR msg:string; neu:integer;
begin

[...]
         Synchronize(zeige); //Hier meckert er, und zwar genau (

[...]

end;

Dieser Fehler:
Delphi hat folgendes geschrieben:
[Error] Oben.pas(332): Missing operator or semicolon

Was kann ich da machen, weil ichden Synchronisieren muss, damit der Indy Server stabil mit meiner Form zusammanläuft?

Moderiert von user profile iconTino: Delphi- & Quote-Tags hinzugefügt.
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 06.10.03 08:36 
Poste doch mal die komplette Procedure IDTCPServer1Execute. Du hast wahrscheinlich einfach ein Zeichen oder so vergessen.

Gruß
Tino
achterburg Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 50



BeitragVerfasst: Mo 06.10.03 17:23 
Ich bin ja auch ein Trottel, hab das alles falsch gepostet.

Hier ein detailierter Auszug:

ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
procedure zeige;
begin
showmessage('Geht');
end;

procedure TForm1.IdTCPServer1Execute(AThread: TIdPeerThread);
VAR msg:string; neu:integer;
begin
 IF (NOT verbundengast) THEN
  begin
   IF Athread.Connection.ReadLn='IASKYOU' THEN
    begin
     form7.Label4.Visible:=true;
     verbundengast:=true;
     Synchronize(zeige);
    end;
  end;
end;


Allgemein frage ichmich, warum ich über den IDTCPServer keine MessageDLG´s anzeigen kann, also nicht richtig. Bei 200 geht es manchmal, wenn er lust hat, bei XP gar nicht. Die zeigt er nur an, wenn die Aufforderung von einem Button oder einer gewöhnlichen Prozedur kommt, daher dachte ich, es liegt amSynchronize effect. Vielleicht hat ja jmd ne Idee,

Gruß
Bernhard
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Di 07.10.03 16:22 
hmmm... is es bei thrads nicht so, dass man auch nich so ohne weiters auf variablen aus dem haupt thread zugreifen kann ???

_________________
In the beginning was the word.
And the word was content-type: text/plain.
achterburg Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 50



BeitragVerfasst: Di 07.10.03 16:52 
Vielen Dank für deine Antwort,
aber ich hab keine Ahnung, habe mich bisher mit Threads auch noch nicht beschäftigt. Weiss halt nur, dass man irgendwas synchronisieren muss, damit dass System stabil läuft, aber für den IDTCPServer soll es da auch nochmal Ausnahmen geben. Mir wäre ja schon geholfen, wenn ich ne Message angezeigt bekomme aus der ONExecute PRocedure heraus