?
Solved

ShowMessage on iOS???

Posted on 2014-02-16
3
Medium Priority
?
552 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 3

Accepted Solution

by:
Conner Turner earned 1500 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

764 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