I Just Don’t GetIt

In case you were wondering, GetIt appears to be down at the moment.  I went to take 5 minutes to update a bug report, and I needed to install FmxLinux to do so, only to see:
I guess it will have to wait.  This is the problem of automating everything.  You become reliant on services that […] … Read More

Read More

Melbourne Meeting – September 2020

Monday 21 September at 6 for 6:15pm start. ONLINE MEETING – WE WILL NOT BE MEETING IN PERSON We will meet online, instead of meeting at the Shed. Malcolm Groves from Code Partners will show his CodeBindings open source library. CodeBindings : Visual LiveBindings with a lot less of the Visual “Visual Livebindings were introduced into Delphi and C++Builder nearly 10 years ago as a way for both VCL and FMX apps to bind data to visual controls.… Continue reading ›
Read More

Newest book about TMS FNC Maps is ready

In April this year, we were pleased to release our new product TMS FNC Maps and announce it. TMS FNC Maps bundles all our expertise with using mapping services, with writing cross-platform and cross-framework Delphi code as well as building components for TMS WEB Core web client applications. From the beginning, we made the radical decision to base this work on the new operating system browser Edge Chromium from Microsoft for the Windows platform (where we already use Safari for iOS and macOS and Chrome for Android). From the very beginning of this development, our chief evangelist Dr. Holger Flick was involved and could play with internal versions and give feedback and steer the development.

This week all pieces of the puzzle fall together. After months of intensive work and collaboration with our development team, the new book from Holger, “Hands-on with Delphi: FNC Maps”, is ready for sale. A coincidence or not, but also from this week, the Edge Chromium version Microsoft automatically deploys to Windows 10 operating systems also reached the version needed to use TMS FNC Maps on Windows. So, this means, on Windows it is no longer necessary to download and install a developer specific version of Edge Chromium. But my colleague Pieter Scheldeman will reveal more details shortly. Today is about the brand new book!

If you want to integrate mapping services’ functionality such as from Google Maps, Bing Maps, Openstreet Maps, Here maps, TomTom maps, Azure maps in a Windows VCL application, a cross platform FireMonkey application or a TMS WEB Core web client application, TMS FNC Maps addresses it all and the new book covers developing with TMS FNC Maps in great detail over close to 400 pages.

Content

  • Get to know the FNC framework, FNC Core, and FNC Maps in a nutshell.
  • Learn about FNC Maps in detail: You will find dozens of hands-on examples from installation to modern multi-tier applications with large databases, web services, web, and desktop clients.
  • Annotate maps and visualize data using markers with clustering, lines, shapes, pop-up windows and routes.
  • Build applications that can handle any geographical data and interact with other Geographic Information Services (GIS). Load GPX tracks from GPS devices, GeoJSON shapes, and Google Earth-specific KML layers.
  • Include other mapping services to get directions with turn-by-turn instructions, to geocode addresses, and to determine your geolocation.
  • Create reports with a customizable template based on data from maps and databases.
  • Allow users to freely customize maps using events or interactive markers and shapes.

The examples in the book make use of:

Embarcadero Delphi Sydney 10.4 or newer suggested. Trial versions and free developer accounts of service providers suffice to run the examples. SQLite database examples are ready for use without server setup. Basics for reporting, web, and XData explained in “TMS WEB Core: Web Application Development with Delphi” and previous Hands-On titles are not included again but referenced.

How to order

Read More

Read More

What’s the piece of Delphi knowledge you find yourself looking up over and over again…

From an interesting thread at [WayBack] What’s the piece of Delphi knowledge you find yourself looking up over and over again? For me format strings is probably the thing that most stubbornly… – Lachlan Gemmell – Google+ [WayBack] format strings Generics, as not much has changed in the docs since [WayBack] Overview of Generics or the linked articles: [WayBack] Terminology for Generics [WayBack] Declaring Generics [WayBack] Overloads and Type Compatibility in Generics [WayBack] Constraints in Generics [WayBack] Class Variable in Generics [WayBack] Changes in Standard Functions and Grammar [WayBack] Declared Constants: Typed Constants File extenions with or without dot? The prefix period is included [WayBack] Delphi Basics : extractfilename command, but the file NAME does not include a prefix backslash: [WayBack] AnsiStrings.ExtractFileExt Function [WayBack] AnsiStrings.ChangeFileExt Function [WayBack] irregular syntax, for instance record constants [WayBack] variant parts in records On the generics side, I have wrote a few bits in my blog before, often pointing to information by others (many by Stefan Glienke as his skills on this topic are beyond excellent): Delphi Constraints in Generics – RAD Studio XE documentation wiki Impossible: Property using Generics in Delphi. Interfaces/classes/methods/fields/constraints/type inferencing are How do I test an interface? Should I even do that? | Software on a String As Delphi generics are not supported for free functions, wrap them in a record container Workaround for Delphi 2010 compiler error “E2076 This form of method call only allowed for class methods” when it infers a generic parameter type The Default magic function in Delphi Reminder: rebuild my Nullable Types based on Class Operators in Delphi Implementing Memoize in Delphi 2009 – Community Blogs – Embarcadero Community Delphi XE8 things I learned from the first week of G+ reading Delphi/Fortran memory allocation difference: row/column major order makes a big difference. StackOverflow answer Spring4D: How is the GlobalContainer intended to be used? Are there important don’ts? Delphi: do not mix interfaces and classes part X If you use Delphi or RAD Studio 10.2.2, ensure you have the latest one installed (build 2004) as it fixes some binary DCU incompatibility bugs Reminder to self – proposals for Delphi Language Enhancements, a year later Delphi and the joy of Compiler Intrinsics – I cant use “Length” as a TFunc… Delphi sorcery: Generics, modules and typeinfo Interesting discussion about generic Dictionaries in Delphi (via: Steve Maughan – Google+ – TObjectDictionary Advice Needed) Stefan Glienke on Delphi generics: Implementing List Enumerator OfType in Delphi – Stack Overflow Implementing Memoize in Delphi 2009 – Community Blogs – Embarcadero Community Delphi history: No, dynamic arrays do not support a non-zero lower bound, but what if you want them? – via Stack Overflow Looking for more examples of Unicode/Ansi oddities in Delphi 2009+ Delphi analog to C# ?? null-coalescing operator and Light Table like debugger evaluation Some interesting Delphi posts by Stefan Glienke – Spring4D maintainer Delphi XE8 things I learned from the second week of G+ reading Some links to Delphi Unit Testing history Default comparers in Delphi used by TArray.Sort (via: Stack Overflow) Call for help: Spring4D and Delphi MultiCast events: working for Win32, Win64 and Mac OS X x64, but Android/iOS ARM help needed More Delphi PDF manuals (via: Cape Cod Gunny Does Delphi: The One Manual Every Delphi Programmer Should Have!) Some Delphi libraries and ideas you should take a look at (link clearance) Some words on Unicode in Windows (Delphi, .NET, APIs, etc) Another case against FreeAndNil On List growth strategies and memory managers RAD Studio 2015 Roadmap – Blogs CodeRage 9 Q&A: Advanced RTTI in Object Pascal (Ray Konopka) co-worker question: what is better, extension methods or helper classes? And on records: Delphi “Variant Records”, a few notes Undocumented Delphi record alignment directive – Chee Wee’s blog: IT solutions for Singapore and companies worldwide Record helpers can do wonders for code clarity Delphi: ^TNodeData incompatible with PNodeData – {$T+} versus {$T-} There are some very good books on Delphi though that dig deeper than the documentation: Delphi books you should have or have read –jeroen
Read More

Request payments with QR codes in a TMS WEB Core application

After releasing our free TWebQRCode component for TMS WEB Core, we wanted to see if there is a way to make payments with QR codes. While most solutions rely on different services and API keys, there’s one European standard that many banks adopted already in some European countries. If you are curious about the full list of supported countries and banks, please head over to scan2pay.info

This standard is called EPC QR code and it is actually nothing more than a structured content that can be used to initiate a SEPA credit transfer.
Structuring the content manually is OK for some people, but we went a step further and updated our TWebQRCode component so you can take advantage of EPC QR codes to request payments with as little effort as possible:

  • TWebQRCode.GenerateEPCCode is a new method with parameters based on the EPC QR guidelines. The mandatory fields are the BIC code, beneficiary name and beneficiary IBAN number.
    //Generate EPC QR code with mandatory fields
    WebQRCode1.GenerateEPCCode('BIC', 'Beneficiary name', 'Beneficiary IBAN number');
    //Generate EPC QR code to request 5.5 EUR payment
    WebQRCode1.GenerateEPCCode('BIC', 'Beneficiary name', 'Beneficiary IBAN number', 5.5);
  • TWebQRCode.CorrectionLevel is a new property where you can set the error level of the QR code. The error level determines how much of the QR code can be missing while keeping it readable. An EPC QR code must be generated with M error level. The GenerateEPCCode method takes care of the correct error level setting under the hood.
  • We also updated the JavaScript file that we use in the TWebQRCode component, so if you experience any issues after downloading the component again, please try to clear your browser cache first.

You can download the updated TWebQRCode component from our TMS WEB Core Partner page. We also created a small application to demonstrate how easy it is to use TWebQRCode to generate payment requests. You can check it out by clicking the button below!

There are some countries that adopted a different format. For example the Czech Republic and the Slovak Republic uses Short Payment Descriptor. While we are unable to test this, one of you might find the idea interesting enough to test it with our TWebQRCode component or to create your own component for it. 😉 And don’t forget, if you have a component that’s worth sharing with others then contact us, become a TMS WEB Core Partner and enjoy the benefits!

Read More

Read More

Create calendar events with TMS WEB Core

The world is busier than ever and unless you are gifted with an incredible memory you need your own agenda to keep track of all the appointments and events. Luckily there are media types that allow you to store and share calendaring and scheduling information: vCalendar and iCalendar. But what is the difference between the two? To put it simply, vCalendar is an older format while iCalendar a newer format that is based on vCalendar. Both formats are widely supported.

vCalendar and TMS WEB Core

In many cases if you download a VCS/ICS file your device will either automatically try to add it to your calendar or you first need to open the file and then it will prompt you to add it to your calendar – as long as you have an application installed that supports VCS/ICS.
So we asked ourselves: Can we create and download a VCS/ICS file directly from a TMS WEB Core client application? A few hours of research work resulted in a new non-visual component: TWebvCalendar.

TWebvCalendar is a component that implements the RFC2445 specification. It encapsulates the functionality of vCalendar and iCalendar in a Delphi-friendly way.

To change between the two formats, use the TWebvCalendar.vCalendarVersion property, where the vv1 value indicates vCalendar and vv2 refers to iCalendar. The default version is set to vv2 as most modern calendaring/scheduling applications support it anyway.
You can add the events either at design-time or programmatically via the TWebvCalendar.vEvents property, which is a collection of TvEvent items.

procedure TForm1.WebButton1Click(Sender: TObject);
var
  vevent: TvEvent;
begin
  vevent := WebvCalendar1.vEvents.Add;
  vevent.DTStart := EncodeDate(2020,8,1)+EncodeTime(10,0,0,0);
  vevent.DTEnd := EncodeDate(2020,8,1)+EncodeTime(12,0,0,0);
  vevent.Summary := 'My first appointment';
  vevent.Location := 'My location';
  WebvCalendar1.SaveToFile('mycalendar.ics'); //default is vv2
end;

The various TvEvent properties are all based on the specification linked above.

Example

We have some events coming up in the following weeks starting this Thursday (13th August) with a Webinar hosted by Embarcadero Germany. If you haven’t already, you can still register here!
To keep track of all these events, we decided to create a Progressive Web Application (PWA). A PWA behaves just like a regular website when you visit it from your browser:

But as you can already see in the image, it’s also possible to install it as an application on your device! After that, it can be accessed from the home screen:

From left to right the images are as follows: Application on the home screen, running the installed application and clicking the “Add” button.

The code itself is rather simple. First we need to make an HTTP request and process the incoming JSON response that contains all the events. It’s important to mention that we store and retrieve the time for each event in UTC with no offset. This way when we convert a time to a JavaScript Date object and after that to a TDateTime object, the correct time zone is automatically handled. If you are currently not in the CEST time zone, then you are going to see a different time than what’s seen in the picture above.

The next thing to do is to show the event items in a TWebResponsiveGrid. While we process the incoming data we can use the TWebResponsiveGridItem.ItemObject property to save everything we want to access later. Then to add these event to our calendar, we add a button to each of these grid items by implementing the TWebResponsiveGrid.OnItemCreated event:

procedure TForm3.WebResponsiveGrid1ItemCreated(Sender: TObject; Index: Integer);
var
  cont: TControl;
  btn: TWebButton;
  itm: TWebResponsiveGridItem;
begin
  itm := WebResponsiveGrid1.Items[Index]; //get the grid item

  cont := TControl.Create(WebResponsiveGrid1); //create a dummy TControl
  cont.Container := itm.ElementHandle; //assign the TJSHTMLElement of the item to the dummy control
  
  btn := TWebButton.Create(cont);
  btn.Parent := cont;
  btn.Caption := 'event Add';
  btn.Tag := Index; //set the Tag to the Index value
  btn.Cursor := crHandPoint;
  btn.ElementClassName := 'add-button'; //this CSS class contains the button positions
  btn.ElementPosition := epIgnore;
  btn.OnClick := DoEventClick;
  //Add the ElementHandle of the button to the ElementHandle of the grid item.
  //It depends on your specific item structure, but usually it looks something like:
  //itm.ElementHandle.appendChild(btn.ElementHandle);
end;

The DoEventClick method gets assigned to all of the buttons, so we are going to use the Tag property to differentiate between the different buttons. All that left to do is to create a TWebvCalendar instance and save the event to our device:

procedure TForm3.DoEventClick(Sender: TObject);
var
  ev: TEventItem; //this is a custom TObject class
  vcal: TWebvCalendar;
  vevent: TvEvent;
begin
  ev := TEventItem(WebResponsiveGrid1.Items[(Sender as TWebButton).Tag].ItemObject); //get the ItemObject 
  vcal := TWebvCalendar.Create(self);
  vcal.vCalendarVersion := vv2; //use iCalendar
  vevent := vcal.vEvents.Add;
  vevent.DTStart := ev.StartTime; 
  vevent.DTEnd := ev.EndTime;
  vevent.Summary := ev.Subject;
  if ev.Location  '' then 
    vevent.Location := ev.Location;
  vcal.SaveToFile('myevent.ics');
  vcal.Free;
end;

We believe that this example once again proves how powerful TMS WEB Core is. Our demo can be accessed online by clicking the button below and don’t forget that this is a PWA, so you can add it to the home screen of your mobile device!

We also decided to make this TWebvCalendar component available through our TMS WEB Core Partner program just like we did with TWebQRCode and TWebZip components. You can download it for free from here. The full source code of the demo is also available in the download, so you already have a starting point if you want to create something similar for your web application!

To install, open, compile & install the package from the “Component Library Source” folder. This will install the design-time TWebvCalendar component.
For use at runtime, make sure that the “Core Source” folder is in your TMS WEB Core specific library path that you can set via IDE Tools, Options, TMS Web, Library path.

Read More

Read More

Delphi What’s new history and a docwiki URL trick

One of the great things about the Delphi docwiki structure is that the naming system is very consistent. The consistency helps you quickly finding the What’s new for any version, just by getting the latest first. Getting the latest one is based based on a docwiki redirection trick that always redirects from an “unversioned” URL to the latest one. So these two “unversioned” URLs always get you there: http://docwiki.embarcadero.com/RADStudio/en/What%27s_New just the “What’s new” for the current release http://docwiki.embarcadero.com/RADStudio/en/What_Was_New_in_Past_Releases a list of “What’s new” links from the prior release all the way back to 2007 When writing this, the above links got me the below list. For consistency (as you cannot save URLs for prior versions in the WayBack machine because a brain-dead robots.txt setting which archive.is luckily ignores): [Archive.is] http://docwiki.embarcadero.com/RADStudio/Tokyo/en/What’s_New [Archive.is] http://docwiki.embarcadero.com/RADStudio/Tokyo/en/What_Was_New_in_Past_Releases [Archive.is] http://docwiki.embarcadero.com/RADStudio/Berlin/en/What’s_New [Archive.is] http://docwiki.embarcadero.com/RADStudio/Tokyo/en/What_Was_New_in_Berlin [Archive.is] http://docwiki.embarcadero.com/RADStudio/Seattle/en/What’s_New [Archive.is] http://docwiki.embarcadero.com/RADStudio/Tokyo/en/What%27s_New_in_Seattle [Archive.is] http://docwiki.embarcadero.com/RADStudio/XE8/en/What’s_New [Archive.is] http://docwiki.embarcadero.com/RADStudio/XE8/en/What’s_New_in_Delphi_and_C++BBuilder_XE8 [Archive.is] http://docwiki.embarcadero.com/RADStudio/XE7/en/What’s_New [Archive.is] http://docwiki.embarcadero.com/RADStudio/XE7/en/What’s_New_in_Delphi_and_C++Builder_XE7 [Archive.is] http://docwiki.embarcadero.com/RADStudio/XE6/en/What’s_New [Archive.is] http://docwiki.embarcadero.com/RADStudio/XE6/en/What’s_New_in_Delphi_and_C++Builder_XE6 [Archive.is] http://docwiki.embarcadero.com/RADStudio/XE5/en/What’s_New [Archive.is] http://docwiki.embarcadero.com/RADStudio/XE5/en/What’s_New_in_Delphi_and_C++Builder_XE5 [Archive.is] http://docwiki.embarcadero.com/RADStudio/XE4/en/What’s_New [Archive.is] http://docwiki.embarcadero.com/RADStudio/XE4/en/What’s_New_in_Delphi_and_C++Builder_XE4 [Archive.is] http://docwiki.embarcadero.com/RADStudio/XE3/en/What’s_New [Archive.is] http://docwiki.embarcadero.com/RADStudio/XE3/en/What’s_New_in_Delphi_and_C++Builder_XE3 [Archive.is] http://docwiki.embarcadero.com/RADStudio/XE2/en/What’s_New [Archive.is] http://docwiki.embarcadero.com/RADStudio/XE2/en/What’s_New_in_Delphi_and_C++Builder_XE2 [Archive.is] http://docwiki.embarcadero.com/RADStudio/XE/en/What’s_New [Archive.is] http://docwiki.embarcadero.com/RADStudio/2010/en/What’s_New [Archive.is] http://docs.embarcadero.com/products/rad_studio/delphiAndcpp2009/HelpUpdate2/EN/html/devcommon/whatsnewtiburon_xml.html [Archive.is] http://docs.embarcadero.com/products/rad_studio/radstudio2007/RS2007_helpupdates/HUpdate4/EN/html/devcommon/whatsnewspacely_xml.html [Archive.is] http://docs.embarcadero.com/products/rad_studio/radstudio2007/RS2007_helpupdates/HUpdate4/EN/html/devcommon/whatsnewcogswell_xml.html By now, there will hopefully be a few more Delphi versions released. Reminder to self: update the list (: –jeroen .gist table { margin-bottom: 0; } User-agent: * Disallow: /DevWiki/ Disallow: /Internal/ Disallow: /*/cache/ Disallow: /shared/ Disallow: /appmethod/sites/ Disallow: /sites/ Disallow: /menu/ Disallow: /Search/ Disallow: /VCL/ Disallow: /Libraries/XE/ Disallow: /Libraries/XE2/ Disallow: /Libraries/XE3/ Disallow: /Libraries/XE4/ Disallow: /Libraries/XE5/ Disallow: /Libraries/XE6/ Disallow: /Libraries/XE7/ Disallow: /Libraries/XE8/ Disallow: /Libraries/Seattle/ Disallow: /RADStudio/2010/ Disallow: /RADStudio/XE/ Disallow: /RADStudio/XE2/ Disallow: /RADStudio/XE3/ Disallow: /RADStudio/XE4/ Disallow: /RADStudio/XE5/ Disallow: /RADStudio/XE6/ Disallow: /RADStudio/XE7/ Disallow: /RADStudio/XE8/ Disallow: /RADStudio/Seattle/ Disallow: /CodeExamples/XE/ Disallow: /CodeExamples/XE2/ Disallow: /CodeExamples/XE3/ Disallow: /CodeExamples/XE4/ Disallow: /CodeExamples/XE5/ Disallow: /CodeExamples/XE6/ Disallow: /CodeExamples/XE7/ Disallow: /CodeExamples/XE8/ Disallow: /CodeExamples/Seattle/ Disallow: /CodeSamples/ Disallow: /AllAccess/e/ Disallow: /AppWave/e/ Disallow: /DBOptimizer/e/ Disallow: /RadPHP Disallow: /*/Special: Disallow: /*/index.php? Disallow: /*/index.php/ view raw docwiki.embarcadero.com-robots.txt hosted with ❤ by GitHub
Read More

Embarcadero Germany webinar about TMS WEB Core

With TMS WEB Core v1.5 Rimini just released, enthusiast German speaking Delphi web developers can learn about TMS WEB Core and in particular about the new features in the latest release v1.5 Rimini in the upcoming webinar organized by Embarcadero Germany.

Our chief evangelist Holger Flick will take a tour around TMS WEB Core and the exciting new capabilities v1.5 brings to increase your productivity for creating classic web applications, installable mobile applications (PWA or progressive web applications) and cross-platform Electron desktop applications. And this all from your familiar powerful Delphi 10.4 Sydney IDE. Bruno Fierens will also attend the webinar and will assist to handle all your questions. Register now for the webinar to ensure your seat.

Here is the original announcement text for the webinar in German:

TMS WEB Core ist für viele Delphi-Entwickler zu einem beliebten Entwicklungstool für Webanwendungen geworden. TMS Software hat in den letzten zwei Jahren regelmäßige Updates bereitgestellt, wodurch die Anzahl der Steuerelemente und Technologien zur Erstellung beeindruckender Webanwendungen ständig zunahm.

Dieses Webinar konzentriert sich auf die neue Version 1.5 Rimini, in der zwei Werkzeuge vorgestellt werden, die die visuelle Anwendungsentwicklung erheblich verbessern. Die Interaktion mit Webdesignern, die nicht an der Programmierung der Anwendung beteiligt sein müssen, wird viel einfacher werden. Außerdem werden neue Steuerelemente für handschriftliche Unterschriften, Styling, Benachrichtigungsfenster und Web Sharing eingeführt. Schließlich wird es mit der neuen Version möglich sein, datenbankgestützte Electron Desktop-Anwendungen zu erstellen, die direkt mit MySQL- und PostgreSQL-Datenbanken verbunden sind.

Jetz hier anmelden für das Webinar!

Read More

Read More