RTC Forums
May 14, 2024, 05:53:34 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: TRtcResult in Android  (Read 3874 times)
HelgeLange
RTC Expired
*
Posts: 100


« on: May 02, 2015, 10:07:28 PM »

I try to execute some code on the server coming from a android tablet, calling the function with sessions and it works very well.
When the function comes back with the Id of newly created record, I get strange errors.

Code:
procedure TDMA.CreateAccount(Nit: Int64; Nombres, Apellidos, Clave: String);
var FI : TRtcFunctionInfo;
begin
  FnTaxiId := -1;
  FI := CM.Prepare('CreateAccount');
  FI.asLargeInt['Nit'] := Nit;
  FI.asString['Nombres'] := Nombres;
  FI.asString['Apellidos'] := Apellidos;
  FI.asString['Clave'] := Clave;
  CM.Call(Result_CreateAccount);
  ShowMessage(FnId.ToString);
end;

procedure TDMA.Result_CreateAccountReturn(Sender: TRtcConnection; Data, Result: TRtcValue);
var i : Integer;
    _Result : TRtcRecord;
begin
  If Result.isType = rtc_Exception Then
    ShowMessage(Result.asString)
  Else begin
    _Result := Result.asRecord;
  i := _Result.asInteger['Id'];
  end;
end;

I tried blocking, non-blocking, Multithreaded...
When I put a breakpoint in the result event :



Any ideas ?

Thanks in advance, Helge
Logged
D.Tkalcec (RTC)
Administrator
*****
Posts: 1881


« Reply #1 on: May 02, 2015, 10:18:13 PM »

1. "I get strange errors" is a very poor description of your problem.

2. I only see Client-side code, but you seem to be having problems on the Server. Where is the Server-side code part?

3. When you see no information about local variables while debugging, it usually means that compiler optimizations are turned on and the line of code at which you have set the breakpoint does not require access to those variables.

PS. All Applications using the FireMonkey framework (Android, iOS and Mac OSX) need to use the "rtcFMX.GUI" unit somewhere in the Project for RTC components to work correctly.

Best Regards,
Danijel Tkalcec
Logged
HelgeLange
RTC Expired
*
Posts: 100


« Reply #2 on: May 02, 2015, 10:30:21 PM »

Thanks Danijel,

it was the rtcFMX.GUI unit missing in the uses clause...
Didn't know about it. Is there a some place with "Common stupid things we could do" where I can read about these common errors ? Cheesy

Thanks again....
Helge
Logged
D.Tkalcec (RTC)
Administrator
*****
Posts: 1881


« Reply #3 on: May 02, 2015, 10:51:09 PM »

Quick Start section of this Forum is where I would recommend everyone to start learning about using the RTC SDK.

Best Regards,
Danijel Tkalcec
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.023 seconds with 17 queries.