Hi all,
First off, I use Delphi 6 upd pack 2 on WinXP.
I've been programming in Delphi for over a decade now. Up until recently, I used to include everything the project needed in the project source. One day I decided to make my own library(ies) for obvious reasons.
I started by making a TfrmMDIAppMain = class(TForm), a common ancestor for all my MDI apps' mainforms. I added its location at the Library Path in Tools->Env.Options->Library.
As a second step, I created a test project with TfrmMDIAppDescMain = class(TfrmMDIAppMain) as its main form. The project compiled ok, even though TfrmMDIAppMain's unit was not included in the project. But the next time I opened the project and doubleclicked on TfrmMDIAppDescMain, I got "Error creating form: Ancestor for 'TfrmMDIAppDescMain' not found". The source file is opened but the form cannot be displayed.
Now, if I open TfrmMDIAppMain in the editor (which by the way works by right-clicking it in the editor and selecting Find Declaration) and reopen its descendant, everything is fine and the form displays correctly.
After adding the parent's path to every possible (environment and project) path I came to the conclusion that, in order for the error not to appear, one has to either add the parent form in the project or have the parent form opened before the descendant.
Is there any way to solve this? I mean, what's the use of a library path / project search path if the IDE can't utilize it?
Thanx
First off, I use Delphi 6 upd pack 2 on WinXP.
I've been programming in Delphi for over a decade now. Up until recently, I used to include everything the project needed in the project source. One day I decided to make my own library(ies) for obvious reasons.
I started by making a TfrmMDIAppMain = class(TForm), a common ancestor for all my MDI apps' mainforms. I added its location at the Library Path in Tools->Env.Options->Library.
As a second step, I created a test project with TfrmMDIAppDescMain = class(TfrmMDIAppMain) as its main form. The project compiled ok, even though TfrmMDIAppMain's unit was not included in the project. But the next time I opened the project and doubleclicked on TfrmMDIAppDescMain, I got "Error creating form: Ancestor for 'TfrmMDIAppDescMain' not found". The source file is opened but the form cannot be displayed.
Now, if I open TfrmMDIAppMain in the editor (which by the way works by right-clicking it in the editor and selecting Find Declaration) and reopen its descendant, everything is fine and the form displays correctly.
After adding the parent's path to every possible (environment and project) path I came to the conclusion that, in order for the error not to appear, one has to either add the parent form in the project or have the parent form opened before the descendant.
Is there any way to solve this? I mean, what's the use of a library path / project search path if the IDE can't utilize it?
Thanx