Recent

Author Topic: Can't load because <x> depends on itself  (Read 831 times)

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 10942
  • FPC developer.
Can't load because <x> depends on itself
« on: May 27, 2023, 05:31:36 pm »

What is the cause for the above message  ?

It happens when loading a deeply nested VFI frame, but I don't know what cause to look for?

jamie

  • Hero Member
  • *****
  • Posts: 5708
Re: Can't load because <x> depends on itself
« Reply #1 on: May 28, 2023, 12:33:38 am »
Excuse my ignorance but, what is a VFI frame ?
The only true wisdom is knowing you know nothing

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 10942
  • FPC developer.
Re: Can't load because <x> depends on itself
« Reply #2 on: May 28, 2023, 12:56:43 am »
VFI = visual form/frame inheritance, i.e. inherited designer frames.

I'm doing a annual/semi annual attempt at compiling my work delphi codebases.

Contrary to last year I'm going for the main and biggest codebase, and with minimal changes.

The current problems are this, and the missing of TDirectoryListBox.
« Last Edit: May 28, 2023, 12:58:32 am by marcov »

Thaddy

  • Hero Member
  • *****
  • Posts: 13213
Re: Can't load because <x> depends on itself
« Reply #3 on: May 28, 2023, 07:02:45 am »
TDirectoryListBox should not give you any problems (easy by your standards  8-)), simply write it.
VFI is something I had problems with long time ago (ownership) and I even forbode its use in production, although I did allow frames and frame inheritance because with frames the owner is always its parent and predictable. That is not the case with - complex - form inheritance.
With frames, the controls it contains have the correct parent and the frame itself disappears at compile time, this is not the case with form inheritance, which is actually compiled in. I thought you would know that.
« Last Edit: May 28, 2023, 07:14:32 am by Thaddy »
I actually get compliments for being rude... (well, Dutch, but that is the same)

korba812

  • Sr. Member
  • ****
  • Posts: 369
Re: Can't load because <x> depends on itself
« Reply #4 on: May 28, 2023, 12:59:27 pm »
I'm using a lot of VFI in my project, and I've noticed that from time to time after normal compilation, the form doesn't load frames or controls from lfm (form class fields are nil and I get AV when referencing them). A clean build helps in this case. Maybe this is a similar problem and a clean build will help?

Edit:
Does your problem occur at design time or at run time? My problem occurs at run time.
« Last Edit: May 28, 2023, 01:06:54 pm by korba812 »

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 10942
  • FPC developer.
Re: Can't load because <x> depends on itself
« Reply #5 on: May 28, 2023, 01:23:43 pm »
Design time.  The forms/frames use DFMs, as this is a dual use codebase for now.

The forms/frames are also not in the application directory, but in a subdir

I checked, and no .lfm's were created (something that sometimes also happens in dfm only projects)

I've retested this, and it seems it might a secondary effect. IOW if I remove the missing component in Delphi (can't in lazarus), the "can't load because ..." error seems to disappear.

So probably if a component is missing halfway of the parsing, it aborts parsing, and the subsequent incomplete state triggers the  errror
« Last Edit: May 28, 2023, 03:12:52 pm by marcov »

 

TinyPortal © 2005-2018