648

BCB: sharing Class member

//Unit1.h--------------------class IniParams{ public: bool AppGenEvntLOG;//Application General Events LOG int ServerPort;//methods void LoadAppINI(AnsiString fName,bool opt); void Params2Ctl(int tag);//false: class->Form void Ctl2Params(int tag);//false: Form->class};IniParams SRVpar;//----------------------------------------------------//Unit1.cpp#include "Unit1.h"void IniParams::Params2Ctl(int tag)//from AppIniParams to Control{switch(tag) { case 2:{ fSettings->cbApp->Checked=AppGenEvntLOG;//Uita-te aici la AppGenEvntLOG fSettings->ebSPort->Text=IntToStr(ServerPort); Form1->POSSSocket->Port=ServerPort; }break; case 4:{ }break; }//switch}in timpul executiei valorile this->AppGenEvntLOG sau AppGenEvntLOG //este FALSESRVpar->AppGenEvntLOG //este TRUE !!!!!!!!!!Nu ynteleg de ce Comboboxu' nu ia valoarea SRVpar->AppGenEvntLOG (care dupa cod, este cea care trebuia) ci ia valoarea false, this->AppGenEvntLOG. (shi de ce this->... nu ia valoarea curenta da hz ce)pls help me...fSettings->cbApp->Checked=AppGenEvntLOG
0