RTC Forums

Subscription => Support => Topic started by: cdhaene on August 03, 2017, 08:23:03 AM



Title: Re: Error when working with Android 6
Post by: cdhaene 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.


Title: Re: Error when working with Android 6
Post by: D.Tkalcec (RTC) 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


Title: Re: Error when working with Android 6
Post by: cdhaene on August 03, 2017, 09:59:20 AM
fantastic support!

thanks

works like a charm again (and faster than before)


Title: Re: Error when working with Android 6
Post by: D.Tkalcec (RTC) on August 03, 2017, 04:20:49 PM
Perfect :) Thank you for your feedback.

Best Regards,
Danijel Tkalcec


Title: Re: Error when working with Android 6
Post by: HelgeLange on August 03, 2017, 04:22:13 PM
I like it, too... that comes handy!