So I have this class hierarchy:
IBlah = interface
procedure Foo;
end;
TBlahFrame = class(TFrame, IBlah)
procedure Foo; virtual; abstract;
end;
TBlahFrameClass = class of TBlahFrame;
and I'm using it like so
// frame file
TFrame1 = class(TBlahFrame)
//...
procedure Foo; override;
end;
// form
procedure Inject(FrameClass: TBlahFrameClass);
begin
FSlot := FrameClass.Create(self);
FSlot.Foo;
end;
And it works perfectly.
But the problem is that whenever I close and reopen `TFrame1`'s file, it tries to convert it into being a form.
The only way to change it back to being a frame is to switch the frame's superclass back to TFrame and reopen it again.