Imagine you derive your own control from TComponent and create a constructor
Create(AOwner: TComponent); but don't make it virtual. When you test your
component (X := TMyComponent.Create(Nil)) it works. But when you drop an
instance on a form, your constructor doesnt get called - the virtual method
in the base class does. I think you get a warning about this now though.

A more likely problem though is not calling inherited Create(AOwner) (from a
virtual constructor or not). This seems to work at runtime, but mucks up the
IDE if the component is used on a form at design time. I've done this one
and got AV errors when saving or closing forms. I'd check the destructors of
components too, to ensure that they call inherited Destroy too.
Regards,
  Andrew.

> -----Original Message-----
> From: Nahum Wild [SMTP:[EMAIL PROTECTED]]
> Sent: Friday, May 28, 1999 3:01 PM
> To:   Multiple recipients of list delphi
> Subject:      RE: [DUG]:  Delphi 4 DFM designtime AVs - URGENT.
> 
> Could be, what is the significance constructor not being virtual?
> 
> -----Original Message-----
> From: Cooke, Andrew [mailto:[EMAIL PROTECTED]]
> Sent: Friday, 28 May 1999 14:50
> To: Multiple recipients of list delphi
> Subject: RE: [DUG]: Delphi 4 DFM designtime AVs - URGENT.
> 
> 
> Could be a problem with a constructor or destructor - something not
> calling
> inherited, or perhaps a non-virtual constructor?
> 
> > -----Original Message-----
> > From:       Nahum Wild [SMTP:[EMAIL PROTECTED]]
> > Sent:       Friday, May 28, 1999 2:43 PM
> > To: Multiple recipients of list delphi
> > Subject:    RE: [DUG]:  Delphi 4 DFM designtime AVs - URGENT.
> > 
> > If that is the problem then it would be with native delphi stuff as I
> just
> > use standard published properties.  Lets hope not.  Could be just the
> > general complexity of the form?
> > 
> > > -----Original Message-----
> > > From:     [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> > > Sent:     Friday, 28 May 1999 14:40
> > > To:       Multiple recipients of list delphi
> > > Subject:  RE: [DUG]:  Delphi 4 DFM designtime AVs - URGENT.
> > > 
> > > I would first look for components that write their own properties out
> > > using TFiler (Define Properties etc). , as I would suspect that an AV
> is
> > > getting thrown at this stage.
> > > 
> > > There should be no problem with Delphi just reading standard published
> > > props and writing them to the file. 
> > > 
> > >   -----Original Message-----
> > >   From:   Nahum Wild [SMTP:[EMAIL PROTECTED]]
> > >   Sent:   Friday, May 28, 1999 2:27 PM
> > >   To:     Multiple recipients of list delphi
> > >   Subject:        RE: [DUG]:  Delphi 4 DFM designtime AVs - URGENT.
> > > 
> > >   Yep I do have my own components on the form.  Lots and lots of
> > > components on
> > >   these two forms.  I already have slated down on the 'to do' list to
> > > redo
> > >   these forms so that they consist of a main form with a number of
> > > embedded
> > >   forms instead of just one form with heaps of controls on it.  Doing
> > > that
> > >   will at least eliminate a potential cause or two.  It may even help
> > > to show
> > >   if a particular component of mine has kicked the bucket or not.
> > > 
> > >   In terms of reading in the form file, dephi can do that fine, but
> > > its the
> > >   saving aspect that it has the problem with.  I can still manipulate
> > > the form
> > >   in the IDE just fine. Corruption is a main suspicion.  But it does
> > > not seem
> > >   right as I can go to a backup that was working fine and it then has
> > > the same
> > >   problems!   This makes it look like something has changed in my
> > > system setup
> > >   that is doing this to previously fine DFM files.
> > > 
> > >   I have to wait till tonight before I can fiddle with the resource
> > > explorer.
> > > 
> > >   Food for thought.
> > >   Thanks
> > > 
> > > 
> > >   Nahum
> > > 
> > >   > -----Original Message-----
> > >   > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> > >   > Sent: Friday, 28 May 1999 08:42
> > >   > To:   Multiple recipients of list delphi
> > >   > Subject:      RE: [DUG]:  Delphi 4 DFM designtime AVs - URGENT.
> > >   > 
> > >   > Have you got your own components on the Form?
> > >   > Sounds like a streaming problem - Delphi Can't read in the Form
> > > file and
> > >   > get it match with you components.
> > >   > 
> > >   > The other alternative is that form file is actually corrupt (This
> > > is
> > >   > perhaps more likely).
> > >   > 
> > >   > Do you have an earlier working version? - You could use the Delphi
> > >   > Resource explorer and export the Form details using this and then
> > >   > re-construct this into a valid .DFM 
> > >   > 
> > >   > Myles.
> > >   > 
> > >   >       -----Original Message-----
> > >   >       From:   Nahum Wild [SMTP:[EMAIL PROTECTED]]
> > >   >       Sent:   Thursday, May 27, 1999 9:19 PM
> > >   >       To:     Multiple recipients of list delphi
> > >   >       Subject:        [DUG]:  Delphi 4 DFM designtime AVs -
> > > URGENT.
> > >   > 
> > >   >       I've got a problem with a couple of DFM files that D4 is
> > > suddenly,
> > >   > and for
> > >   >       no apparent reason, spitting at.  A number of things are
> > > happening :
> > >   > 
> > >   >       I get the following message when I try to compile with
> > > either of
> > >   > them open
> > >   >       in the IDE -
> > >   >       [Error] RLINK32: Error opening file
> > > "Forms\PlanetPageForm.DFM" and
> > >   >       [Error] RLINK32: Error opening file "Forms\ShipPageForm.DFM"
> > >   >       But never both at once.  But if they are not open in the IDE
> > > the
> > >   > project
> > >   >       compiles just fine.  I checked the help on the error and it
> > > said
> > >   > contact
> > >   >       Borland, but I thought I'd post here as well.
> > >   > 
> > >   >       Whenever I make a change to the forms layout and try to save
> > > it I
> > >   > get an AV,
> > >   >       but any changes made to the pas are saved.  I cannot view
> > > the DFM
> > >   > text in
> > >   >       the delphi IDE because I get the same AV.
> > >   > 
> > >   >       I went to an earlier version of the project that was working
> > > when I
> > >   > made the
> > >   >       backup, but the problem persists.  I've reinstalled D4, no
> > > change
> > >   > (Although
> > >   >       I did export my reg settings before the uninstall and
> > > reimported
> > >   > them after
> > >   >       the install).  I've tried the project on another PC, same
> > > problems.
> > >   > I've
> > >   >       even done a scandisk and defrag, problem still there.
> > >   > 
> > >   >       Both are reasonable sized DFM files, 42k
> > > (PlanetPageForm.DFM) and
> > >   > 27k
> > >   >       (ShipPageForm.DFM).  The biggest in my app by far.  But they
> > > have
> > >   > been that
> > >   >       size for months without problems.  It's really bizarre
> > > because I had
> > >   > not
> > >   >       worked on the PlanetPageForm for a few days and suddenly it
> > > throws
> > >   > these AVs
> > >   >       at me without having touched it!!
> > >   > 
> > >   >       My system specs are not lacking in any way, Win98 on a
> > > PII266, 256mb
> > >   > ram,
> > >   >       1.23gb free on the projects drive.  I have D4 with up to and
> > >   > including the
> > >   >       third patch.  Currently no third party components / apps
> > > installed
> > >   > into
> > >   >       delphi.  I know that NT4 is the perferred choice in
> > > development
> > >   > platform but
> > >   >       at the moment it's not a option - no multi monitor support.
> > >   > 
> > >   >       These two forms form the entire basis of the application (or
> > > game as
> > >   > you may
> > >   >       have guessed by now) and as a result the games development
> > > has
> > >   > ground to a
> > >   >       halt.  (I'm currently going nuts cause I can't work on it.)
> > >   > 
> > >   >       Anyone know anything about this type of problem?? Thanks in
> > > advance
> > >   > for any
> > >   >       advice / help.
> > >   > 
> > >   > 
> > >   >       PS. I work on this as my night job (Swichtec during the day)
> > > So
> > >   > responses
> > >   >       from me won't be immediate.
> > >   > 
> > >   >       Nahum Wild
> > >   >       Software Developer
> > >   >       Realism
> > >   > 
> > >   > 
> > >   >       
> > >   >
> > >
> >
> --------------------------------------------------------------------------
> > >   > -
> > >   >           New Zealand Delphi Users group - Delphi List -
> > >   > [EMAIL PROTECTED]
> > >   >                         Website: http://www.delphi.org.nz
> > >   
> > >
> >
> --------------------------------------------------------------------------
> > > -
> > >       New Zealand Delphi Users group - Delphi List -
> > > [EMAIL PROTECTED]
> > >                     Website: http://www.delphi.org.nz
> >
> --------------------------------------------------------------------------
> > -
> >     New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
> >                   Website: http://www.delphi.org.nz
> --------------------------------------------------------------------------
> -
>     New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
>                   Website: http://www.delphi.org.nz
> --------------------------------------------------------------------------
> -
>     New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
>                   Website: http://www.delphi.org.nz
---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to