Autor Beitrag
beljo
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 129



BeitragVerfasst: Mo 27.03.06 12:33 
Hallo Leute,
ich würde gern wissen warum das
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
procedure TSM.StringlistspeichernClick(Sender: TObject);
var weg,name,s:String;
begin
if savedialog2.execute then
 begin
   DateTimeToString(s, 'yymmdd', now);
   Name := ExtractFileName(savedialog2.Filename);
   Weg := ExtractFilePath (SaveDialog2.FileName);
   anweisung:=TstringList.Create(weg+s+name+'.comi');   //hier: [Error] Unit1.pas(884): Too
                       // many actual parameters
  if SM.NutenKnopf1.Checked = True  then
   anweisung.Add('/parallelflanckige Nuten') else...

nicht funzt.
mit Ini-files hats geklappt.Warum nicht mit Listen?
Miri
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 657


Delphi 3 Prof., Delphi 2005 PE
BeitragVerfasst: Mo 27.03.06 12:37 
weil eine stringlist keine datei ist?!

btw du solltest dir wirklich mal ein paar grundlegende sachen angucken und dir angewöhnen, zu komponenten, die du (noch) nicht kennst, die delphi-hilfe anzuschauen, das hilft ungemein...
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6395
Erhaltene Danke: 149

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Mo 27.03.06 12:38 
Weil das Create der TStringList keinen Dateinamen (String) erwartet. Es darf gar kein Parameter übergeben werden. Erst, wenn du die Methode SaveToFlie oder LoadFromFile benutzt, kannst du einen Dateinamen übergeben.
beljo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 129



BeitragVerfasst: Mo 27.03.06 12:52 
ok Leute zerreist mich doch nicht gleich in der Luft ;-)
also so
ausblenden Delphi-Quelltext
1:
2:
3:
begin
DateTimeToString(s, 'yymmdd', now); :oops: 
anweisung.savetofile(savedialog2.FileName+s+'.comi');

klappte ja schon vorher, nur ich wollte halt das Datum vor dem Filename plaziert haben :oops:
Könnt Ihr mir vieleicht helfen?
beljo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 129



BeitragVerfasst: Mo 27.03.06 12:53 
ok Leute zerreist mich doch nicht gleich in der Luft ;-)
also so
ausblenden Delphi-Quelltext
1:
2:
3:
begin
DateTimeToString(s, 'yymmdd', now); :oops: 
anweisung.savetofile(savedialog2.FileName+s+'.comi');

klappte ja schon vorher, nur ich wollte halt das Datum vor dem Filename plaziert haben :oops:
Könnt Ihr mir vieleicht helfen?
azubi_20
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 593

WinXP SP2, Ubuntu 8.4
D7 Enterp., D2005 Prof., Java (Eclipse 3.4.0)
BeitragVerfasst: Mo 27.03.06 12:58 
Was willst du denn nun machen, die Stringlist speichern ? :?:
Marc.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1876
Erhaltene Danke: 129

Win 8.1, Xubuntu 15.10

BeitragVerfasst: Mo 27.03.06 13:02 
hallo,

da die lösung eigentlich direkt auf der hand liegt! ich mach das ganze mal für dumme: :lol:
ausblenden Delphi-Quelltext
1:
anweisung.savetofile(savedialog2.FileName+s+'.comi');					

so schaut zur zeit dein code aus. Filename an erster Stelle, dann dein Datum und zum schluss die datei-endung. Nun wird es doch nicht also schwer sein, den Dateinamen an zweite Stelle zu setzen und das Datum an erster, oder? ;) :roll:
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6395
Erhaltene Danke: 149

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Mo 27.03.06 13:02 
Wir zerreißen dich nicht in der Luft. Das fühlt sich anders an :mrgreen:
Du verwechselst nur gerade deine eigenen Threads. Der, wo du nach dem Datum vor den Dateinamen gefragt hast, ist dort und nicht hier.


Zuletzt bearbeitet von jasocul am Mo 27.03.06 13:07, insgesamt 2-mal bearbeitet
beljo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 129



BeitragVerfasst: Mo 27.03.06 13:04 
Stringliste speichern, was ja klappt.
Und im Dateiname soll das Datum vorhanden sein.
Zurzeit kann ich nur Filname+Datum. (zb.ListeA060327)
Will aber Datum+Filename haben. (zb. 060327ListA).
mein kleines Problem verstanden?
beljo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 129



BeitragVerfasst: Mo 27.03.06 13:06 
nein jasocul ich hab ein neues Problem
azubi_20
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 593

WinXP SP2, Ubuntu 8.4
D7 Enterp., D2005 Prof., Java (Eclipse 3.4.0)
BeitragVerfasst: Mo 27.03.06 13:08 
kommt dir das bekannt vor ? :)
user profile iconbeljo hat folgendes geschrieben:
Danke Leute hat gefunzt.
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
procedure TSM.SpeichernVonGeodatClick(Sender: TObject);
var  Present: TDateTime;
     name:string;
     Year, Month, Day: integer;
      s,a:string;
      weg:string;
begin
 if savedialog1.execute then
 begin
 { Present:= Now;   }
   DateTimeToString(s, 'yymmdd', now);
   Name := ExtractFileName(SaveDialog1.FileName);
   weg :=ExtractFilePath (SaveDialog1.FileName);

   ini := TIniFile.create(weg+s+name+'.txt');


So geht es wunderbar Danke Jungs :-)
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6395
Erhaltene Danke: 149

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Mo 27.03.06 13:08 
Jetzt bin auch schon durcheinander. Habe den Link korrigiert und mache jetzt eine Kaffeepause.
beljo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 129



BeitragVerfasst: Mo 27.03.06 13:16 
Leute ich weis doch noch was ich schreibe oder?!?!?!
egal,
das was euch bekannt vorkommt hatte ich schonmal abgefragt, wurde mir super erklärt, an dieser Stelle Danke :-)
Aber bitte verwechselt das nicht mit dem hier, hier will ich eine Stringlist so ablegen wie vorher beschrieben.
aber es funktioniert nicht wie mit den Ini-files, da es ja eine Liste keine Datei ist (wieder was gelernt).
Macht euch bitte frei von dem letzten Topic ;-)
sofern es möglich ist eine Liste wie oben beschrieben abzulegen, so helft mir bitte.
Danke.
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6395
Erhaltene Danke: 149

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Mo 27.03.06 13:27 
Nun rege dich mal nicht auf.
Wir schreiben hier das gleiche, weil es genau gleich funktioniert. Nur nicht beim Create sondern beim SaveToFile. Da du eigentlich lernfähig bist, hatte ich zumindest erwartet, dass du soviel Transfer-Leistung alleine aufbringen kannst.
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
procedure TSM.StringlistspeichernClick(Sender: TObject);
var weg,name,s:String;
begin
if savedialog2.execute then
 begin
   DateTimeToString(s, 'yymmdd', now);
   Name := ExtractFileName(savedialog2.Filename);
   Weg := ExtractFilePath (SaveDialog2.FileName);
   anweisung.SaveToFile(weg+s+name+'.comi');
JayEff
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2971

Windows Vista Ultimate
D7 Enterprise
BeitragVerfasst: Mo 27.03.06 13:29 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
procedure TSM.SpeichernVonGeodatClick(Sender: TObject);   
var name:string;   
    s:string;   
    weg:string;
    speicherDateiName:String;   
begin   
if savedialog2.execute then   
 begin   
   DateTimeToString(s, 'yymmdd', now);   
   Name := ExtractFileName(savedialog2.Filename);   
   Weg := ExtractFilePath (SaveDialog2.FileName);   
   SpeicherDateiName:=weg+s+name+'.comi'

So. Wo ist das problem?
Im SpeicherDateiName steht der Name der Datei in die du speichern willst, zumindest so wie ichs verstanden hab. Und genau so stehts auch in deinem anderen Post und genau so wurde es hier mehr mals geschrieben x)

_________________
>+++[>+++[>++++++++<-]<-]<++++[>++++[>>>+++++++<<<-]<-]<<++
[>++[>++[>>++++<<-]<-]<-]>>>>>++++++++++++++++++.+++++++.>++.-.<<.>>--.<+++++..<+.
beljo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 129



BeitragVerfasst: Mo 27.03.06 13:34 
:oops: :oops: :oops: :oops:
Asche über mein Haupt......
bin ja ganz klein jetzt.
Natürlich hab ich es ja auch genau wie bei den Ini-files versucht, nur ich hatte mich vertippt.....
tut mir echt Leid Leute,
kann nur sagen das heute echt nicht mein Tag ist und ich anscheinend echt voll auf Droge bin.
sorry sorry sorry.
hoffe Ihr verzeiht mir und teert und federt mich jetzt nicht :oops: :oops: :oops:
JayEff
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2971

Windows Vista Ultimate
D7 Enterprise
BeitragVerfasst: Mo 27.03.06 13:37 
VERBRENNT IHN! ähm.. ja..
Nene wir sind natürlich auch fähig zu verzeihen, DASS DAS JA NIE WIEDER VORKOMMT! ;-) x)
*hehe* Schon ok. Ich wünsch dir viel Glück bei deinem Projekt und beehr uns oft wieder wenn du Fragen hast ^^

_________________
>+++[>+++[>++++++++<-]<-]<++++[>++++[>>>+++++++<<<-]<-]<<++
[>++[>++[>>++++<<-]<-]<-]>>>>>++++++++++++++++++.+++++++.>++.-.<<.>>--.<+++++..<+.
beljo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 129



BeitragVerfasst: Mo 27.03.06 13:44 
Ok Leute werde hoch und heilig schwören NIE wieder Drogen zu nehmen ;-) ( ander ganz ich es mir nicht erklären)
nochmal Danke für eure Gedult
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6395
Erhaltene Danke: 149

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Mo 27.03.06 13:48 
@JayEff:
Heute so sanft? Beim letzten Folterabend warst du besser drauf. :zwinker:
@beljo:
Niemand ist perfekt. Wir machen alle Fehler (nur ich nicht 8) ). Hau in die Tasten. Bei dir habe ich noch Hoffnung.