Delphi IDE - Class TXXXFrame not found

Using 10.4.2 - I have a host frame that has a bunch of other frames embedded on it (on a page control on the host) at design time. After closign the project and re-opening it I see this error (multiple times, for different frames)

image

The frame in the error message is there, it’s part of the project. If I open those embbedded frames individually first, then open the host frame where they are embedded, it works fine.

The weird thing is, it doesn’t complain about all the frames, only some. As far as I can tell, there is nothing special about any of the frames, I just created them this week.

I checked the dproj and dpr, looks normal, even moved the embedded ones to before the host frame but that no difference. I check the dfm files, all the embedded frames appear correctly in the dfm.

I have tried creating test project with the same scenario but of course that works fine too! Google isn’t finding anything either. Usually this error happens in the dfm deserialization when a component is not installed… but that’s not the case here.

Any ideas?, pulling what’s left of my hair out today! :grimacing:

Unfortunately I can only say this randomly happens to me as well in a couple of 10.2 projects, some frames but not others, but always the same frames. Never seen it in 10.4, and have never managed to find a solution for 10.2…

The way this works is that you have to open the parent/inherited frame first, before opening any child frames, or any (inherited) forms using the child frames.

I gave up on registering frames in the palette when frame inheritance is involved because of trouble loading a project using them. This was a few versions ago.

I still use inheritance a lot, but now create the frames at run time. If the frame units are being automatically re-opened when the project loads I sometimes get an error to the effect that a frame didn’t load properly because the base frame was not loaded, even though it does get opened. I expect it depends on the sequence in which the units are opened. I close the frame in error (which shows the code only) and reopen it, and all is OK.

I’m not using inheritance, I’m just droping a frame on another in the IDE. Form/Frame inheritance is a nightmare to use (due to bugs).

Can you point to any doco on this?

I’ve no idea where that documentation is.

All of my knowledge are either self-taught through experimentation or learnt through the years when I worked in Borland.

I recall it happening years ago, usually after I had flipped one form into text mode to make a ‘quicker’ edit, and then flipped it back, the next time I tried to open it bang.

But you don’t seem to have done that here, or did you?

That was what I thought I was seeing at first - since I first saw the error when opening the project - but I see the same error when opening the frame after the project is loaded.

It seems nuts that you would have to open every frame that you have embedded before opening the host. I’ve used frames since they were added to delphi, and have tons of embedded frames in other projects but this is the first time I have experienced this error.

Not to make changes no, I did just to see what is going on with the dfm’s though.

Are the frames all in the same folder? And are the folders in the search path? I’ve sometimes had issues with frames from folders that I had opened manually but the IDE couldn’t find next time round.

Actually, no. I’ll try moving them all to the same folder and see if that helps

Didn’t help - I think I’ll just have to write some code to do the IDE’s job (dropping the frames on the host frame). So much for RAD :roll_eyes:

Hi

I have seen this error in one of my forms.

It says that it cannot find the TClientDataset class even though (from memory - cannot get to my code at the moment) there is a TClientDataset on the form and DataSnap.DBClient is in the uses clause.

My quick fix (temporary I hope) is to Register the class in the Initialization section of the unit.

REeards
Graeme

Surely that would only affect runtime? My issue is at design time, when opening the host frame in the IDE.

Not sure if this applies with newer versions, but on Berlin, you don’t seem to be able to drag a frame file into a project.
You have to choose project/add to project, and then choose your frame file.
If you drag it in, it’s there but it has a different icon and isn’t recognised as a frame.
Might be related.

Thanks, but these frames were created in the last few days using the IDE.

Perhaps look in the dproj file, and make sure it sees it properly.

    <DCCReference Include="frames\framFrame1.pas">
        <Form>Frame1</Form>
        <FormType>dfm</FormType>
        <DesignClass>TFrame</DesignClass>
    </DCCReference>

Yep, I did look at those, they all look fine

        <DCCReference Include="Frames\Project\ActionStudio.ActionFrame.pas">
            <Form>ActionFrame</Form>
            <FormType>dfm</FormType>
            <DesignClass>TFrame</DesignClass>
        </DCCReference>

I have seen issues like that before with projects that are upgraded.

Perhaps close delphi (or just all files maybe) and delete the .identcache, and dproj.local files
I seem to need to do that occasionally for assorted brokenness.
(Maybe also the .dsk file if you are keen)

Restarted the IDE more times than I care to count - many of them not voluntarily (IDE or compiler or debugger hanging) . Deleting the dsk, identcache (which I used to do often to get code insight working again) didn’t help. Something is quite wrong with the 10.4.2 IDE.