Lena Posted June 2, 2015 Share Posted June 2, 2015 Hi. V. 0.99.0.1169 I am adding Login Form in my project and I got error. Where my mistake? Breakpoint stops here: ustring.h // Constructors UnicodeString(): Data(0) {} Login Form code: void __fastcall TUniLoginForm1::UniBitBtnCanselClick(TObject *Sender) { ModalResult = mrCancel; } //--------------------------------------------------------------------------- void __fastcall TUniLoginForm1::UniLoginFormShow(TObject *Sender) { UniEditLogin->SetFocus(); } //--------------------------------------------------------------------------- void __fastcall TUniLoginForm1::ACallBackLogin(TComponent *Sender, int AResult) { if(UniEditLogin->Text == "") { UniEditLogin->SetFocus(); } else if(UniEditPassword->Text == "") { UniEditPassword->SetFocus(); } } //--------------------------------------------------------------------------- void __fastcall TUniLoginForm1::UniBitBtnEnterClick(TObject *Sender) { try { if(UniEditLogin->Text == "") { ShowMessage(L"Enter login", &ACallBackLogin); return; } if(UniEditPassword->Text == "") { ShowMessage(L"Enter password", &ACallBackLogin); return; } UniMainModule()->FDQueryLogin->Active = false; UniMainModule()->FDQueryLogin->ParamByName(L"LOGIN")->AsString = UniEditLogin->Text; UniMainModule()->FDQueryLogin->ParamByName(L"PASSWORD")->AsString = UniEditPassword->Text; UniMainModule()->FDQueryLogin->Active = true; if(UniMainModule()->FDQueryLogin->RecordCount == 0) { ShowMessage(L"No user"); //ModalResult = mrCancel; } else if(UniMainModule()->FDQueryLogin->RecordCount == 1) { //test: ModalResult = mrOk; //I am here } } catch (const Exception &E) { // } } //--------------------------------------------------------------------------- In Main Form I also have event OnShow and OnBeforeShow. And all my grids on Main Form have event: function beforeInit(sender, config) { sender.titleAlign = 'center'; //sender.titleAlign = 'right'; //sender.titleAlign = 'left'; Ext.onReady(function () { sender.headerCt.getMenu().items.items[2].hide(); //separator sender.headerCt.getMenu().items.items[3].hide(); }); } Link to comment Share on other sites More sharing options...
Lena Posted June 2, 2015 Author Share Posted June 2, 2015 If add comments in all Grids error disappears. function beforeInit(sender, config) { sender.titleAlign = 'center'; //sender.titleAlign = 'right'; //sender.titleAlign = 'left'; //Ext.onReady(function () { //sender.headerCt.getMenu().items.items[2].hide(); //separator //sender.headerCt.getMenu().items.items[3].hide(); //}); } Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now