🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.upgrade
Article #2284

Re: Upgrade 3.0 to 5.0, TForm constructor problem

#2284
From: Jeff Overcash (TeamB)
Date: Fri, 24 Mar 2000 00:00
30 lines
2104 bytes
Look at the OldCreateOrder property in the help.

David Bridges wrote:
> 
> In C++ Builder 3.0, when you have forms derived from TForm, the constructor
> always gets called before the OnCreate() event gets generated. The only
> exception was when you read a property in the constructor that caused the
> form to be "created", i.e. reading the 'Handle' property. C++ Builder
> 4.0/5.0 seems to have "fixed" this by generating the OnCreate event in the
> TForm constructor.
> 
> Anyway, here's the point of all of this: I have many forms which take
> parameters in the constructor which are stored into variables in the class.
> Then "later", in the FormCreate() function, those variables are used to do
> stuff like read tables, etc. All of this code is now broken after converting
> to 5.0 - It seems my only solution is to move all of the FormCreate() code
> into the constructors. This is a pain, but oh well...
> 
> Has anyone else had this problem and/or found a workaround for it?
> 
> P.S. Yes, I know the documentation said never to use both the constructor
> and OnCreate event to do stuff, I but chose to ignore it...

-- 
Jeff Overcash (TeamB) 
      (Please do not email me directly unless  asked. Thank You) 
If there is somebody up there could they throw me down a line.  Just a
little helping hand just a little understanding.  Just some answers to the
questions that surround me now.  If there's somebody up there could
they throw me down a line.               (Fish)
Technical Details
Message-ID: <38DC1FC9.30104372@onramp.net>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <38dc013b@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10529a,28574c7a2f9d33f6
X-Google-Attributes: gid10529a,public
From: "Jeff Overcash (TeamB)" <overcash@onramp.net>
Subject: Re: Upgrade 3.0 to 5.0,  TForm constructor problem
Date: 2000/03/24
Message-ID: <38DC1FC9.30104372@onramp.net>
X-Deja-AN: 602012896
Content-Transfer-Encoding: 7bit
References: <38dc013b@dnews>
X-Accept-Language: en
Content-Type: text/plain; charset=us-ascii
X-Trace: 24 Mar 2000 18:01:02 -0800, 157.238.169.47
Organization: TeamB
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.upgrade