How it will be in C++?

This is the forum for miscellaneous technical/programming questions.

Moderator: 2ffat

How it will be in C++?

Postby Lena » Sun Apr 19, 2015 4:00 am

Hi.
How it will be in C++?
Code: Select all
uses
  FMX.Platform.Android;
 
procedure TForm1.Button4Click(Sender: TObject);
begin
  MainActivity.finish;
end;


Code: Select all
#include <FMX.Platform.Android.hpp>

MainActivity->Finish();


[bccaarm Error] MobUnit1.cpp(749): member reference base type 'Androidapi::Jni::Embarcadero::_di_JFMXNativeActivity () __attribute__((pcs("aapcs-vfp")))' is not a structure or union
Last edited by Lena on Tue Apr 21, 2015 6:29 am, edited 1 time in total.
Lena
BCBJ Master
BCBJ Master
 
Posts: 567
Joined: Sun Feb 06, 2011 1:28 pm

Re: How it will be in C++?

Postby rlebeau » Sun Apr 19, 2015 11:30 am

MainActivity is a function that returns a (smart wrapped) object pointer. Also, the finish() method starts with a lowercase 'f':

Code: Select all
MainActivity()->finish();
Remy Lebeau (TeamB)
Lebeau Software
User avatar
rlebeau
BCBJ Author
BCBJ Author
 
Posts: 1528
Joined: Wed Jun 01, 2005 3:21 am
Location: California, USA

Re: How it will be in C++?

Postby Lena » Mon Apr 20, 2015 11:23 pm

Thank you very much!
Lena
BCBJ Master
BCBJ Master
 
Posts: 567
Joined: Sun Feb 06, 2011 1:28 pm


Return to Technical

Who is online

Users browsing this forum: Google [Bot] and 8 guests