Board index » delphi » So what are the IDE rules for opening inherited forms?

So what are the IDE rules for opening inherited forms?


2004-01-13 04:39:28 PM
delphi141
I have constant problems opening inherited forms in the IDE and getting the
"ancestor for XXX not found" error when the ancestor form is not already
open in the IDE. I am currently using Delphi 7 but this happened with D5 too. The
thing is this doesn't happen consistently. I have some projects where it
never happens. I have some forms in a single project where it doesn't happen
but other forms do. All the inherited forms have the "inherited" keyword at
the top of the DFM. I have tried listing ancestor form units in order in the
DPR. There *must* be some rhyme or reason for when the IDE wants the
ancestor form already opened and when it doesn't.
--
Steve Troxell
 
 

Re:So what are the IDE rules for opening inherited forms?

All the files that contain ancestor forms must appear in the .dpr file in
the form:
uAncestorForm in 'uAncestorForm.pas' {FrmAncestor},
Regards,
--
Eyal Post
EPocalipse Software
---------------------------------
"Steve Troxell" <XXXX@XXXXX.COM>writes
Quote
I have constant problems opening inherited forms in the IDE and getting
the
"ancestor for XXX not found" error when the ancestor form is not already
open in the IDE. I am currently using Delphi 7 but this happened with D5 too.
The
thing is this doesn't happen consistently. I have some projects where it
never happens. I have some forms in a single project where it doesn't
happen
but other forms do. All the inherited forms have the "inherited" keyword
at
the top of the DFM. I have tried listing ancestor form units in order in
the
DPR. There *must* be some rhyme or reason for when the IDE wants the
ancestor form already opened and when it doesn't.

--
Steve Troxell


 

Re:So what are the IDE rules for opening inherited forms?

EPocalipse Software writes:
Quote
All the files that contain ancestor forms must appear in the .dpr
file in the form:
They are.
 

Re:So what are the IDE rules for opening inherited forms?

Then you should make sure that the names of the forms as they appear in the
.dpr are correct and that the path is correct too. Easiest way to do that is
to stand on the name of the unit (in the .dpr) and press ctrl+enter.
I had this problem too - and once the .dpr contained all the necessary
references everything worked perfectly.
Also, When you open a form and it gives you an error message "Error creating
form, Ancestor for 'TXXXForm' not found" see if this form appears in the
.dpr with the correct name (i.e. something like {XXXForm: TForm}) - the IDE
actually parses the .dpr comments.
Regards,
--
Eyal Post
EPocalipse Software
---------------------------------
"Steve Troxell" <XXXX@XXXXX.COM>writes
Quote
EPocalipse Software writes:
>All the files that contain ancestor forms must appear in the .dpr
>file in the form:

They are.


 

Re:So what are the IDE rules for opening inherited forms?

EPocalipse Software writes:
Quote
Also, When you open a form and it gives you an error message "Error
creating form, Ancestor for 'TXXXForm' not found" see if this form
appears in the .dpr with the correct name (i.e. something like
{XXXForm: TForm}) - the IDE actually parses the .dpr comments.
Yeah, I knew the DPR comments were part of the process and I thought I had
checked them closely but apparently I have glossed over a single character
omission from some form renames. That seems to be the trouble. I just
didn't look closely enough at those comments.
Thanks for your help
--
Steve Troxell