Introducing the Latest Find and Replace Features
The “Find and Replace” feature in the code editor has existed for many years. Developers can easily and efficiently search and replace code, especially when dealing with large codebases. 4D v20 is bringing improvements that are sure to be appreciated by developers who rely on this functionality to streamline their coding workflows:
- knowing the number of occurrences to replace,
- knowing the position of the current occurrence,
- having permanent access to the Next and Previous navigation options,
- display a palette instead of a modal window to limit the number of clicks.
Comparison with an Undefined Value
Since the appearance of ORDA, classes, and other objects, you must work increasingly with undefined values.
Since some of you are asking for an easier way to use them, starting with v20, you can compare any type of value to an undefined value without throwing an error.
New Built-in Websocket Server
In an increasingly connected world, websites or IoT applications must be updated in real-time.
A way to deliver information instantly to your sites is to use the Websocket protocol that provides a full-duplex communication channel between a server and a client. From the v20, 4D provides commands to create a Websocket server.
POP3: Download the Mail Header Only
When retrieving email messages using POP3, it’s possible to retrieve just the message headers (which include information such as the sender, subject, and date) without downloading the entire message body.
Retrieving just the message headers can be helpful when you want to quickly scan the list of messages in your mailbox to decide which ones to download and read in full.
Starting with 4D v20, a new parameter is added to the .getMail() function of the POP3 transporter to receive your emails without the body. This function can be even more helpful if you use Gmail because it does not trigger the deletion of read emails.
Microsoft 365: Create, delete, and rename mail folders with the Microsoft Graph API
To access the data in Microsoft 365, like emails, Microsoft is deprecating Basic authentication for IMAP and POP3 and is increasingly promoting the Graph API.
With this last set of functions that includes all the features to manage folders from the 4D v20, you have in 4D NetKit a set of functions to manage your mailboxes by programming with the Microsoft Graph API.
Integrate your Own Administration Window for 4D Server
When deploying their applications, some developers want to customize the built-in 4D dialogs to fit their needs. It is especially true for the 4D Server Administration Window where they sometimes want some information and actions to be accessible only for their team and not for their customer administrators.
Automatic integration of multiple journals
As developers and database administrators, you know the importance of quickly recovering from data corruption. Backups and journals help you with the task. But sometimes, a backup may be corrupted, and you need to come back from an older backup and integrate multiple journals consecutively. Or maybe your journal file is growing big too quickly, and you prefer to regularly create a new one to avoid cluttering your server hard drive. Or you are just using your own way of backing up your database. In all these cases, you must integrate multiple journals, which is only manually possible through the Maintenance and Security Center.
With 4D v20, you can automatically integrate multiple journals at database startup. Let me explain to you how it works.
Meet the Improved Distinct Function
Retrieving the list of unique data elements is always helpful when manipulating data. In some cases, retrieving the number of occurrences of each value is essential. The distinct function of the Collection and Entity selection classes allows retrieving a list of unique values. With 4D v20, you can also retrieve the number of occurrences of each distinct value.
And that’s not all!
An object in the database can be used to save custom data entered by the user. So on the code side, you need to know all the possible paths to the object. The distinctPaths function has been added to the Entity selection class.
Here is everything you need to know.
New VS Code Editor Features with 4D v20
As usual, a new release, new VS Code extension features for developers who want to view and edit code with this free editor.
4D v20 brings new capabilities to the Visual Studio Code editor through the 4D-Analyzer extension: Say hello to Document Syntax Checking, which will help the developer to type fewer mistakes, Code Folding and Indentation for a better look, and tool4d to allow faster LSP server starting.
Object and Collection Literal Initializer
In your code, objects and collections can be instantiated using New object and New collection commands.
However, starting from 4D v20, a more convenient and readable approach is available using object literals and collection literals. These new features provide a simpler and clearer way to initialize objects and collections.
Contact us
Got a question, suggestion or just want to get in touch with the 4D bloggers? Drop us a line!
* Your privacy is very important to us. Please click here to view our Policy