Witam! Nie wiem dlaczego, ale przy użyciu tej klasy w innej klasie, gdy wywołuje
errorProvider.Create;
wywala mi błąd
Access Violation at...
i po breaku wskazuje na:
Self.controlsList := TObjectList<TControl>.Create;
Poniżej cały kod.
unit ErrorProvider;
interface
uses
Winapi.Windows, Winapi.Messages, System.Generics.Collections , System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls;
type
PErrorsProvider = class
private
controlsList: TObjectList<TControl>;
messagesList: TStringList;
published
constructor Create();
end;
implementation
constructor PErrorsProvider.Create();
begin
Self.controlsList := TObjectList<TControl>.Create;
Self.messagesList := TStringList.Create;
end;
end.
dodanie znacznika <code class="delphi">
- @furious programming