C++ Builder IDE >> code bug created after migrating from bcb 3.0 to 6.0

by joel Guerra » Wed, 08 Oct 2003 05:28:54 GMT

I have the following structures, they work in BCB 3.0. After migrating, I noticed that the AnsiString get Null'd out after
the form create section....I can trace my code and see it initialized properly, but once the form pops up, the ansistrings values are null, but integer values are still good.

Any idea on tracing the values or why the ansistring values
might be getting stepped on?

Thanks,
Joel


struct QueMotorsStruct
{
int MotorId;
long MotorPreset;
int MotorSpeed;
int MotorRamp;
};

struct QueStruct
{
AnsiString QueName;
AnsiString QueText;
AnsiString QueConfirm;
int QueMotorCount;
QueMotorsStruct QueMotors[NumMotors];\\nummotors=32
} ;


struct ShowStruct
{
String ShowName;
int CrestronId;
int QueCount;
QueStruct Ques[MaxQues];\\Max ques =50
} Show[MaxShows];\\maxshows = 50





C++ Builder IDE >> code bug created after migrating from bcb 3.0 to 6.0

by Remy Lebeau (TeamB) » Wed, 08 Oct 2003 05:45:42 GMT






form create section....

Are you referring to the OnCreate event? If so, then you should not be
using that event at all. It has been broken since BCB 4. It executes
before the constructor, which is illegal in C++. Use the contructor instead
for any initializations that you need to do.


Gambit





Similar Threads

1. Why? code bug created after migrating from bcb 3.0 to 6.0

that is exactly my problem..., but why does it still work for the integers?  I am not familiar with using the constructors, where do I put my initializing code?

thanks again,
Joel


"Remy Lebeau \(TeamB\)" < XXXX@XXXXX.COM > wrote:
>
>"joel Guerra" < XXXX@XXXXX.COM > wrote in message
>news:3f833016$ XXXX@XXXXX.COM ...
>
>> After migrating, I noticed that the AnsiString get Null'd out after the
>form create section....
>
>Are you referring to the OnCreate event?  If so, then you should not be
>using that event at all.  It has been broken since BCB 4.  It executes
>before the constructor, which is illegal in C++.  Use the contructor instead
>for any initializations that you need to do.
>
>
>Gambit
>
>

2. Thanks! Why? code bug created after migrating from bcb 3.0 to 6.0 - C++ Builder IDE

3. Bug From BCB 4.0 in BCB 6.0

4. Problems in Migrating the Application code from Win CE 3.0 to - Windows CE

5. Problems in Migrating the Application code from Win CE 3.0 to WinC

Hi,
I had a application written in eVC++ 3.0 running on Win CE 3.0.
This application had 14 dlls and 3 exe.

I upgarded the same old  device with new OS Win CE 4.2.
I recomplied the code in eVC++ 4.0 and compilation happened  without any 
problems.
Now when I testing the appication on the new OS I seeing variance in 
behaviour  in many  UI screens , the  buttons are pushed towards the lower 
edge,  some cases I am getting FAEs and in some cases screen freezes.  This 
appication  was working fine on Win CE 3.0.

Are these problems because of so backward compatibility issues?
Are these problems because of change of memory map of the OS and the way 
dlls are loaded?

Please let me know where I can find details for migrating the code to new OS.

The largest dll of my application is 750 KB.

Do I need to do any design change to achieve the migration of application 
from Win Ce 3.0 to win Ce 4.2?

My application also uses GSM / GPRS api , ras dailing . etc.


6. try/catch unreachable code C2407 migrating from vs 6.0 to vs 7.1 .NET