Home > Back-end >  To translate a little bit of Delphi code to BCB
To translate a little bit of Delphi code to BCB

Time:10-07

 
The class function TDDFVendors. GetGlobalRef: TCustomDropDownFormEh;
The begin
If DDFVendors=nil then
Application CreateForm (TDDFVendors DDFVendors);
Result:=DDFVendors;
end;

As title, thank you,,,,,
In addition, I created two forms in the CB, the main form variables declared in a child form types, an error: "Type Name Expected", for some reason? , child form is included in the header file, the main form header file is as follows:
 
//-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

# # ifndef ddf_commodity_categoryH
# define ddf_commodity_categoryH
//-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
# include "f_commodity_category. H"
# include "DBConsts. HPP
"//-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
# include "BusinessSkinForm. HPP
"# include "DBAxisGridsEh. HPP
"# include "DBGridEh. HPP
"# include "DBGridEhGrouping. HPP
"# include "DBGridEhToolCtrls. HPP
"# include "DBVertGridsEh. HPP
"# include "DynVarsEh. HPP
"# include "GridsEh. HPP
"# include "ToolCtrlsEh. HPP
"# include "DropDownFormEh. HPP
"# include "ADODataDriverEh. HPP
"# include "DataDriverEh. HPP
"# include "MemTableDataEh. HPP
"# include "MemTableEh. HPP
"//-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
The class TDdfCommodityCategory: public TCustomDropDownFormEh
{
__published://IDE - managed Components
TSplitter * Splitter1;
TPanel * Panel2.
TDBGridEh * dbgrdeh_1;
TPanel * Panel3;
TSpeedButton * SpeedButton3;
TSpeedButton * SpeedButton4;
TSpeedButton * SpeedButton5;
TImage * Image1;
TDBVertGridEh * DBVertGridEh1;
Panel1 TPanel *;
SbOk TSpeedButton *;
TSpeedButton * SpeedButton2;
TDataSource * dtsc_1;
* adoqry_1 TADOQuery;
TbsBusinessSkinForm * bs_sknfm_1;
Void __fastcall CustomDropDownFormEhInitForm (TCustomDropDownFormEh * Sender, TDynVarsEh * DynParams);
Void __fastcall CustomDropDownFormEhReturnParams (TCustomDropDownFormEh * Sender, TDynVarsEh * DynParams);
Void __fastcall sbOkClick (TObject * Sender);
Void __fastcall SpeedButton2Click (TObject * Sender);
Void __fastcall SpeedButton3Click (TObject * Sender);
Void __fastcall SpeedButton4Click (TObject * Sender);
Void __fastcall SpeedButton5Click (TObject * Sender);
Void __fastcall CustomDropDownFormEhCreate (TObject * Sender);
Private://User declarations
Public://User declarations
The class TDdfCommodityCategory (TComponent * Owner);
//GetGlobalRef ();
TFCommodityCategory * VFCommodityCategory; //bird is wrong here
};
//-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Extern PACKAGE TDdfCommodityCategory * DdfCommodityCategory;
//-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
# endif

CodePudding user response:

Everybody to see oh,,,

CodePudding user response:

 
TCustomDropDownFormEh * TDDFVendors: : GetGlobalRef ()
{
if(! DDFVendors)
Application CreateForm (TDDFVendors DDFVendors);
Return DDFVendors;
}

CodePudding user response:

 
/head
__classmethod virtual TCustomDropDownFormEh * __fastcall GetGlobalRef ();

//CPP
TCustomDropDownFormEh * __fastcall TForm19: : GetGlobalRef ()
{
If (DDFVendors==NULL)
Application - & gt; CreateForm (__classid (TDDFVendors), & amp; DDFVendors);
Return DDFVendors;
}



CodePudding user response:

 TCustomDropDownFormEh * __fastcall TDDFVendors: : GetGlobalRef () 
{
If (DDFVendors==NULL)
Application - & gt; CreateForm (__classid (TDDFVendors), & amp; DDFVendors);
Return DDFVendors;
}

CodePudding user response:

Where is the TFCommodityCategory defined
In # include "f_commodity_category. H" in the header file?

CodePudding user response:

Public://User declarations
__fastcall TDdfCommodityCategory (TComponent * Owner);

TFCommodityCategory * VFCommodityCategory.//the TFCommodityCategory in which h or. HPP
};
  • Related