Knowledgebase: IDE
7.x: "No frames are available to insert" after enabling EurekaLog in the project
Posted by Aleksandr Alekseev on 22 December 2020 18:37

Problem:

I am getting the "No frames are available to insert" error when I am trying to insert a frame on the form after I have enabled EurekaLog for my project with frames.

 

Reason: 

Unfortunately, this is a bug in IDE.

EurekaLog uses the official OpenTools API (OTA) to integrate with IDE. When you are enabling EurekaLog for your project - EurekaLog edits .dpr file to insert units and this confuses IDE.

Specifically, IDE offers IOTASourceEditor interface, which has CreateWriter method to obtain a IOTAEditWriter interface. EurekaLog uses methods of IOTAEditWriter interface to edit content of .dpr file (basically, this is just a series of .DeleteTo and .Insert). Apparently this is somehow forces IDE to corrupt .dproj file.

 

Solution:

Once you have enable EurekaLog for your project - close your IDE and open .dproj file in any text editor. Search for name of your frame. You should find something like this:

    <ItemGroup>
        <DelphiCompile Include="$(MainSource)">
            <MainSource>MainSource</MainSource>
        </DelphiCompile>
		...
        <DCCReference Include="UnitFrame.pas">
            <Form>Frame1</Form>
            <DesignClass>TFrame</DesignClass>
        </DCCReference>
		...
    </ItemGroup>

Add the FormType tag like this:

    <ItemGroup>
        <DelphiCompile Include="$(MainSource)">
            <MainSource>MainSource</MainSource>
        </DelphiCompile>
		...
        <DCCReference Include="UnitFrame.pas">
            <Form>Frame1</Form>
            <FormType>dfm</FormType>
            <DesignClass>TFrame</DesignClass>
        </DCCReference>
		...
    </ItemGroup>

Please note that the order of tags are important.

Repeat these steps for each frame in your project.

Save changes and reopen your project in IDE. It should work as expected now.


Help Desk Software by Kayako Resolve