Hola sufridores. (Quizá sea yo sólo el sufridor)
Otro problema. Al tratar de compilar App's antiguas con Delphi 11 compruebo que ha cambiado el índice de las Strings para compilaciones Android.
Antes estaba basado en 0 (cero) y ahora está basado en 1 (uno)
¿Que cómo lo he descubierto?
Muy sencillo: os reproduzco los cambios necesarios para que funcione la app con Delphi 11 (Con Delphi 10.3.3 todavía funcionaba)
Código anterior, Funcionando hasta delphi 10.3.3
Código Delphi
[-]
S2 := Memo1.Text;
while S2.IndexOf(' ')<>-1 do s2:= S2.Remove(S2.IndexOf(' '),1);
s2:= S2.Replace('.',',');
EsNum := True;
for xx:=0 to S2.Length - 1
do if not CharInSet(S2[xx], ['0'..'9', ',', '-'])
then EsNum := False;
if EsNum = False then ShowMessage(S2);
Con Delphi 11 dispara el mensaje con el valor de S2
Con esta corrección ya no dispara el mensaje y toma los valores correctos:
Código Delphi
[-]
S2 := Memo1.Text;
while S2.IndexOf(' ')<>-1 do s2:= S2.Remove(S2.IndexOf(' '),1);
s2:= S2.Replace('.',',');
EsNum := True;
for xx:=1 to S2.Length
do if not CharInSet(S2[xx], ['0'..'9', ',', '-'])
then EsNum := False;
if EsNum = False then ShowMessage(S2);
ESTO ME OBLIGA A REVISAR CUALQUIER APP ANTERIOR SI LA COMPILO CON DELPHI 11
¿Alguien puede decirle a Embarcadero que
ésto no debe hacerse?
Saludos a todos