Thread View: borland.public.cppbuilder.migration
2 messages
2 total messages
Started by Mike Heneghan
Fri, 18 Mar 2005 17:57
BCB3 to BCB6
Author: Mike Heneghan
Date: Fri, 18 Mar 2005 17:57
Date: Fri, 18 Mar 2005 17:57
7 lines
1668 bytes
1668 bytes
Hi, I developed a program with BCB3 educational version. I purchased BCB6 non-educational version so I can distribute the software. When I build and run the program I get run time errors. When a button is pressed in a visible form, a new form is dynamically created and a run time error occures at this point. I have used trace to follow the problem. When the button is pushed the code jumps to the constructor for the new form. Then it jumps to some Borland inline functions and them back to the new form, but not to the constructor. All of the code in the constructor is skipped and the program jumps to the FormCreate method. Since variables are not initialized in the constructor, death occurs in FormCreate when those variables are used. Any thoughts on how to do the migration from BCB3 to BCB6 properly? Thanks, Mike
Re: BCB3 to BCB6
Author: Remy Lebeau (TeamB)
Date: Fri, 18 Mar 2005 18:45
Date: Fri, 18 Mar 2005 18:45
15 lines
1536 bytes
1536 bytes
"Mike Heneghan" <heneghan@astound.net> wrote in message news:423b16a6$1@newsgroups.borland.com... > All of the code in the constructor is skipped and the > program jumps to the FormCreate method. NEVER NEVER NEVER use the OnCreate event to begin with! For exactly the reason you have seen - the OnCreate event can be triggered BEFORE the constructor, which is illegal in C++. Put all of your code in the actual constructor instead. Also, stay away from the OnDestroy event, as it can be triggered after the destructor, which is also illegal in C++. Gambit
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads