[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

ShowMessage on iOS???

Posted on 2014-02-16
3
Medium Priority
?
566 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 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

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…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

873 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