Closed perfektsoft1 closed 10 months ago
Can you show the compiler error?
[DCC Error] MVCFramework.Serializer.JsonDataObjects.pas(1615): E2089 Invalid typecast [DCC Error] MVCFramework.Serializer.JsonDataObjects.pas(1635): E2089 Invalid typecast Problem is that for NEXTGEN type of AValue.TypeInfo.Name is byte and String(AValue.TypeInfo.Name) typecast is invalid
Not reproducible with the current repo version. Can you double check pleaseusing the repo version? Maybe this issue has been already fixed.
I pulled the newest repo version (3.4.0-neon-beta).
I think that the problem occurs in delphi version. 10.3.3 and below.
Update: 10.4 Sydney NEXTGEN symbol has been removed from all compilers, along with AUTOREFCOUNT and WEAKINSTREF symbols.
In delphi 10.3.3 - android - NEXTGEN compiler directive -> TSymbolName is Byte {$IFDEF NEXTGEN} TSymbolName = Byte; {$ELSE NEXTGEN} TSymbolNameBase = string[255]; TSymbolName = type TSymbolNameBase; {$ENDIF NEXTGEN}
OK. Can you apply the same approach used in MVCFramework.ActiveRecord and test if it works in your Delphi version? If so, send the changes or create a PR. Thanks
Any news?
There is problem with compilation Delphi10.3 Android in unit MVCFramework.Serializer.JsonDataObjects on line with String(AValue.TypeInfo.Name).StartsWith('Nullable') -> WinCellarMobileClient sample. In unit MVCFramework.ActiveRecord there is similar situation solved {$IFDEF NEXTGEN} lName := aValue.TypeInfo.NameFld.ToString; {$ELSE} lName := string(aValue.TypeInfo.Name); {$ENDIF} if (lName.StartsWith('Nullable', True) and (aValue.TypeInfo.Kind = tkRecord)) then