RTC Forums
May 02, 2024, 01:05:48 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: Re: Error when working with Android 6  (Read 3970 times)
cdhaene
RTC Expired
*
Posts: 13


« on: August 03, 2017, 08:23:03 AM »

Sorry for the personal message.
do you mean that this line :

aClientDataset := TClientDataset(nativeUInt(Data.asFunction.Value['clientdataset']));

is not correct?

How should I pass the dataset?

« Sent to: cdhaene on: Today at 08:10:08 AM »

RTC Value objects do NOT store parameters as Variants. The "Value" property on RTC Value Objects convert data received as input parameter to the closest native RTC type, but is NOT going to work with ALL types supported by Variant, because RTC does NOT have an equivalent for every type supported by Variant on all platforms. When working with RTC Value Objects, instead of using the "Value" propety, you should always use the most appropriate RTC Type when accessing data. For example, use "asLargeInt" instead of "Variant" when working with 64-bit integers.

Also, in the future, please post any questions you have about the RTC SDK in the "RTC SDK Support" section on the Forum instead of sending me a private message, or ... send me an E-Mail. Thank you.
Logged
D.Tkalcec (RTC)
Administrator
*****
Posts: 1881


« Reply #1 on: August 03, 2017, 08:41:11 AM »

I've released an update for the RTC SDK (v8.20) now, extending the "TRtcFunctionInfo" class with a new "Local:TRtcInfo" property, which you can use to store any data and local objects (see "asPtr" and "asObj" properties on the "TRtcInfo" class) which you might need on the Client, once you get a Result from the Server.

So ... now, when preparing a remote function call (using the latest RTC SDK update), you can use this code to store a pointer to your local TClientDataSet object on the Client, so you can access it when you get a Result back from the Server ...

Data.asFunction.Local.asPtr['dataset']:=aClientDataSet;

... and when you get a Result from the Server, for example in the OnResult event, you can use this code to get your TClientDataSet back ...

aClientDataSet := TClientDataSet(Data.asFunction.Local.asPtr['dataset']);

In a nutshell, anything you only need locally on the Client, store it in the new Local property instead of storing it in remote function parameters (which are sent to the Server).

Best Regards,
Danijel Tkalcec
Logged
cdhaene
RTC Expired
*
Posts: 13


« Reply #2 on: August 03, 2017, 09:59:20 AM »

fantastic support!

thanks

works like a charm again (and faster than before)
Logged
D.Tkalcec (RTC)
Administrator
*****
Posts: 1881


« Reply #3 on: August 03, 2017, 04:20:49 PM »

Perfect Smiley Thank you for your feedback.

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


« Reply #4 on: August 03, 2017, 04:22:13 PM »

I like it, too... that comes handy!
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.024 seconds with 17 queries.