Jump to content
Daniel

RAD Studio 10.3.3 now available

Recommended Posts

38 minutes ago, Lars Fosdal said:

Can you describe in what way the Json encoding differs?  Json examples would be good!

Even better would be small self-contained compilable example that demonstrates the difference between 10.3.2 and 10.3.3.

Here's a example. 

 

1. Servers method:

function tmyServerMethods.Load_Scanning_Functions(vuserid:longint):tstrings;
var
	i:integer;    
begin
    result:=tstringlist.create;
		// data is a query ...
		for i:=1 to vdata.recordcount do begin
			result.add(inttostr(vdata.fieldbyname('statusid').asinteger)+'|'+vdata.fieldbyname('statusname').asstring);
		end;
		vdata.next;
    end;
end;

2. Answer compiled with Tokyo:

{"result":[{"type":"System.Classes.TStringList","id":1,"fields":{"FList":[["10|Einlagern",null],["30|Umlagern",null],["400|Kundenbarcode",null],["100|St\u00FCckgutverladung",null],["400|NVE zu Kundenbarcode",null],["",null],["",null],["",null]],"FCount":5,"FCapacity":8,"FSorted":false,"FDuplicates":"dupIgnore","FCaseSensitive":false,"FOwnsObject":false,"FEncoding":null,"FDefaultEncoding":{"type":"System.SysUtils.TMBCSEncoding","id":2,"fields":{"FCodePage":1252,"FMBToWCharFlags":0,"FWCharToMBFlags":0,"FIsSingleByte":true,"FMaxCharSize":1}},"FLineBreak":"\r\n","FUpdateCount":0,"FDelimiter":",","FQuoteChar":"\"","FNameValueSeparator":"="}}]}

3. Answer compiled with Rio:

{"result":[{"type":"System.Classes.TStringList","id":1,"fields":{"FList":[["10|Einlagern",null],["30|Umlagern",null],["400|Kundenbarcode",null],["100|St\u00FCckgutverladung",null],["400|NVE zu Kundenbarcode",null],["",null],["",null],["",null]],"FCount":5,"FCapacity":8,"FSorted":false,"FDuplicates":"dupIgnore","FCaseSensitive":false,"FOwnsObject":false,"FCompareStringsOverriden":false,"FEncoding":"","FDefaultEncoding":"1252","FLineBreak":"\r\n","FUpdateCount":0,"FDelimiter":",","FQuoteChar":"\"","FNameValueSeparator":"="}}]}

4. In the client app (compiled with Tokyo) cannot work with the result. We're no able to update the client apps at the moment.

Share this post


Link to post

That was a very weird difference. It looks like the types of Fencoding and FDefaultEncoding has changed. 

Can it be that the type you intend to use is being "replaced" by type with the same name, due to a scope issue?

 

image.thumb.png.fb712d4e980cd1d063ae752573bb8882.png

Share this post


Link to post
40 minutes ago, Lars Fosdal said:

That was a very weird difference. It looks like the types of Fencoding and FDefaultEncoding has changed. 

Can it be that the type you intend to use is being "replaced" by type with the same name, due to a scope issue?

 

image.thumb.png.fb712d4e980cd1d063ae752573bb8882.png

 

I do nothing special, i open the project compile it with Tokyo and it works, i open the same project without changing anything with Rio 10.3.3 and it does not work. 

 

In Rio and in Tokyo it shows System.Classes.xxx when i move the mouse over tStrings and tStringList

Edited by microtronx

Share this post


Link to post

Duh! It's the TStringList that has changed...

 

To avoid situations like these, you should build Json that does not embed information that belongs to the container.


F.x.

 

type
  TStatus = class
  private
    FId: Integer
    FName: String;
  public
    constructor Create(const aId: Integer; aName: String);
    function DisplayText: string;
    property Id: Integer read FId write FId;
    property Name: String read FName write FName;
  end;
  TStatusArray = TArray<TStatus>;


constructor TStatus.Create(const aId: Integer; aName: String);
begin
  Id := aId;
  Name := aName;
end;

function TStatus.DisplayText: string;
begin
  Result := Id.ToString + '|' + Name;
end;

function tmyServerMethods.Load_Scanning_Functions(vuserid:longint):TStatusArray;
var
	i:integer;
begin
  result := [];
// data is a query ...
  for i:=1 to vdata.recordcount do begin
  	result := Result + [TStatus.Create(vdata.fieldbyname('statusid').asinteger, vdata.fieldbyname('statusname').asstring)];
	vdata.next;
  end;
end;

 

Share this post


Link to post

The reason is they added a converter for encoding fields in TStrings to Data.DBXJSONReflect so it writes it different from before.

Edited by Stefan Glienke

Share this post


Link to post

 

1 minute ago, Stefan Glienke said:

The reason is they added a converter for encoding fields in TStrings to Data.DBXJSONReflect so it writes it different from before.

Great, so all rest-server-apps are not compatible with prior clients ...

Share this post


Link to post
On 11/26/2019 at 11:21 AM, microtronx said:

 

Great, so all rest-server-apps are not compatible with prior clients ...

That is unfortunately correct.  

As mentioned above - if you avoid creating Json that embed container data outside your control, you will avoid such issues.

 

Json as per example above

 

{
	"result": [{
			"Id": 10,
			"Name": "Einlagern"
		},
		{
			"Id": 30,
			"Name": "Umlagern"
		},
		{
			"Id": 400,
			"Name": "Kundenbarcode"
		},
		{
			"Id": 100,
			"Name": "St\u00FCckgutverladung"
		},
		{
			"Id": 400,
			"Name": "NVE zu Kundenbarcode"
		},
		{
			"Id": 0,
			"Name": ""
		},
		{
			"Id": 0,
			"Name": ""
		},
		{
			"Id": 0,
			"Name": ""
		}
	]
}

 

Share this post


Link to post
4 minutes ago, Lars Fosdal said:

That is unfortunately correct.  

As mentioned above - if you avoid creating Json that embed container data outside your control, you will avoid such issues.

 

New projects are not using things like "tstringlist" as a result ... Yep, we will change all "old" projects. Thx.

  • Like 1

Share this post


Link to post
On 11/25/2019 at 12:32 PM, Ugochukwu Mmaduekwe said:

You can give Lazarus and FreePascal a try, at least that's what I do these days.

I already have Lazarus installed, I use Delphi XE4 for our internal business apps, I just used the Community Edition for Hobby stuff and playing.

 

For information for others considering the Community Edition I have tried to get a new licence for the Community Edition and have failed, it appears you have to jump through hoops after the first year as expired, even though the emails said I should contact support, they just referred me to the faq's and CE page.

 

The FAQ's page states you can update the licence from the web site, I queried this with support as I could find no way of doing that and the latest is that I have had the UK and Ireland agents on (Grey Matter) saying they need to discuss it with me and I have to phone them, so currently uninstalling CE as its just too much hassle.

  • Sad 1

Share this post


Link to post
5 hours ago, Andy Vines said:

For information for others considering the Community Edition I have tried to get a new licence for the Community Edition and have failed, it appears you have to jump through hoops after the first year as expired, even though the emails said I should contact support, they just referred me to the faq's and CE page.

This is what they're saying on Reddit too... the software says contact support, and the support team just sends an email back saying to refer to the FAQ which states that support doesn't cover Community Edition. 😞 It's a crazy Catch-22.

Share this post


Link to post
7 hours ago, Stéphane Wierzbicki said:

Desperately waiting for IDE Fixpack... 😥

Why? There seem to be no changes in the IDE and the compilers that would brake the current IDE Fix Pack 6.4.4.

  • Like 1
  • Thanks 3

Share this post


Link to post
21 minutes ago, jbg said:

Why? 

I read that as 'why can't Andreas fix all their bugs' 🙂

Edited by FredS
  • Haha 1

Share this post


Link to post
On 11/21/2019 at 6:32 PM, Gustav Schubert said:

Now I have 10.3.3 CE with two days left.

Fixed, 367 more days for my CE installation.

 

I have requested a new license via free-download page, using same email login as always, and got email with new license key. Then I used the license dialog of Tokyo Pro to register new license and delete expired license.

 

Quote from comment on FB page: "Please make sure your license is expired, otherwise you will get the same expiration date as before." This may very well be true.

  • Like 3

Share this post


Link to post

@Gustav Schubert I can confirm: they added a new license exclusively for Delphi CE 10.3.3.

Thanks Embarcadero.

Delphi 10-3-3 CE License.jpg

Edited by Kryvich
  • Like 1

Share this post


Link to post

@jbg IDE Fix Pack 6.4.4 installed and works good for me with Delphi CE 10.3.3. As well as my own IDE packages compiled with Delphi CE 10.3.2.

 

Share this post


Link to post

BTW do you see circles next to the file names in tabs of modified files in IDE?

 

ModifiedMark.jpg

Share this post


Link to post
14 hours ago, jbg said:

Why? There seem to be no changes in the IDE and the compilers that would brake the current IDE Fix Pack 6.4.4.

Sorry for the confusion! I should have said that I don't understand why your fixes are not TOTALLY included in Delphi RIO!

Anyways... I'm still thanking you for all your hard work.

  • Like 3

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×