Autor Beitrag
NuCHiLL
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 37

WXP
D7E
BeitragVerfasst: Mi 22.02.06 23:44 
tach auch seit langem mal wieder :D

Multilinguales Prog. Die Sprachdateien basieren auf IniFiles. Das Prinzip die CAPTIONS von SPEEDBUTTONS und LABELS aus einer INI zu lesen funktioniert, blos habe ich jetzt ein Problem mit "normalen" Strings für ShowMessage();

english.ini hat folgendes geschrieben:
[...]
stri1=text
stri2=text
[...]


ausblenden Delphi-Quelltext
1:
ShowMessage(stri2);					


Bei diesem source
ausblenden Delphi-Quelltext
1:
2:
3:
4:
for i := 1 to 7 do 
  begin 
    stri + inttostr(i) := ini.ReadString('trans', 'stri' + inttostr(i), '');
  end;

bekomm ich folgende Fehlermeldung:
Zitat:
Left side cannot be assigned to


Gibts ne andere Möglichkeit das Problem zu lösen? Sollte aber mit Inis realisierbar sein, wäre ein zu großer Akt das Ding umzuschreiben... Danke!

_________________
-I am what I am and I do what I can-
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Mi 22.02.06 23:57 
Moin!

Du kannst Variablennamen nicht so zusammensetzen, nimm ein array of String.

cu
Narses
NuCHiLL Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 37

WXP
D7E
BeitragVerfasst: Do 23.02.06 08:10 
ausblenden Delphi-Quelltext
1:
stri: array[1..7] of string;					


ausblenden Delphi-Quelltext
1:
2:
3:
4:
for i := 1 to 7 do
  begin
    stri[i]:=ini.ReadString('trans','stri'+inttostr(i),'');
  end;


ausblenden Delphi-Quelltext
1:
ShowMessage(stri[2]);					


Dankeschön! :beer:

_________________
-I am what I am and I do what I can-