Autor Beitrag
muppet max
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Mo 10.04.06 19:47 
Folgende Meldung erscheint: ordinaltyp erforderlich

Der code:
ausblenden 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.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2750

Windows Vista
Delphi 7, Delphi 2005 PE, PHP 4 + 5 (Notepad++), Java (Eclipse), XML, XML Schema, ABAP, ABAP OO
BeitragVerfasst: 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



BeitragVerfasst: Mo 10.04.06 19:50 
ausblenden Delphi-Quelltext
1:
 MessageDlg('Cannot find "%s"', [FindText], '', mbError, MB_OK)					
Marco D.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2750

Windows Vista
Delphi 7, Delphi 2005 PE, PHP 4 + 5 (Notepad++), Java (Eclipse), XML, XML Schema, ABAP, ABAP OO
BeitragVerfasst: Mo 10.04.06 19:53 
ausblenden Delphi-Quelltext
1:
 MessageDlg('Cannot find "%s"', mterror, [mbok],0)					

Du hättest aber auch mal in die Hilfe schauen können :roll:

_________________
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
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
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)
BeitragVerfasst: Mo 10.04.06 19:54 
ausblenden 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
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Mo 10.04.06 19:56 
Moin!

user profile iconMarco D. hat folgendes geschrieben:
ausblenden Delphi-Quelltext
1:
 MessageDlg('Cannot find "%s"', mterror, [mbok],0)					

Du hättest aber auch mal in die Hilfe schauen können :roll:

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:
ausblenden 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.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2750

Windows Vista
Delphi 7, Delphi 2005 PE, PHP 4 + 5 (Notepad++), Java (Eclipse), XML, XML Schema, ABAP, ABAP OO
BeitragVerfasst: Mo 10.04.06 19:58 
Wer oder was ist denn FindText? Ich dachte irgendein Paramter :roll:

_________________
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
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Mo 10.04.06 20:03 
Moin!

user profile iconMarco D. hat folgendes geschrieben:
Wer oder was ist denn FindText? Ich dachte irgendein Paramter :roll:

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... :gruebel: 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.