Blog

All Blog Posts  |  Next Post  |  Previous Post

Coming up in TMS FNC Core

Bookmarks: 

Tuesday, February 25, 2020

Working hard!
We are working hard on getting TMS FNC Core ready for the next update. It will include the TTMSFNCWebBrowser component that will support the latest browser technologies on various platforms. Microsoft replacing Internet Explorer/Edge with Edge Chromium (https://www.theverge.com/2018/12/4/18125238/microsoft-chrome-browser-windows-10-edge-chromium). Apple is forcing applications to switch to WKWebView for both macOS and iOS from April 2020 (https://developer.apple.com/news/?id=12232019b). For us, this was a signal to quickly start implementing these browser changes and make sure we offer the latest technologies Microsoft and Apple are pushing out. Choosing the TTMSFNCWebBrowser instead of the default TWebBrowser will offer you the best experience and worry-free applications for the future.


All of the above operating systems are supported through various frameworks: FMX, LCL, VCL and WEB
On the WEB it acts as a DIV which can load and handle HTML, execute JavaScript and many more.

That's not all!
Which each update of TMS FNC Core or other FNC products, we tend to add little gems hidden inside. The most important units that bundle all these little gems are *TMSFNCUtils.pas and *TMSFNCTypes.pas (* = FMX., VCL., WEBLib., LCL). For this blog, I wanted to point out a very nice class helper that allows you to generate JSON from an object, store/restore it, save it to a file or stream and even log it inside the debug console.
  TTMSFNCObjectHelper = class helper for TObject
    function ToJSON(AExcludedProperties: TTMSFNCObjectExcludePropertyListArray): string; overload;
    function ToJSON: string; overload;
    procedure FromJSON(const Value: string);
    property JSON: string read ToJSON write FromJSON;
    procedure Log;
    {$IFNDEF WEBLIB}
    procedure SaveToJSONFile(const AFileName: string);
    procedure LoadFromJSONFile(const AFileName: string);
    {$ENDIF}
    procedure SaveToJSONStream(const AStream: TStream);
    procedure LoadFromJSONStream(const AStream: TStream);
  end;
This class helper will allow you to take any TObject descendant and generate JSON from it. Below is a little sample that demonstrates this.
  TTestClass = class(TPersistent)
  private
    FB: string;
    FC: Double;
    FA: Boolean;
  published
    property A: Boolean read FA;
    property B: string read FB write FB;
    property C: Double read FC write FC;
  end;
var
  t: TTestClass;
begin
  t := TTestClass.Create;
  t.FA := True;
  t.FB := 'Hello World!';
  t.FC := 123.456;

  t.JSON.Log;
end;
Debug Output: {"$type":"TTestClass","A":true,"B":"Hello World!","C":123.456} Process Project1.exe (6968)
A little more patience
As already mentioned we are working hard on the update. There are a few things that need some more testing but as soon as that's ready the update will be released. We are eager to find out which components, libraries & little gems you are using inside your application, so you can always showcase that through email support.

Pieter Scheldeman


Bookmarks: 

This blog post has received 5 comments.


1. Tuesday, February 25, 2020 at 4:05:26 PM

Great work guys! Love your components

Michael Margerum


2. Wednesday, February 26, 2020 at 9:00:26 AM

Using the old Windows ActiveX-Component we had the possibility to deep dive into the website. I.e. we could read and manipulate the whole DOM, run and manipulate javascripts... Will the TTMSFNCWebBrowser support these features?

Bucher Jürgen


3. Wednesday, February 26, 2020 at 9:05:56 AM

In 1.0 we will provide a browser that is capable of loading HTML, navigating to a page. using the OnBeforeNavigate and OnNavigateComplete events and executing JavaScript. Access to the DOM is something that is on our planning, but needs more investigation.

Pieter Scheldeman


4. Wednesday, March 04, 2020 at 11:21:06 PM

Our company PC''s are (at the moment) not updated to Edge Chromium. We still use Chrome besides Edge. If I have not missed anything, the component TMSFNCWebBrowser cannot be used.
Is it planned that this component can also be used in this constellation?

Roland Cueni


5. Thursday, March 05, 2020 at 8:26:27 AM

Hi Roland,

the TTMSFNCWebBrowser can only be used when following the steps to install Edge Chromium. (see the other blog posts announced yesterday: https://www.tmssoftware.com/site/blog.asp?post=630)

Pieter Scheldeman




Add a new comment:
Author:
Email:
  You will receive a confirmation mail with a link to validate your comment, so please use a valid email address.
 
Comment:
 
 

All fields are required.
 



All Blog Posts  |  Next Post  |  Previous Post