Autor Beitrag
Roosevelt Threadstarter
ontopic starontopic starofftopic starofftopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 223

Win XP prof. SP2, Win XP Home SP2, Suse 9.2
Delphi 6 Personal, Delphi 2005
BeitragVerfasst: Di 16.11.04 17:21 
so indy geht jetzt endlich :dance2:
jetzt habe ich versuch mit deinem code diese Datei ins inet hoch und wieder herrunter zuladen. Tja als ich den Code das erste mal gestartet habe kannen ziemlich viel fehlermeldungen hier ist der aktuelle mit den fehlermeldungen bitte um hilfe!!!

ausblenden 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:
procedure BestenlisteHochladen;
begin
idftp.username := 'sage ich nicht';
idftp.passwort := 'sag ich auch nicht';
idftp.host := 'ftp://rheinbogenminis.de';
idftp.Transertype := fTASCII; //Wichtig! Schau diesbezüglich in die Delphihilfe// habe ich gemacht aber nichts    gefunden
 try
  idftp.connect[10000]; //Der Computer versucht 10 Sekunden sich zu verbinden, wenn das nicht geht kommt ein Fehler
  idftp.put('c:\bestenliste.mbq', 'Bestenliste.mbq'(), true ()
   except
    Application.MessageBox('Fehler beim Senden deiner Daten.','Roosevelt Production');
  end;
end;


procedure DateiHerunterladen;
begin
try
 urlDownloadToFile('http://www.rheinbogenminis.de/Bestenliste.mpq', 'c:\Bestenliste.mbq', true);
  finally
   highScore.loadfromfile('c:\bestenliste.mbq');
 end;
end;


ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
[Error] Unit1.pas(64): Undeclared identifier: 'username'
[Error] Unit1.pas(65): Undeclared identifier: 'passwort'
[Error] Unit1.pas(66): Undeclared identifier: 'host'
[Error] Unit1.pas(67): Undeclared identifier: 'Transertype'
[Error] Unit1.pas(67): Undeclared identifier: 'fTASCII'
[Error] Unit1.pas(69): Undeclared identifier: 'connect'
[Error] Unit1.pas(70): Undeclared identifier: 'put'
[Error] Unit1.pas(70): Missing operator or semicolon
[Error] Unit1.pas(80): Incompatible types: 'String' and 'IInterface'
[Error] Unit1.pas(80): Incompatible types: 'Boolean' and 'PChar'
[Error] Unit1.pas(82): Undeclared identifier: 'highScore'
[Fatal Error] Unit1.pas(8): Could not compile used unit 'Unit1'

wie gesagt es waren schon mal mehr *G*

_________________
Glaube niemals das was du weißt!!!
Karlson
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 2088



BeitragVerfasst: Di 16.11.04 22:50 
Oh...mein...gott....:roll:

ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
[Error] Unit1.pas(64): Undeclared identifier: 'username'   
[Error] Unit1.pas(65): Undeclared identifier: 'passwort'   
[Error] Unit1.pas(66): Undeclared identifier: 'host'   
[Error] Unit1.pas(67): Undeclared identifier: 'Transertype'   
[Error] Unit1.pas(67): Undeclared identifier: 'fTASCII'   
[Error] Unit1.pas(69): Undeclared identifier: 'connect'   
[Error] Unit1.pas(70): Undeclared identifier: 'put'


Ei was wirst du wohl falsch gemacht haben? Obwohl meine Glaskugel atm kaputt ist, denke ich dass dir nicht aufgefallen ist, dass deine idftp-Komponente auf der Form, idftp1 heisst...in dem Code steht aber nur idftp, richtig?

Also weiter...
ausblenden Quelltext
1:
[Error] Unit1.pas(70): Missing operator or semicolon					


Die funktion heisst: idftp1.put(1.parameter , 2.parameter , 3. Parameter). Solche Sachen zeigt dir Delphi schon an wenn du STRG + Space drückst. Ich schreib das hier aus dem kopf, wenn ich mal einen Tippfehler mache, sollte mir das zu verzeihen sein...
Nochmal: Besorg dir ein Anfängertut. Sowas ist basic auf die du aber auch mit etwas nachdenken, ohne vorkenntnisse, kommen kannst.

ausblenden Quelltext
1:
[Error] Unit1.pas(80): Incompatible types: 'String' and 'IInterface'					


Is schon ne spur blöder. War definitiv mein Fehler, ich habe angenommen die Funktion UrldownloadToFile sei so aufgebaut, habe ich aber verwechselt mit .put. Habe ehrlich gesagt noch nie mit urldownloadtofile was gemacht, deswegen wusste ich das auch icht besser ;)

Also, die funktion ist etwas komplizierter:
ausblenden Delphi-Quelltext
1:
UrlDownloadToFile(Caller{können wir vernachlässigen}, Dest-Datei oder auch "Url", Da wo die Datei gespeichert werden soll, Register,                    statusCB).					

Wir können uns das eigentlich alles schenken also kommt das danach raus:
ausblenden Delphi-Quelltext
1:
UrlDownloadToFile(NIL, 'http:/www.sdfsdf.de/', 'C:\bestenliste.mpq', 0, NIL;					


ausblenden Quelltext
1:
[Error] Unit1.pas(80): Incompatible types: 'Boolean' and 'PChar'					


Siehe oben, erledigt sich durch die richtige UrlDownloadToFile Funktion.

ausblenden Quelltext
1:
[Error] Unit1.pas(82): Undeclared identifier: 'highScore'					


Tja Kollege :lol: Find doch mal raus warum ich hier kein Highscore := TStringList.Create geschrieben habe.

ps.: Ich habe jetzt wohl definitiv eine Erwähnung in der Aboutbox verdient ;)
Roosevelt Threadstarter
ontopic starontopic starofftopic starofftopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 223

Win XP prof. SP2, Win XP Home SP2, Suse 9.2
Delphi 6 Personal, Delphi 2005
BeitragVerfasst: Mi 17.11.04 14:43 
So ich weiß zwar nicht was die Aboutbox ist aber ich sage mal ja!!!

Bevor ich jetzt wieder mit Fragen komme, möchte ich mich erst mal bei dir bedanken für deine ganze Hilfe bis jetzt!!!

So nun wieder zu den fragen *G*
Was ist ein Anfängertut???
So nein ein bisschen gedacht habe ich schon das idftp icon hat den namen idftp ( geht trozdem nicht)!!!so hier ist der Quellcode noch mal dies mal ohne so viele Fehler aber leider immer noch viel zu viele!!!

ausblenden 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:
procedure BestenlisteHochladen;
begin
idftp.username := 'sag ich nicht';
idftp.passwort := 'sag ich auch nicht';
idftp.host := 'ftp://rheinbogenminis.de';
idftp.Transertype := fTASCII; //Wichtig! Schau diesbezüglich in die Delphihilfe
 try
  idftp.connect[10000]; //Der Computer versucht 10 Sekunden sich zu verbinden, wenn das nicht geht kommt ein Fehler
  idftp.put('c:\bestenliste.mbq', 'Bestenliste.mbq', true) ;
   except
    Application.MessageBox('Fehler beim Senden deiner Daten.','Roosevelt Production');
  end;
end;


procedure DateiHerunterladen;
begin
try
 UrlDownloadToFile(NIL, 'http:/www.rheinbogenminis.de/bestenliste.mqb', 'C:\bestenliste.mpq', 0, NIL);
  finally
   //highScore.loadfromfile('c:\bestenliste.mbq');
 end;
end;


ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
[Error] Unit1.pas(64): Undeclared identifier: 'username'
[Error] Unit1.pas(65): Undeclared identifier: 'passwort'
[Error] Unit1.pas(66): Undeclared identifier: 'host'
[Error] Unit1.pas(67): Undeclared identifier: 'Transertype'
[Error] Unit1.pas(67): Undeclared identifier: 'fTASCII'
[Error] Unit1.pas(69): Undeclared identifier: 'connect'
[Error] Unit1.pas(70): Undeclared identifier: 'put'
[Fatal Error] Unit1.pas(8): Could not compile used unit 'Unit1'


Ich glaube das das irgendwie mit dem idftp zusammen hängt!!! Weiß aber leider nicht was ich falsch mache!!!
Bitte helf mir noch einmal mache dir auch keine Vorwürfe wenn du dich mal vertippst!!!

Der scheinbar ein bisschen hängen gebliebene Roosevelt

_________________
Glaube niemals das was du weißt!!!
Karlson
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 2088



BeitragVerfasst: Mi 17.11.04 15:19 
Hm, also die Fehler hängen nicht mit deinem Source zusammen. Da stimmt schon wieder mit deiner FTP Komponente was nicht. Hast du auch ganz sicher die Komponente IdFtp aus dem Register Indy-Clients? Ich weiss is ne dumme frage, aber was weiss ich...:roll:
GSE
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 740

Win 2k, Win XP Pro
D5 Prof, D6 Ent, D2k5 PE
BeitragVerfasst: Mi 17.11.04 15:23 
denk mal das Problem ist, dass die Unit auch idFTP heißt,benenn mal deine Kompo um

mfg
GSE

_________________
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs
and the universe trying to produce bigger and better idiots. So far, the universe is winning. (Richard Cook)
Karlson
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 2088



BeitragVerfasst: Mi 17.11.04 15:29 
Nope, das muss klappen.
Roosevelt Threadstarter
ontopic starontopic starofftopic starofftopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 223

Win XP prof. SP2, Win XP Home SP2, Suse 9.2
Delphi 6 Personal, Delphi 2005
BeitragVerfasst: Mi 17.11.04 16:02 
Also ich habe das icon unter indy clients an dem steht IdFTP!!! So das ist doch das richtige oder???? nein die unit heißt nicht idftp er heißt unit1!!! Ich verstehe es einfach nicht!!!

_________________
Glaube niemals das was du weißt!!!
GSE
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 740

Win 2k, Win XP Pro
D5 Prof, D6 Ent, D2k5 PE
BeitragVerfasst: Mi 17.11.04 16:48 
Zitat:
nein die unit heißt nicht idftp er heißt unit1
eigentlich meinte ich die unit,die doe Klasse deklariert. benenn deine kompo doch einfach mal um und sagmir obs klappt.

vielleicht liegt es aber auch nur daran, dass du zur Laufzeit über idFtp.Request.Username usw. gehe musst? :wink:

mfg
GSE

_________________
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs
and the universe trying to produce bigger and better idiots. So far, the universe is winning. (Richard Cook)
Karlson
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 2088



BeitragVerfasst: Mi 17.11.04 17:18 
GSE hat folgendes geschrieben:
Zitat:
nein die unit heißt nicht idftp er heißt unit1
eigentlich meinte ich die unit,die doe Klasse deklariert. benenn deine kompo doch einfach mal um und sagmir obs klappt.

vielleicht liegt es aber auch nur daran, dass du zur Laufzeit über idFtp.Request.Username usw. gehe musst? :wink:

mfg
GSE


GSE, machs doch bitte nicht komplizierter als es ist, und ignoriere nicht schon wieder meine Posts. Ich habe doch bereits geschrieben dass das egal ist ob die Klasse ebenso wie die Komponente heisst. Ich benutzte die idftp komponente sehr häufig und mache es seit Jahr und tag genauso.

Und den Bezeichner 'Request' gibt es bei meiner Version überhaupt nicht. Wenn es nicht einen riesengroßen Unterschied zwischen der Indy Version die bei D6 und der, die bei D7 dabei ist gibt, ist das also unsinn :evil:
GSE
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 740

Win 2k, Win XP Pro
D5 Prof, D6 Ent, D2k5 PE
BeitragVerfasst: Mi 17.11.04 17:34 
Ich ging davon aus dass wir über Indy 10, also die aktuelle und gebugfixte Version reden und dort geht das über Request, vielleicht sollte er mal seine version updaten?

mfg
GSE

_________________
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs
and the universe trying to produce bigger and better idiots. So far, the universe is winning. (Richard Cook)
Karlson
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 2088



BeitragVerfasst: Mi 17.11.04 17:37 
Wäre allgemein gut zu wissen welche Version er jetzt überhaupt drauf hat :roll:
Roosevelt Threadstarter
ontopic starontopic starofftopic starofftopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 223

Win XP prof. SP2, Win XP Home SP2, Suse 9.2
Delphi 6 Personal, Delphi 2005
BeitragVerfasst: Mi 17.11.04 18:51 
ja sch**** ich weiß es nicht!!! der Fiji-Fighter hat mir einen link geschickt über dem man sich die ganzen Daten als Zip datei herrunterladen kann dann hat er mir noch gesagt wie man das installiert!!! Aber welche Version na ja das habe ich nicht gefragt!!! kann man das irgendwo sehen??? Mal suchen gehen!!!

_________________
Glaube niemals das was du weißt!!!
Roosevelt Threadstarter
ontopic starontopic starofftopic starofftopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 223

Win XP prof. SP2, Win XP Home SP2, Suse 9.2
Delphi 6 Personal, Delphi 2005
BeitragVerfasst: Mi 17.11.04 18:52 
gefunden *G*
9.0.18 ist meine indy version!!!

_________________
Glaube niemals das was du weißt!!!
Karlson
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 2088



BeitragVerfasst: Mi 17.11.04 21:50 
hm, da bin ich jetzt überfragt. Warten wir mal ob GSE sich nochmal äußert. Bis dato dachte ich eigentlich dass du die selbe Version hast die bei meiner D7 version standartmäßig dabei war. Aber da du ja jetzt nachinstalliert hast sieht die Sache etwas anders aus. Oder du suchst mal schön in der Delphi-Hilfe nach Indy. Aber ich weiss nicht ob da bei der neuinstallation jetzt die Helpfiles ausgetauscht worden sind.
Probier mal GSE's Variante und frage mit idftp.request.put ab.
und die Proberty für den Username hast mittlerweile übrigens nur noch 'User' und nicht 'Username'.
Raphael O.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1596


VS 2013
BeitragVerfasst: Mi 17.11.04 22:31 
so, funktioniert jetzt..
die Komponente hieß idftp, was natürlich komplikationen verursacht hat..
und ein paar Syntaxfehler noch ^^

außerdem läuft das jetzt nicht über urldownloadtofile, sondern idftp1.get(...)
GSE
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 740

Win 2k, Win XP Pro
D5 Prof, D6 Ent, D2k5 PE
BeitragVerfasst: Mi 17.11.04 22:46 
Fiji-Fighter hat folgendes geschrieben:
die Komponente hieß idftp, was natürlich komplikationen verursacht hat..
Zitat:
denk mal das Problem ist, dass die Unit auch idFTP heißt,benenn mal deine Kompo um


mfg
GSE

_________________
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs
and the universe trying to produce bigger and better idiots. So far, the universe is winning. (Richard Cook)
Raphael O.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1596


VS 2013
BeitragVerfasst: Mi 17.11.04 22:48 
jo, ich weiß :roll:
Roosevelt Threadstarter
ontopic starontopic starofftopic starofftopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 223

Win XP prof. SP2, Win XP Home SP2, Suse 9.2
Delphi 6 Personal, Delphi 2005
BeitragVerfasst: Do 18.11.04 10:27 
ja *G* ich weiß nicht so ganz welche sachen du alles gestern bei mir um benannt hast!!! muss ich mal gucken wenn ich zu hause bin!!! Sitze gerade im Info unterricht und grins gerade meinen stupiden lehrer an und der check nichts!!! :twisted:

_________________
Glaube niemals das was du weißt!!!
Karlson
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 2088



BeitragVerfasst: Do 18.11.04 22:34 
GSE hat folgendes geschrieben:
Fiji-Fighter hat folgendes geschrieben:
die Komponente hieß idftp, was natürlich komplikationen verursacht hat..
Zitat:
denk mal das Problem ist, dass die Unit auch idFTP heißt,benenn mal deine Kompo um


mfg
GSE


Jo, also dazu muss ich sagen dass das bei mir keinerlei Probleme verursacht! Okay, ich konnte es mir einfach nicht vorstellen, dass Indy wegen sowas Fehler fabriziert. Also entschuldigung @ GSE.
GSE
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 740

Win 2k, Win XP Pro
D5 Prof, D6 Ent, D2k5 PE
BeitragVerfasst: Fr 19.11.04 13:23 
Zitat:
Also entschuldigung @ GSE
angenommen :D
Zitat:
Okay, ich konnte es mir einfach nicht vorstellen, dass Indy wegen sowas Fehler fabriziert.
nun der "fehler" liegt ja aber nicht bei Indy sondern die Unit, die die IdFTP Komponente bereitstellt (siehe hierzu uses idFTP) heißt idFTP, wenn jetzt eine Komponente benutzt wird die genau so heißt, "weiß" der compiler ja nun nicht ob du die Unit oder die Komponente meinst und entscheidet sich - wie immer falsch - für die Unit (man kann natürlich auch ein Form1.IdFTP z.B. schreiben, dann gehts wieder), okay ? :wink:

mfg
GSE

_________________
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs
and the universe trying to produce bigger and better idiots. So far, the universe is winning. (Richard Cook)