You are not logged in.
Pages: 1
Hello AB!
I have a problem with wrapped services on Client side (FPC/CodeTyphon).
The function is defined like "function GetLoginData(const username: string; const password: string): variant;
If I call the function with:
var
fTableJSON: variant;
begin
fTableJSON := FClientFunc.GetLoginData(FUser.Username, FUser.Password);
fTableJSON is: unsupported variant type: $0110
If I change that fTableJSON is string, situation is:
var
fTableJSON: string;
doc: variant;
begin
fTableJSON := FClientFunc.GetLoginData(FUser.Username, FUser.Password);
doc := JSONVariant(fTableJSON);
ftableJSON is: '[{"ID:1,"Username":"xx","FirstName":"System",..."Active":-1}]'
doc is: unsupported variant type: $0110.
Is it bug or I'm doing something wrong and how I can take field's values from received string?
Offline
Sounds like a Lazarus IDE debugger bug.
Everything works OK, but the debugger is not able to convert custom variant types into string and display the value (as Delphi does without problem).
Could you try to run RegressionTests.dpr from the "SQLite3\Samples\27 - CrossPlatform Clients" folder?
Code should work as expected.
For the IDE debugger bug, I do not know what to do.
Unless you open a ticket to Lazarus support.
Offline
RegressionTests.dpr(3,2) Fatal: Can not open include file "SynCrossPlatform.inc"
File is on CrossPlatform folder and folder is added into Paths.
Offline
I got the error after starting the RegressionTests. The Error is:
Project RegressionTests raised exception class 'External: SIGSEGV'
In file 'SynCrossPlatformJSON.pas at line 1350: result := BytesToBase64JSONString(GetTByteDynArrayProp(Instance,PropInfo)^);
Error is in function Function GetInstanceProp(Instance: TObject; PropInfo: TRTTIPropInfo): variant; when PropInfo^.PropType^.Kind = TKDYNARRAY.
Offline
Fedora 11 (64bit)
CodeTypon Version #5 (revision 4970) (64bit)
FPC V2.7.1.
Offline
... and what is your TSQLRecord types?
Have you some simple code to reproduce the issue?
Please try http://synopse.info/fossil/info/0758a3bee6
Offline
Here are results of RegressionTests:
Cross Platform Units for mORMot
---------------------------------
1. Running "Iso8601DateTime"
30003 tests passed in 00:00:068
2. Running "Base64Encoding"
304 tests passed in 00:00:000
3. Running "JSON"
18628 tests passed in 00:00:100
4. Running "Model"
1013 tests passed in 00:00:007
5. Running "Cryptography"
4 tests passed in 00:00:000
Tests failed: 0 / 49952
Time elapsed: 00:00:175
2014-09-08T10:07:29
Cross Platform Client for mORMot using TSQLRestServerAuthenticationDefault
----------------------------------------------------------------------------
1. Running "Connection"
0 tests passed in 00:00:006
2. Running "ORM"
!!! 209 test(s) failed / 4549
3. Running "ORMBatch"
4564 tests passed in 00:00:196
4. Running "Services"
25953 tests passed in 00:00:720
5. Running "CleanUp"
1 tests passed in 00:00:001
Tests failed: 209 / 35067
Time elapsed: 00:01:340
2014-09-08T10:07:29
Some tests failed... please fix it ASAP!
Press [Enter] to quit
Last edited by sjerinic (2014-09-08 08:10:36)
Offline
I experienced the same ... check this: http://synopse.info/forum/viewtopic.php?id=1997
Offline
Pages: 1