Ver Mensaje Individual
  #2  
Antiguo 13-09-2010
Avatar de Neftali [Germán.Estévez]
Neftali [Germán.Estévez] Neftali [Germán.Estévez] is offline
[becario]
 
Registrado: jul 2004
Ubicación: Barcelona - Espańa
Posts: 18.276
Reputación: 10
Neftali [Germán.Estévez] Es un diamante en brutoNeftali [Germán.Estévez] Es un diamante en brutoNeftali [Germán.Estévez] Es un diamante en bruto
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}
__________________
Germán Estévez => Web/Blog
Guía de estilo, Guía alternativa
Utiliza TAG's en tus mensajes.
Contactar con el Clubdelphi

P.D: Más tiempo dedicado a la pregunta=Mejores respuestas.
Responder Con Cita