Foros Club Delphi

Foros Club Delphi (https://www.clubdelphi.com/foros/index.php)
-   Varios (https://www.clubdelphi.com/foros/forumdisplay.php?f=11)
-   -   Alguien tiene el metodo valuefromindex de TStringList en Delphi 6??? (https://www.clubdelphi.com/foros/showthread.php?t=69838)

kelko27 13-09-2010 13:55:29

Alguien tiene el metodo valuefromindex de TStringList en Delphi 6???
 
Pues eso...estoy instalando glscene y no me compila por q no encuentra el metodo valuefromindex de TStringList....

Neftali [Germán.Estévez] 13-09-2010 15:57:04

Es una que me construí hace tiempo para salir del paso, por tener el mismo problema que tú:

Código Delphi [-]
function ValueFromIndex(TS:TStrings; Index: Integer): string;
var
  Str:String;
begin
  if Index >= 0 then begin
    Str := TS[Index];
    Result := Copy(Str, Length(TS.Names[Index]) + 2, MaxInt);
  end
  else begin
    Result := '';
  end;
end;

En mi caso, cuando la sustituyo por la existente utilizo DEFINES más o menos así:

Código Delphi [-]
              {$IFDEF VER140}
                MiProc(Campo1, ValueFromIndex(ListaC, Indice));   //D6
              {$ELSE}
                MiProc(Campo1, ListaC.ValueFromIndex [Indice]);   //D7
              {$ENDIF}

kelko27 13-09-2010 16:02:58

Muchas gracias....aunque estoy viendo q el problema no es solamente ese. Estoy instalando la GLScene y lo del valuefrom index lo solucione mas o menos como me decias pero ahora me falla en mas sitios....es como si el paquete pare delphi6...fuera el de delphi7...es muy raro.


La franja horaria es GMT +2. Ahora son las 22:45:08.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi