Jump to content

Recommended Posts

Posted

Hi

Can we use return in mobile application?
I see form. Why is that?
void __fastcall TUnimFormRooms::UnimDBGridRoomsClick(TObject *Sender)
{
  UniMainModule()->FDQueryDat->Active = false;
  UniMainModule()->ClientDataSetDat->Active = false;
  UniMainModule()->FDQueryDat->ParamByName(L"ROOMSID")->AsInteger =
   UniMainModule()->ClientDataSetRooms->FieldByName(L"id")->AsInteger;
  UniMainModule()->FDQueryDat->Active = true;
  UniMainModule()->FDQueryDat->FetchAll();
  UniMainModule()->FDQueryDat->First();
  UniMainModule()->ClientDataSetDat->Active = true;


 if(UniMainModule()->ClientDataSetDat->RecordCount == 0)
   {
	 ShowMessage(L"I am here!");//I see this message
	 return;//does not work
   }

 UnimFormDat()->ShowModal();//Why I see this form?
}
Posted

The same problem if I use else :(

void __fastcall TUnimFormRooms::UnimDBGridRoomsClick(TObject *Sender)
{
  UniMainModule()->FDQueryDat->Active = false;
  UniMainModule()->ClientDataSetDat->Active = false;
  UniMainModule()->FDQueryDat->ParamByName(L"ROOMSID")->AsInteger =
   UniMainModule()->ClientDataSetRooms->FieldByName(L"id")->AsInteger;
  UniMainModule()->FDQueryDat->Active = true;
  UniMainModule()->FDQueryDat->FetchAll();
  UniMainModule()->FDQueryDat->First();
  UniMainModule()->ClientDataSetDat->Active = true;

  if(UniMainModule()->ClientDataSetDat->RecordCount == 0)
   {
    ShowMessage(L"I am here!");//I see this message
    //return;
   }
  else
       {
	UnimFormDat()->ShowModal();//Why I see this form?
       }

}
  • 2 weeks later...
Posted

I debugged my code. Breakpoint in line ShowMessage(L"I am here!"); I see this message. Then I press F8 and I see UnimFormDat. :(

if(UniMainModule()->ClientDataSetDat->RecordCount == 0)
   {
    ShowMessage(L"I am here!");//I see this message. Press F8 for the next line
   }
  else
       {
	UnimFormDat()->ShowModal();//and I see this form in my app. 
       }
  • Administrators
Posted

 

I debugged my code. Breakpoint in line ShowMessage(L"I am here!"); I see this message. Then I press F8 and I see UnimFormDat. :(

if(UniMainModule()->ClientDataSetDat->RecordCount == 0)
   {
    ShowMessage(L"I am here!");//I see this message. Press F8 for the next line
   }
  else
       {
	UnimFormDat()->ShowModal();//and I see this form in my app. 
:( }

 

 

 

Can you reproduce in a small test case?

×
×
  • Create New...