Autor Beitrag
McPri
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 16



BeitragVerfasst: Di 28.06.05 12:47 
Hallo. bin neu hier und benutze Delphi noch nicht allzu lange. Habe auch nur Delphi 3 Proffesional. Meine Frage ist: Wie speichere ich z.B. die Lines von RichEdit automatisch in einer Datei? Also dass der Computer nicht immer fragt, wo und unter welchem Namen ich es speichern will.
retnyg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2754

SNES, GB, GBA, CPC, A500, 486/66, P4/3.0HT: NintendOS, AmigaOS, DoS
Delphi 5, Delphi 7
BeitragVerfasst: Di 28.06.05 12:50 
mit richedit1.lines.savetofile('c:\test.txt') ?

_________________
es gibt leute, die sind genetisch nicht zum programmieren geschaffen.
in der regel haben diese leute die regel...
WeBsPaCe
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 2322
Erhaltene Danke: 1

FireFox 3, Internet Explorer 6 SP1
D1, D3Prof, D6Pers, D7Pers+Indy, VisualStudio Express
BeitragVerfasst: Di 28.06.05 12:54 
:welcome: im DF!! :D

user profile iconMcPri hat folgendes geschrieben:
Wie speichere ich z.B. die Lines von RichEdit automatisch in einer Datei? Also dass der Computer nicht immer fragt, wo und unter welchem Namen ich es speichern will.

Das klingt irgendwie so, als ob du einfach die Demo genommen hättest und die dann noch ein kleines bisschen abgeändert hast... :gruebel: Normalerweise kommt da keine Abfrage. Die muss man erst selber in sein Programm implementieren... Selber schreiben... ;)
McPri Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 16



BeitragVerfasst: Di 28.06.05 12:57 
Ne, hab die Demo nicht genommen. Hab einfach ein richedit-feld genommen und einen button. dann hab ich da noch ein savedialog hingemacht.

der code sieht so aus:
ausblenden Delphi-Quelltext
1:
2:
savedialog1.execute;
richedit1.lines.savetofile(savedialog1.filename);


Und bei filename bei savedialog1 hab ich dann den dateinamen eingetragen (c:\notizen\notiz.txt)
retnyg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2754

SNES, GB, GBA, CPC, A500, 486/66, P4/3.0HT: NintendOS, AmigaOS, DoS
Delphi 5, Delphi 7
BeitragVerfasst: Di 28.06.05 12:58 
user profile iconWeBsPaCe hat folgendes geschrieben:
:welcome: im DF!! :D

:mrgreen:

@mcPri: mach einfach den savedialog weg und so wie ich oben gesagt hab

Moderiert von user profile iconraziel: Externes Smilie entfernt.

_________________
es gibt leute, die sind genetisch nicht zum programmieren geschaffen.
in der regel haben diese leute die regel...
McPri Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 16



BeitragVerfasst: Di 28.06.05 13:02 
also dann:

ausblenden Delphi-Quelltext
1:
richedit1.lines.savetofile(c:\notizen\notiz.txt)					
WeBsPaCe
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 2322
Erhaltene Danke: 1

FireFox 3, Internet Explorer 6 SP1
D1, D3Prof, D6Pers, D7Pers+Indy, VisualStudio Express
BeitragVerfasst: Di 28.06.05 13:04 
user profile iconMcPri hat folgendes geschrieben:
also dann:
ausblenden Delphi-Quelltext
1:
richedit1.lines.savetofile(c:\notizen\notiz.txt)					

Nö. So:
ausblenden Delphi-Quelltext
1:
richedit1.lines.savetofile('c:\notizen\notiz.txt');					

;)
McPri Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 16



BeitragVerfasst: Di 28.06.05 13:05 
Achso. Nochmal vielen Dank fuer die schnelle Hilfe!
retnyg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2754

SNES, GB, GBA, CPC, A500, 486/66, P4/3.0HT: NintendOS, AmigaOS, DoS
Delphi 5, Delphi 7
BeitragVerfasst: Di 28.06.05 13:05 
user profile iconMcPri hat folgendes geschrieben:
also dann:
ausblenden Delphi-Quelltext
1:
richedit1.lines.savetofile(c:notizennotiz.txt)					

nein,
ausblenden Delphi-Quelltext
1:
richedit1.lines.savetofile('c:\notizen\notiz.txt');					

ein string gehört in zwei apostrophe eingebettet.

_________________
es gibt leute, die sind genetisch nicht zum programmieren geschaffen.
in der regel haben diese leute die regel...
WeBsPaCe
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 2322
Erhaltene Danke: 1

FireFox 3, Internet Explorer 6 SP1
D1, D3Prof, D6Pers, D7Pers+Indy, VisualStudio Express
BeitragVerfasst: Di 28.06.05 13:07 
:lol:

@rety: Gib dir mal die HIGHLIGHT-Tags in meinem Post oben... :gruebel:
retnyg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2754

SNES, GB, GBA, CPC, A500, 486/66, P4/3.0HT: NintendOS, AmigaOS, DoS
Delphi 5, Delphi 7
BeitragVerfasst: Di 28.06.05 13:13 
user profile iconWeBsPaCe hat folgendes geschrieben:
:lol:

@rety: Gib dir mal die HIGHLIGHT-Tags in meinem Post oben... :gruebel:

scheint ein bug zu sein... seit dem letzten update der forensoftware sind mir schon 3 aufgefallen, z.b. vorher beim quoten hat der die backslashes nicht übernommen, und antworten vom virtuellen ansprechpartner sind krass fehl-formatiert

_________________
es gibt leute, die sind genetisch nicht zum programmieren geschaffen.
in der regel haben diese leute die regel...
WeBsPaCe
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 2322
Erhaltene Danke: 1

FireFox 3, Internet Explorer 6 SP1
D1, D3Prof, D6Pers, D7Pers+Indy, VisualStudio Express
BeitragVerfasst: Di 28.06.05 13:20 
user profile iconretnyg hat folgendes geschrieben:
scheint ein bug zu sein... seit dem letzten update der forensoftware sind mir schon 3 aufgefallen, z.b. vorher beim quoten hat der die backslashes nicht übernommen, und antworten vom virtuellen ansprechpartner sind krass fehl-formatiert

Ich find' die Bugliste nicht... Steht das da schon drin? :gruebel:
retnyg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2754

SNES, GB, GBA, CPC, A500, 486/66, P4/3.0HT: NintendOS, AmigaOS, DoS
Delphi 5, Delphi 7
BeitragVerfasst: Di 28.06.05 13:34 
user profile iconWeBsPaCe hat folgendes geschrieben:
user profile iconretnyg hat folgendes geschrieben:
scheint ein bug zu sein... seit dem letzten update der forensoftware sind mir schon 3 aufgefallen, z.b. vorher beim quoten hat der die backslashes nicht übernommen, und antworten vom virtuellen ansprechpartner sind krass fehl-formatiert

Ich find' die Bugliste nicht... Steht das da schon drin? :gruebel:

ich hab den virtuellen ansprechpartner schon drauf aufmerksam gemacht

Moderiert von user profile iconraziel: Externes Smilie wegen Unerreichbarkeit entfernt.

_________________
es gibt leute, die sind genetisch nicht zum programmieren geschaffen.
in der regel haben diese leute die regel...