#1 2016-08-24 12:36:16

GLM
Member
Registered: 2014-01-22
Posts: 14

How to specify a CallBack in a Array of parameters

Hello,

As it is show in samples, with mORMot we can specify callback with a service (Chat sample).
This is make using a simple parameter of a function.

Is it possible to pass this information within a generic array of parameters, a collection of variant like this :

TCommonGenericProperty = class(TCollectionItem)
  private
    FName : ShortString;
    FPropertyType : TTypeKind;
    FValue : Variant;
  published
    property Name : ShortString read FName write FName;
    property PropertyType : TTypeKind read FPropertyType write FPropertyType;
    property Value : Variant read FValue write FValue;
  end;

Will it be well serialize ?
How to get it on the server side ?

regards.

Offline

#2 2016-08-24 13:52:44

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,182
Website

Re: How to specify a CallBack in a Array of parameters

No, you can't do that.

A callback needs some complex process behind the scene, which expect a dedicated parameter, for a dedicated call-back mechanism.

Offline

#3 2016-08-25 08:34:37

GLM
Member
Registered: 2014-01-22
Posts: 14

Re: How to specify a CallBack in a Array of parameters

Hi,

Too bad ...
It doesn't matter, we'll do it in an other way.

Thanks

Offline

Board footer

Powered by FluxBB