I use this code in ComboBoxChange for download INI file:
Code: Select all
String path = L"http://nsnllc.um.la/states/" + ComboBoxState->Selected->Text + L".ini";
std::unique_ptr<TMemoryStream> StateINI(new TMemoryStream());
try
{
IdHTTP1->Get(path, StateINI.get());
}
catch(...)
{
ShowMessage(L"Error");
return;
}
*****
1. Start app on ihone. App works good.
2. I leave the application on the screen.
3. Putting my phone to sleep.
4. I wake up the phone.
5. Try ComboBoxChange and I see ShowMessage(L"Error");
If full restart app all good again.
I want to try to use the following code instead of the component IdHTTP1:
std::unique_ptr<TIdHTTP> MyIdHTTP(new TIdHTTP());
I cannot test my theory yet. I don't have a debug Мас right now.
What is your opinion on this issue?
Thanks.