Solved

ShowMessage on iOS???

Posted on 2014-02-16
3
510 Views
Last Modified: 2014-02-16
Hi,

This code works on the Android, but not in the iOSSimulator.

On the Android I get the pop-up and I click OK and the app exits. Which is what i want if the database is the wrong version.

But on iOS all I get is a blank screen, no error, nothing.

The database has a Version table with one record with one integer field containing the version number.

procedure TChirpDB.FDChirpDBAfterConnect(Sender: TObject);
begin
  VersionDS.Active := True;
  if (VersionDS.Fields[0].AsInteger = 1) then
  begin
    ShowMessage('Wrong Database Version, please reinstall.');
    Halt;
  end;
  VersionDS.Active := False;
end;


The SQL in the TFDQuery is:

     select id from Version


The database is SQLite.

I tried changing the comparison to <> so it would not error and the application came up with no problem so I think the problem is in the If Then clause.

Gary
0
Comment
Question by:Gary4
  • 2
3 Comments
 
LVL 3

Accepted Solution

by:
Conner Turner earned 500 total points
ID: 39863270
Hello,

Yes this is a known bug that the iosSimulator wont show message alerts, this should be fixed in the Delphi XE5 Update 2 release,

Im sorry i cannot help any further.

HTH,
Conner
0
 
LVL 1

Author Comment

by:Gary4
ID: 39863277
Oh,

OK, as long as it works correctly on the real device then that's ok.

I've held off with update 2 since I saw several posts that it broke mobile apps and I didn't see any posts that it was ever fixed.
0
 
LVL 3

Expert Comment

by:Conner Turner
ID: 39863281
Hi,

Yes, the update MAY break a few things, however once produced on a Device all should work seamlessly.

Glad i could be of assistance , and good luck with your App !,

Conner.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now