Subscribe: marcocantu.blog
http://blog.marcocantu.com/blog_rss2.xmldata
Preview: marcocantu.blog

marcocantu.blog



Techie Italian Blogging on Delphi and More



Updated: 2017-09-19T08:03:27.043Z

 



Delphi and RAD Studio Roadmap Update Published

2017-09-19T08:03:27.043Z

Today the RAD Studio Product Management team (myself included) has published an updated roadmap.

The article with the new roadmap slides is available at:

https://community.embarcadero.com/article/16563-rad-studio-roadmap-september-2017

The roadmap is updated with the 10.2.1 actual release and the specific 10.2.2 plans, along with the focus areas for 10.3 next year.

(image)



Visiting Delphi Conference in Poland Next Week

2017-09-14T14:28:02.539Z

Next week I'll visit and give a keynote and a technical session at a Delphi event, called "Zlot Programistow Delphi", near Warsaw Poland. And there are other Delphi events in Europe next week.

On September 21st and 22nd (next Thursday and Friday) I'll be attending and giving sessions at a Delphi conference in Poland. The conference is organized by the local Embarcadero partner, BSC Polska. You can find more information at the "Zlot Programistow Delphi" web site,

http://delphi.pl/zlot/

(Site content is in Polish language, but session descriptions are also in English and several sessions -- those by foreign speakers like myself, Stefan, Primoz -- will be in English).

If you live in Poland, this would be a rather unique opportunity to get a lot of first class Delphi content and meet a few Delphi gurus and one of the product PMs (that is, me). So don't miss the opportunity for a chat, some tech info, and even an interesting evening called "Grill - Delphi and Fun". See you.

 

PS: There are other notable Delphi conferences in Europe next week, The Lab in Netherlands on Sept 19th (https://www.barnsten.com/nl/events/details?events_id=294) and ForenTage on Sept 23rd (and previous days) in Germany (https://forentage.de/). It's the first time in a few years I miss this German user groups conference, but I had a conflicting family event. David Milligton, one of the other RAD Studio PMs, is attending both conferences!

(image)



GetIt Content Update, September 2017

2017-09-13T13:39:23.695Z

We keep adding a lot of open source libraries, trial components, and now also demos and database connectors to the GetIt package manager. Here is a roundup of updates.

We keep adding a lot of open source libraries, trial components, and now also demos and database connectors to the GetIt package manager. As I wrote a couple of months back, we added also a lot of new categories to simplify navigating among the 241 packages listed today.

What was added over recent months to the GetIt package manager for 10.2 Tokyo?

  • AQTime Standard Embarcadero edition
  • FaceAPI library (for Microsoft Cognitive Services)
  • Grijjy Cloud Logger
  • NexuxDB Free Embedded Version
  • RAD Server Industry Template - Hospitality Survey Application
  • JCL and JVCL updates
  • 3DElite TCP Server-Client Library
  • Additional TMS trial components
  • Many /n Software trial components
  • BrilliantCode trial
  • FmxLinux trial
  • The 80 or so trial versions of CData Enterprise Connectors

More and more components are being added continuously, and we are open to submissions from the community and from partners.

(image)

 

(image)



12 Years of Blogging

2017-09-08T13:42:31.130Z

Today marks the 12th year of my blog, blog.marcocantu.com. And this is my blog post number 1422.

Today marks the 12th year of my blog, blog.marcocantu.com (now also mirrored on community.embarcadero.com). It is easy for me to remember, as I started the blog on my birthday! And this is my blog post number 1422.

Lots of things happened in this 12 years, but I'm still mostly focused on Delphi, even if in a different role. And if you read the first post (http://blog.marcocantu.com/blog/startingblog.html) you'll see the core engine was written in Kylix -- the ancestor of the newly released Delphi 10.2 Tokyo with Linux support. You can read the 1420 blog posts in between by navigating the full archive at http://blog.marcocantu.com/archives.html.

To capture at a very high level these 12 years, I grabbed all pictures I used in blog post (at least those I uploaded a copy of) and made the collage below (you can expand it for higher resolution). And thanks to those who have been following my blog for these 12 years. Let's have another great year!

(image)

(image)



Hotfix for 10.2.1 Inherited VCL Forms Released

2017-09-06T14:23:25.960Z

Embarcadero just released a hotfix for a regression when using inherited VCL Forms on High-DPI monitors

This hotfix addresses a bug introduced in RAD Studio 10.2.1 and reported as RSP-18792 in Quality Portal. The issue causes an inherited VCL form to fail to scale on high DPI displays. Actually the fix resolves also a couple of related problems.

The download is available at https://cc.embarcadero.com/item/30798

Notice that even if the changes is for only a few lines of source code, the download is over 80 MB, as we are updating all binary files (DCU, BPL) including that code. The list of files is included in the download page.

(image)



Delphi Blogs of the (Week) Month #55

2017-09-01T09:21:03.011Z

It has been a month since the last blog post with links, and I've collected quite a few. This is my fairly regular (although now monthly) list of relevant links to blogs post, articles, news, and more from the Delphi community. Embarcadero Updates Idera has acquired Sencha to strengthen its developer tools business (aka Embarcadero). You can read the press release (http://www.businesswire.com/news/home/20170825005086/en/IDERA-Acquires-Sencha-Strengthen-Developer-Tools-Business) and articles like http://sdtimes.com/idera-sencha-acquisition-sdtimes. Embarcadero released a hot fix for Tokyo 10.2.1 to resolve iOS AdHoc deployment: http://blog.marcocantu.com/blog/2017-august-hotfix-adhoc.html Notable Blog Posts Save Time With This Quick LiveBindings Trick For Delphi And C++Builder (by Eli): https://community.embarcadero.com/blogs/entry/learn-how-to-quickly-livebind-almost-any-control-with-this-tedit-trick-for-delphi-and-c-builder Experiments in Uniform Memory Management (by Erik van Bilsen): https://blog.grijjy.com/2017/08/09/experiments-in-uniform-memory-management/ Delphi FMX Chess Game (although I'm eagerly waiting for more information) https://csvelocity.wordpress.com/2017/08/08/delphi-fmx-chess-game/ Cross-Platform Code Hooking (also by Erik van Bilsen): https://blog.grijjy.com/2017/07/26/cross-platform-code-hooking/ Windows Manifest Files (by Vincent Parrett): https://www.finalbuilder.com/resources/blogs/postid/753/windows-manifest-files TNotifyEvent debouncing in Delphi (by Sergey Zhukov): https://www.code-partners.com/tnotifyevent-debouncing-in-delphi/ (althought it has been criticized as not really being on debouncing, it is an interesting read) Use C++Builder to get Android current ringtone mode (by Haruyuki Mohri): https://community.embarcadero.com/blogs/entry/use-c-builder-to-get-android-current-ringtone-mode Resizing a TViewPort3D (by Gustav Schubert): http://federgraph.blogspot.it/2017/08/resizing-t-viewport-3d.html The Dark Side of Application.ProcessMessages in Delphi Applications (by Zarko Gajic): https://www.thoughtco.com/dark-side-of-application-processmessages-1058203 (re-opening a never ending debate on the use of Windows limited message based parallel processing vs. real threading solutions -- or maybe the debate is actually settled and threads just won?) Cloud Based Unit Resolver For The Delphi RTL In Delphi 10.2 Tokyo (by FMX Express): http://www.fmxexpress.com/cloud-based-unit-resolver-for-the-delphi-rtl-in-delphi-10-2-tokyo/ Third Party Libraries and Components Delphi base compatibility, Spine improvements, other stuff in Castle Game Engine (by Michalis): https://castle-engine.sourceforge.io/wp/2017/08/14/delphi-base-compatibility-spine-improvements-other-stuff/ JSKit - open-source Cross-platform JavaScript framework for Delphi and CrossVcl announcement (by Eugene) at https://plus.google.com/u/0/118397897778295642304/posts/ip2wGhNfskd?cfem=1. The library itself can be found at https://github.com/eugenekryukov/jskit Kind of similarly, ​ScriptGate provides mutual calls between JavaScript and #Delphi and it's useful for Hybrid apps (by Hosokawa Jun): https://bitbucket.org/freeonterminate/scriptgate GrijjyCloudLogger, remote logging for Windows, iOS, Android, macOS and Linux (by Allen Drennan) at https://blog.grijjy.com/2017/08/22/grijjycloudlogger-remote-logging-for-windows-ios-android-macos-and-linux/. The repository is at https://github.com/grijjy/GrijjyCloudLogger ​Must Have RAD Accessories – InnoSetup (by Craig Chapman): http://chapmanworld.com/2017/08/25/must-have-rad-accessories-innosetup/ (and part of a very nice series of classic Delphi components and tools) Debugger Callstack Resolver released (by Andreas Hausladen): http://andy.jgknet.de/blog/2017/08/debugger-callstack-resol[...]



Using Delphi Parse API with Any Parse Server Hosting

2017-09-06T15:45:29.500Z

Given Parse was retired earlier this year, does it make sense to keep the Parse components in Delphi and how can you still use them?

The Parse web site (owned by Facebook) was retired earlier this year. This was a fairly popular BaaS (backend as a service) provider for mobile applications, but something you could use also from desktop apps. Delphi (and also C++Builder, btw) has included ready-to-use components for interfacing Parse APIs for quite some time. It was very easy to set up an account on the system and create an app. But the hosting was discontinued, and now what?

Additional Parse Hosting and the Delphi ParseProvider Component

While stopping the Parse web site, Facebook did you positive thing: they made the entire Parse server open source. So what happened is that many cloud hosting providers took that code and created compatible hosting services. By hosting the a fully API-compatible version of the Parse server, these providers made it possible to migrate client applications that were using parse with almost no effort. 

There was one additional issue to use these additional providers from Delphi. Given Parse applications were hosted on parse.com, the main domain name was hard-coded in our component. Now in Delphi Tokyo Release 1 (or 10.2.1) we have added a class helper that lets you easily change the URL provider. As you can read at https://quality.embarcadero.com/browse/RSP-13608 all you need to do is add the line:

ParseProvider1.BaseURL := '...';

In a future release, this will become a property of the component, but to preserve compatibility it was added as a runtime only feature for Tokyo updates.

An Actual Example

To check this does really work I did the following. First I went to one of the Parse server providers that offers a limited free account, https://www.back4app.com/. By entering my credentials, in a minute I could create a test app and manually enter a user on their web console. The console configuration listed all of the parameters needed to connect.

Second I create a VCL forms application, with a ParseProvider component, a BackendUsers component, a button and a memo. In the ParseProvider I copied the various required IDs:

object ParseProvider1: TParseProvider
  ApplicationID = 'esSv_______Whi'
  RestApiKey = 'mxBY______Wl6'
  MasterKey = 'kxW_____DHl'
end

The BackendUsers component only configuration is the connection to the provider (which should be automatic). Third step I wrote the following code to refer to the proper URL and get the list of users:

procedure TForm12.FormCreate(Sender: TObject);
begin
  ParseProvider1.BaseURL := 'https://parseapi.back4app.com/';
end;

procedure TForm12.Button1Click(Sender: TObject);
var
  aJSONArray: TJSOnArray;
begin
  aJSONArray := TJSOnArray.Create;
  try
    BackendUsers1.Users.QueryUsers([''], aJSOnArray);
    Memo1.Lines.Add (aJSOnArray.ToString);
  finally
    aJSONArray.Free;
  end;
end;

You can see the result in the image below (sorry for the scanty UI):

(image)

That's all it takes. So you can indeed keep using a Parse Server as a backend for your Delphi desktop and mobile applications, as long as you can find a suitable provider... or you can even self-host the open source version of Parse on your own servers.

(image)



RAD Studio 10.2.1 HotFix for iOS AdHoc Deployment

2017-08-23T08:23:55.560Z

We released a hotfix to address a regression in RAD Studio Tokyo Release 1 related with AdHoc deployment for iOS

We released a hotfix to address a regression (reported as https://quality.embarcadero.com/browse/RSP-18813) in RAD Studio Tokyo Release 1 related with AdHoc deployment for iOS. The fix available for download is at:

https://cc.embarcadero.com/item/30797

The fix (which is a single file to add to your system) provides support for building iOS Ad Hoc Applications with RAD Studio 10.2.1 using Xcode 8.2, 8.3.2 or 8.3.3. Please ensure that RAD Studio 10.2.1 (Tokyo Release 1) is installed before applying this fix, it is not for the original 10.2 release.

(image)



Workaround for FMX Memory Leaks on Windows in 10.2.1

2017-08-16T08:58:47.118Z

Here is a relatively simple workaround for a memory leak on termination of FireMonkey Windows applications with Tokyo Release 1.

Many of our customers today write FireMonkey Windows applications. We recently got some customer reports on FMX memory leaks on Windows using RAD Studio 10.2 Release 1 (or Tokyo Release 1). The issue is reported at https://quality.embarcadero.com/browse/RSP-18774 and https://stackoverflow.com/questions/45588741/delphi-recompiling-application-with-10-2-1-causes-memory-leaks.

If you encounter such issues after installing 10.2.1, we recommend trying the workaround below. We will address this issue in the future.

To our knowledge, the memory leak doesn't happen during program execution, but on termination because a cleanup thread does not excute in time. Delphi MVP Stefan Glienke suggested a relatively simple workaround both on the Quality Portal bug report and in the StackOverflow page linked above. By calling CheckSynchronize (from System.Classes) you can have the application wait for the cleanup threads to execute. This does a quick sync, but does not cause any noticeable delay. 

There are different places where you can put this code, but the simplest one for me is a finalization block in the main form source code (no need to update the library units). This is an example of the code added to the end of the main form unit, along with activating memory leak reporting:

(image)

Another very good suggestion is to change the project file (the .dpr file), but your mileage might vary -- you can also consider fixing the library as this will fix all of your applications at once.

(image)



Creators Update BPL Loading Issue and Tokyo Release 1

2017-08-14T10:10:03.785Z

As mentioned in the release notes of Tokyo 10.2.1, the latest release of RAD Studio addresses the issues caused by Creators Update DLL and BPL loading As mentioned in the release notes of Tokyo 10.2.1, the latest release of RAD Studio addresses the issues caused by Windows 10 Creators Update and related with DLL and BPL loading. The issue is caused by a change (a bug!) in the DLL loading algorithm of the operating system, an issue that Microsoft has fixed in the new coming release of Windows 10, currently known as Fall Creators Update. I've already covered the problem in a past blog post, http://blog.marcocantu.com/blog/2017-june-delphi-packages-creators-update.html. There is also some discussion on the related Quality Portal bug report at https://quality.embarcadero.com/browse/RSP-17972. Tokyo Release 1 Fixes the Issue In this new post I don't want to get back to the technical information already discussed there, but focus on what's changed in Delphi Tokyo Release 1. In short, Embarcadero developers modified the compilers and linkers to emit a single export table section for each BPL, to avoid each section of the export table to cause the operating system to reload the same library once more. As a experiment, on my primary system (which is running Windows 10 Creators Update) I took a very simple one button VCL application, activated runtime packages (which causes dependencies from the RTL and VCL packages) and started it in the debugger. I used Berlin 10.1.2 and Tokyo 10.2.1 side by side and you can clearly see the difference in the image below: The Detailed Event Logs In the detailed log for Tokyo 10.2.1 you can see that some unloading and reloading still happens (unloading is set in bold), but the same can be seen for some Microsoft system DLLs: Thread Start: Thread ID: 3972. Process ProjectLoad.exe (2964) Process Start: C:\Users\marco\Documents\Embarcadero\Studio\Projects\Win32\Debug\ProjectLoad.exe. Base Address: $00400000. Process ProjectLoad.exe (2964) Module Load: ProjectLoad.exe. Has Debug Info. Base Address: $00400000. Process ProjectLoad.exe (2964) Module Load: ntdll.dll. No Debug Info. Base Address: $76EF0000. Process ProjectLoad.exe (2964) Module Load: KERNEL32.dll. No Debug Info. Base Address: $75320000. Process ProjectLoad.exe (2964) Module Unload: KERNEL32.dll. Process ProjectLoad.exe (2964) Module Load: KERNEL32.dll. No Debug Info. Base Address: $75320000. Process ProjectLoad.exe (2964) Module Load: KERNELBASE.dll. No Debug Info. Base Address: $74DE0000. Process ProjectLoad.exe (2964) Thread Start: Thread ID: 6872. Process ProjectLoad.exe (2964) Thread Start: Thread ID: 12820. Process ProjectLoad.exe (2964) Module Load: vcl250.bpl. Has Debug Info. Base Address: $50A80000. Process ProjectLoad.exe (2964) Module Load: rtl250.bpl. Has Debug Info. Base Address: $00C00000. Process ProjectLoad.exe (2964) Module Unload: rtl250.bpl. Process ProjectLoad.exe (2964) Module Load: SHLWAPI.dll. No Debug Info. Base Address: $75160000. Process ProjectLoad.exe (2964) Module Load: msvcrt.dll. No Debug Info. Base Address: $75DF0000. Process ProjectLoad.exe (2964) Module Load: combase.dll. No Debug Info. Base Address: $75BB0000. Process ProjectLoad.exe (2964) Module Load: ucrtbase.dll. No Debug Info. Base Address: $76200000. Process ProjectLoad.exe (2964) Module Load: RPCRT4.dll. No Debug Info. Base Address: $76C60000. Process ProjectLoad.exe (2964) Module Load: SspiCli.dll. No Debug Info. Base Address: $739C0000. Process ProjectLoad.exe (2964) Module Load: CRYPTBASE.dll. No Debug Info. Base Address: $739B0000. Process ProjectLoad.exe (2964) Module Load: bcryptPrimitives.dll. No Debug Info. Base Address: $750F0000. Process ProjectLoad.exe (2964) Thread Start: Thread ID: 1944. Process ProjectLoad.exe (2964) Module Load: SECHOST.dll. No[...]