|
ID: 20376, The OldCreateOrder property value flips
Summary: When inheriting from forms the OldCreateOrder property sometimes flips from false to true after closing the file and opening it again.
|
Download
| Details
|
|
FTP
download also available
|
0 bytes |
CDN Login Required to Download. (You will be redirected to the login page if you click on the Download Link)
|
To download this, you must have registered:
|
For C++Builder, Version 5.0
to 5.0
6 downloads
Copyright: No significant restrictions
Size: 0 bytes
Updated on Wed, 30 Jul 2003 09:40:10 GMT
Originally uploaded on Wed, 30 Jul 2003 09:38:01 GMT
|
|
Description
|
Description: In BCB5, when inheriting from forms the OldCreateOrder property sometimes flips from false to true after closing the file and opening it again.
This fact leads to OnCreate and OnShow event handlers run before the form's constructor had been executed and necessary member objects had been initialized.
Workaround could be to override the ReadState method in your base-form and make sure OldCreateOrder is always set to false. This ensures that FormCreate and FormDestroy will be called AfterConstruction and BeforeDestruction.
class TBaseForm : public TForm
{
__published: // Whatever
private: // Whatever
protected:
virtual void __fastcall ReadState(Classes::TReader* Reader);
public: // Whatever
__fastcall TBaseForm(TComponent* Owner);
};
void __fastcall TBaseForm::ReadState(Classes::TReader* Reader)
{
TForm::ReadState(Reader); // Call inherited Method
OldCreateOrder = false; // Set value to false
}
|
|

Server Response from: ETNACDC03
|
Connect with Us