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)
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!
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 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.
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.
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.
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.
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.