Foros Club Delphi

Foros Club Delphi (https://www.clubdelphi.com/foros/index.php)
-   OOP (https://www.clubdelphi.com/foros/forumdisplay.php?f=5)
-   -   Problemas con TStrings (https://www.clubdelphi.com/foros/showthread.php?t=16105)

1501 16-11-2004 02:32:51

Problemas con TStrings
 
Hola a todos:

Alguien me podría dar una mano con este error que no se como solucionar. gracias.

[Warning] ManejoArchivos.pas(335): Constructing instance of 'TStrings' containing abstract method 'TStrings.Clear'
[Warning] ManejoArchivos.pas(335): Constructing instance of 'TStrings' containing abstract method 'TStrings.Delete'
[Warning] ManejoArchivos.pas(335): Constructing instance of 'TStrings' containing abstract method 'TStrings.Insert'


328 var
329 Reg: TRegistry;
330 NDeKeys: TStrings;
331 RegkInf: TRegKeyInfo;

333 begin
334 Reg:= TRegistry.Create;
335 NDeKeys:= TStrings.Create;
336 Reg.RootKey:= RootK;
337 Reg.OpenKeyReadOnly(KeyPadre);
338 Reg.GetKeyInfo(RegKInf);
339 Reg.GetKeyNames(NDeKeys); <------ Acá me da error
. ---------------------------
. Debugger Exception Notification
. ---------------------------
. Project Projecto.exe raised exception
. class EAbstractError
. with message 'Abstract Error'.
. Process stopped.
. Use Step or Run to continue.
.
.
.
.
end;

roman 16-11-2004 03:06:53

Sencillo: TStrings es una clase con métodos abstractos que no debe instanciarse. TStrings es sólo la clase base que implementa la funcionalidad mínima para una lista de cadenas pero deja mucho trabajo a los descendientes. En su lugar usa un TStringList.

// Saludos

1501 19-11-2004 03:36:04

gracias
 
Cortita y al toque, gracias.


La franja horaria es GMT +2. Ahora son las 11:33:53.

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