| Autor |
Beitrag |
muppet max
Ehemaliges Mitglied
Erhaltene Danke: 1
|
Verfasst: Mo 10.04.06 19:47
Folgende Meldung erscheint: ordinaltyp erforderlich
Der code:
Delphi-Quelltext 1: 2: 3: 4: 5: 6: 7: 8:
| if synedit1.SearchReplace(FindText, '', FindOptionsToSearchOptions(Options)) = 0 then MessageDlg('Cannot find "%s"', [FindText], '', mbError, MB_OK) else if frReplaceAll in Options then begin repeat synedit1.SelText := ReplaceText; until synedit1.SearchReplace(FindText, '', FindOptionsToSearchOptions(Options)) = 0; end; |
was mache ich falsch?
danke
|
|
Marco D.
      
Beiträge: 2750
Windows Vista
Delphi 7, Delphi 2005 PE, PHP 4 + 5 (Notepad++), Java (Eclipse), XML, XML Schema, ABAP, ABAP OO
|
Verfasst: Mo 10.04.06 19:48
In welcher Zeile?
_________________ Pascal keeps your hand tied. C gives you enough rope to hang yourself. C++ gives you enough rope to shoot yourself in the foot
|
|
muppet max
Ehemaliges Mitglied
Erhaltene Danke: 1
|
Verfasst: Mo 10.04.06 19:50
Delphi-Quelltext 1:
| MessageDlg('Cannot find "%s"', [FindText], '', mbError, MB_OK) |
|
|
Marco D.
      
Beiträge: 2750
Windows Vista
Delphi 7, Delphi 2005 PE, PHP 4 + 5 (Notepad++), Java (Eclipse), XML, XML Schema, ABAP, ABAP OO
|
Verfasst: Mo 10.04.06 19:53
_________________ Pascal keeps your hand tied. C gives you enough rope to hang yourself. C++ gives you enough rope to shoot yourself in the foot
|
|
nullplan001
      
Beiträge: 212
Win 2000 Professional, Debian Linux 4.0 (Etch,Stable)
Pascal (FreePascal 2.0.2, TurboPascal 7.0), C(++) (G++/GCC 3.4.2 + MinGW), Java (JDK 1.5.0_07), PHP (PHP 5.1.4)
|
Verfasst: Mo 10.04.06 19:54
Delphi-Quelltext 1:
| MessageDlg(Format('Cannot find "%s"', [FindText]), '', mbError, MB_OK); |
So vielleicht?
Tschö,
nullplan
_________________ Ich fahr' nicht selber, weil ich festgestellt habe: ich fahre zu emotional. Bin 180 gefahren wo 30 erlaubt war... -- Jürgen von der Lippe
|
|
Narses
      

Beiträge: 10185
Erhaltene Danke: 1261
W11x64
TP3 .. D7pro .. D10.2CE
|
Verfasst: Mo 10.04.06 19:56
Moin!
Marco D. hat folgendes geschrieben: | Delphi-Quelltext 1:
| MessageDlg('Cannot find "%s"', mterror, [mbok],0) |
Du hättest aber auch mal in die Hilfe schauen können  |
Damit erreicht er aber nicht sein Ziel, denn der String wird nicht mit ausgegeben.  Aber mit dem Nörgler haste schon recht...
Probier das mal so:
Delphi-Quelltext 1:
| MessageDlg('Cannot find '+FindText, mtError, [mbOk],0); |
cu
Narses
_________________ There are 10 types of people - those who understand binary and those who don´t.
|
|
Marco D.
      
Beiträge: 2750
Windows Vista
Delphi 7, Delphi 2005 PE, PHP 4 + 5 (Notepad++), Java (Eclipse), XML, XML Schema, ABAP, ABAP OO
|
Verfasst: Mo 10.04.06 19:58
Wer oder was ist denn FindText? Ich dachte irgendein Paramter 
_________________ Pascal keeps your hand tied. C gives you enough rope to hang yourself. C++ gives you enough rope to shoot yourself in the foot
|
|
Narses
      

Beiträge: 10185
Erhaltene Danke: 1261
W11x64
TP3 .. D7pro .. D10.2CE
|
Verfasst: Mo 10.04.06 20:03
Moin!
Marco D. hat folgendes geschrieben: | Wer oder was ist denn FindText? Ich dachte irgendein Paramter  |
Naja, offensichtlich ist´s nicht, ich hab´s mal aus dem Kontext geraten, dass es der Text sein soll, der gesucht wird.
Warum es allerdings ein "Fehler" ist, wenn dieser nicht gefunden wurde (mtError), ist mir noch nicht ganz klar...  ich würde da eher mtWarning oder mtInformation nehmen.
cu
Narses
_________________ There are 10 types of people - those who understand binary and those who don´t.
|
|
|