Autor Beitrag
Torti
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 17

WinXP
D7 Prof
BeitragVerfasst: Di 01.03.05 08:42 
Hi !

Ich habe einen Webservice erstellt. Soweit so gut :lol:

Innerhalb des WS möchte ich u.a. eine größere Menge Text verwalten. Das optimale control hierfür wäre für das Memo-Feld.

Das Initialisieren des TMemo funktioniert und ich kann auch z.B. mittels der "Text"-Eigenschaft darauf zugreifen.

Jetzt bekomme ich jedoch einen Fehler, wenn ich Memo1.Lines.Add() nutzen will. Jedoch genau zu diesem Zweck möchte ich das Memo verwenden ?!

Hat einer eine Idee, warum das nicht geht ? Mir ist klar das TMemo eigentlich eine visuelle Komponente ist und ein WS nicht visuell ist. Aber ich will das gute Stück ja auch nucht anzeigen sondern nur als Text-Container nutzten.

Oder gibt es eine andere Komponente mit "Lines"-Eigenschaft die ich verwenden kann ? (Richedit hat gleichen effekt)

Gruß in einer Hoffnung auf einen guten Tipp.

Torti
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 01.03.05 15:26 
:welcome: im DelphiForum!!! :welcome:

Hier der Tipp: Schau dir mal String Listen an.. ;)

//EDIT: Vielleicht noch ein wenig Code?? :lol:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
procedure blabla;
var
text: TStrings;
begin
text := TStringList.Create;
text.Add('blabla');
end;


;)

_________________
Steht der Bauer im Gemüse, hat er später grüne Füße.
Torti Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 17

WinXP
D7 Prof
BeitragVerfasst: Mi 02.03.05 19:49 
Merci merci !!! :D

Nicht ganz 100% perfekt (TStrings syntax ist nicht ganz gleich TMemo weil "Lines" fehlt), aber damit kann ich leben und mein Problem damit ganz gut lösen.

Somit vielen Dank !

Gruß
Torti
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: Mi 02.03.05 19:54 
KP... 8)

Was meinst du mit:
Torti hat folgendes geschrieben:
TStrings syntax ist nicht ganz gleich TMemo weil "Lines" fehlt

??? :gruebel:
AXMD
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 4006
Erhaltene Danke: 7

Windows 10 64 bit
C# (Visual Studio 2019 Express)
BeitragVerfasst: Mi 02.03.05 19:56 
WeBsPaCe hat folgendes geschrieben:
KP... 8)

Was meinst du mit:
Torti hat folgendes geschrieben:
TStrings syntax ist nicht ganz gleich TMemo weil "Lines" fehlt

??? :gruebel:


Ich glaube er meint folgenden Unterschied:

ausblenden Delphi-Quelltext
1:
2:
MyTString[0] := 'Bla';
MyMemo.Lines[0] := 'Blub';


;) AXMD
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: Mi 02.03.05 20:04 
Oho, welch Klippe der Differenzen... :rofl:

Naja, egal... ;)
Torti Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 17

WinXP
D7 Prof
BeitragVerfasst: Do 03.03.05 08:09 
Wenn ich diesen Beitrag lesen würde, würde ich wohl das gleiche denken... aber

Ich habe eine fertige Win-Applikation, von der ich einen Teil auch als Webservice kapseln muss. Dieser kleine Teil umfaßt ca. 2500 Programmzeilen. Einmalig wäre die Aktion des kopierens und anpassens kein Problem, jedoch wird es in Zukunft auch noch einige Änderungen und Erweiterungen daran geben. Somit müssten 2 Quellcodes mit dem gleichem Sinn auf unterschiedliche Weise gepflegt werden.

Du wirst mir sicher recht geben, das dies der heutige Zeit und Technik nicht gerecht werden würde. :wink:

Ich hoffe ich konnte mein Problem somit rechtfertigen 8) :lol: :lol: :lol:

Aber dann werde ich auch die Win-App entsprechend anpassen und das Problem hat sich dann damir gelöst. Nur mehr Arbeit als ich eigentlich erwartet hatte. :cry:
AXMD
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 4006
Erhaltene Danke: 7

Windows 10 64 bit
C# (Visual Studio 2019 Express)
BeitragVerfasst: Do 03.03.05 12:28 
Torti hat folgendes geschrieben:
Ich hoffe ich konnte mein Problem somit rechtfertigen 8) :lol: :lol: :lol:


Kannst du nicht, wenn du Strg+R kennst :roll:

AXMD
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: Do 03.03.05 14:14 
:lol: :rofl: :lol:

Egal... ;) Jetzt bist du ja schon fertig...
Torti Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 17

WinXP
D7 Prof
BeitragVerfasst: Do 03.03.05 14:17 
ahm :?:

Sorry, kann mir da mal jemand über die Straße helfen ? :shock:
delfiphan
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2684
Erhaltene Danke: 32



BeitragVerfasst: Do 03.03.05 14:28 
Torti hat folgendes geschrieben:
TStrings syntax ist nicht ganz gleich TMemo weil "Lines" fehlt

Nur zur Vervollständigung: Dein "Lines" in Memo1.Lines ist genau ein TStrings. ;)
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: Do 03.03.05 14:30 
Versuch nochmal dein Problem, das du gehabt hast zu beschreiben und dann schau dir mal STRG-R an. ;)
Torti Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 17

WinXP
D7 Prof
BeitragVerfasst: Fr 04.03.05 08:33 
@delfiphan:

Okay, schön zu wissen. Aber die Theorie hilft mir in der Praxis (siehe 3.3. 8:09) leider nicht viel weiter.. :?


@WeBsPaCe:

:lol: :lol: :lol: .... :? :? :? .... :( :( :(

Sorry, schnall es immer noch nicht. Mal in Klartext ?
STRG+R ist im Browser ein reload oder ? Oder meinst du in Delphi oder auf dem Mond ? Kann ich jetzt gerade nicht probieren. 8)
Sprint
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 849



BeitragVerfasst: Fr 04.03.05 08:39 
Torti hat folgendes geschrieben:
Okay, schön zu wissen. Aber die Theorie hilft mir in der Praxis (siehe 3.3. 8:09) leider nicht viel weiter..

Wo liegt denn genau dein Problem? Ich sehe keins.

_________________
Ciao, Sprint.
Stübi
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 331

Win XP, Win 2000, Win ME
D5 Ent, D7 Prof, D2005 PE, C#
BeitragVerfasst: Fr 04.03.05 08:53 
Torti hat folgendes geschrieben:
Sorry, schnall es immer noch nicht. Mal in Klartext ?
STRG+R ist im Browser ein reload oder ? Oder meinst du in Delphi oder auf dem Mond ? Kann ich jetzt gerade nicht probieren. 8)

Naja ich denke Webspace meint mit Ctrl + R in Delphi, dort wird durch drücken dieser Kompination eine schöne Stringreplace für das Codefenster aufgerufen, so kann man ohne grosse Mühe viele kleine Strings auswechseln.
Ctr + R im Internetexplorer refresht (<= schreibt man das so?) wirklich die aktuelle Seite.

Die Funktion von Ctr + R auf dem Mond kenne ich auch nicht, wäre aber mal ein Versuch Wert dies herauszufinden. :lol:

Gruss Stübi

_________________
Neun von zehn Stimmen in meinen Kopf sagen, dass ich nicht verrückt sei. Die zehnte summt die Tetrismelodie.
Torti Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 17

WinXP
D7 Prof
BeitragVerfasst: Fr 04.03.05 10:08 
Okay, auf das Replace hätte man kommen sollen.

Ja, so mache ich das dann auch. Nur ist das bei ca. 2500 Codezeilen doch entweder recht zeitaufwendig oder risikoreich das da was schief läuft. Aber das wird wohl die einzig sinnvolle Lösung sein.

Bewirkt STRG+R auf dem Mond evtl. auch einen Mond-Refresh ?? Ist nur die Frage wie performant der Mond dabei ist :lol: