Здравствуйте, dymka, Вы писали:
D>Вообще в Delphi все переменные объекта ЯВЛЯЮТСЯ УКАЗАТЕЛЯМИ, т.е. получать то ничего как раз не надо.
D>
Это всё хорошо. Только есля я пользуюсь VCL. Я пользуюсь только компилятором Delphi, f bcgjkmpe. WinApi.
Создаю такой код::
unit advforms;
interface
uses
windows;
type
PForm = ^TForm;
TForm = object
Handle:HWND;
Tag:Integer;
procedure Create;
end;
TComponents = object
Links:array of PForm;
Count:integer;
end;
implementation
var
Components:TComponents;
procedure TForm.Create;
begin
with Components do
begin
inc(Count);
SetLength(Links,Count);
Links[Count]:=PForm(Self); //Ошибка!!!! Invalid typecast
end;
end;
procedure FindComponent;
begin
end;
end.
Ошибка!!!! Invalid typecast
Что я делаю не так?
Спасибо