Приветствую,
В Delphi 9 в класс TReader внесли оченб ваное для меня событие - OnFindComponentInstanceEvent. Так как можно (или кому написать) чтоб ьакое же изменение внесли в FCL.
Всего несколько строк кода:
файл - classesh.inc
...
interface
....
TFindComponentInstanceEvent = procedure (Reader: TReader; const Name: string;
var Instance: Pointer) of object;
...
TReader = class(TFiler)
private
FOnFindComponentInstance: TFindComponentInstanceEvent;
...
public
...
property OnFindComponentInstance: TFindComponentInstanceEvent read FOnFindComponentInstance write FOnFindComponentInstance;
end;
....
файл reader.inc
....
procedure TReader.DoFixupReferences;
...
Target := FindNestedComponent(CurFixup.FInstanceRoot, CurName);
> тут вставить эту строчку
if (Target = nil) and Assigned(FOnFindComponentInstance) then
FOnFindComponentInstance(Self, CurName, Target);
> конец вставки
....