Home > Back-end >  After modify Application, each component in the BPL have to manually parent:=nil, what should I do?
After modify Application, each component in the BPL have to manually parent:=nil, what should I do?

Time:11-12

Environment is the Delphi 7 + XP, problems of some related situation is as follows:
1, you need to do some preliminary operation before the program starts, I have modified the Application (Controls. Pas), so the project cannot build with the VCL,
2, the newly built the BPL, contains some custom TNewFrame, inherited from TFrame, through similar to the following function to join the program interface
 
The function build (c: TWinControl) : TNewFrame;
//...
The begin
F:=TNewFrame. Create (c);
F.P arent:=c;//- & gt; This leads to the AV
Result:=f;
end;

Export build;


The question is: will shut down the AV, there are two approach tested not AV
1, the program before the closing f.P arent:=nil, not AV; So every custom components to the parent:=nil,
2, build with the VCL, AV, but this will not be able to modify the Application

Excuse me what method, can modify the Application, without the parent:=nil

PS: my Delphi VCL July only DCP, no DPK, unable to build,
  • Related