What’s new in 4D 20 R8

Form Editor

Enhanced Syntax Checking

With 4D 20 R8, early detection of syntax errors is now more efficient, boosting productivity and code quality. The key benefits include associating a class with a form to enable syntax checking with expressions like Form.myProperty, real-time expression validation in the property list, and automatic object instantiation when using the DIALOG command.

The code editor now features auto-completion for the Form command, reducing typos, while syntax errors are detected in the code editor and property lists, ensuring smoother, faster development.

Improved FORM EDIT Command

In 4D 20 R8, the FORM EDIT command lets you directly open a form and select a form object, simplifying your workflow and boosting productivity. You can quickly access and modify properties without navigating multiple pages, making form editing more efficient.

The Dependency manager

ADVANCED PROJECT DEPENDENCY MANAGEMENT

4D 20 R8 makes dependency management more straightforward. Introducing auto-checking for dependency updates directly from GitHub, ensuring your projects stay current with the newest features and fixes. Semantic versioning rules allow you to define update strategies—ranging from precise version locking to flexible ranges—so you maintain complete control. With clear notifications and manual override options for targeted or bulk updates, you can adapt dependency management to suit your project’s unique needs.

4D Server

Master HTTP Requests with 4D Request Handlers

4D 20 R8 introduces HTTP Request Handlers, a powerful new feature for the 4D HTTP Server that provides a structured way to manage and respond to incoming web requests. Whether you’re handling user authentication, file uploads, or specific URL-based logic, this feature offers precision and flexibility, ensuring your web applications align with your business needs.

The new 4D.IncomingMessage and 4D.OutgoingMessage classes give you direct access to request properties—such as URL, headers, and body content—enabling you to return fully structured responses tailored to your application needs. Whether you’re logging request data for performance analysis, redirecting users based on privileges, or dynamically delivering files, HTTP Request Handlers make it straightforward to achieve your goals.

Configuration is quick and intuitive, thanks to the HTTPHandlers.json file. Define handlers and map them to singleton class functions easily, creating a clean and organized system that adapts effortlessly to changing requirements.

Notarization on MacOS

Changes to Component Structure

Starting with 4D 20 R8, we’ve updated the component structure to meet Apple’s notarization requirements for Silicon-based Macs.

This new structure simplifies notarization and deployment, making it as easy as deploying a 4D application.

Note that the updated structure isn’t compatible with older versions of 4D (e.g., 4D 20 R7). Components built with 4D 20 R8 benefit from automatically set fields like CFBundleDisplayName, CFBundleShortVersionString, and CFBundleVersion. For components built with Build4D, these fields are populated using your buildApp.4DSettings. Note that the updated structure isn’t compatible with older versions of 4D (e.g., 4D 20 R7 or 4D 20 LTS), while 4D 20 R8 can use components in the old format.

Debugger

Improved debugging Experience

4D 20 R8 brings significant improvements to the debugger and remote debugger.

With auto-saved expressions, you no longer need to re-enter previously evaluated expressions, ensuring a better debugging experience. The new “pin” feature lets you keep essential expressions always accessible.

You also get more control with Local Variables, Line Expressions, and Custom Expressions in the expression watcher.

Finally, the redesigned interface offers a cleaner, more intuitive debugging environment.

The 4D-Debugger extension

Debugging 4D Code Directly in Visual Studio Code

4D 20 R8 introduces the new 4D-Debugger extension for Visual Studio Code, enhancing debugging with powerful features like setting breakpoints, stepping through code, and inspecting variables—all directly within VS Code. This tool builds on the 4D-Analyzer and integrates smoothly, making debugging faster and more intuitive.

Install the 4D-Debugger extension from the VS Code marketplace. Ensure a 4D Server is running on your machine, and configure the connection in the .vscode/launch.json file. You can also attach to an existing server using the default debugger port.

4D Write Pro

Command syntax improvements

4D 20 R8 brings significant improvements to 4D Write Pro, making your code cleaner, easier to maintain, and faster to implement. With updated commands and functions, you now have better support for objects, collections, and modern parameters, simplifying everything from document handling to table operations.

  • Simplified Attributes: Use objects for WP SET ATTRIBUTES to apply formatting quickly.
  • Flexible Tables: WP TABLE APPEND ROW supports formulas and collections.
  • Images: WP INSERT PICTURE returns picture elements and accepts 4D.File arguments.
  • Content Insertion: WP INSERT DOCUMENT BODY focuses only on document content.
  • New functions like This.sectionIndex and This.sectionName, and This.pageIndex make accessing document elements straightforward,

4D View Pro

Excel import/export update

In 4D 20 R8, working with Excel files in 4D View Pro has become more efficient and flexible than ever. The new export options in the VP EXPORT DOCUMENT command offer greater control, allowing you to include or exclude binding sources, styles, and formulas as needed. You can freeze row and column headers to maintain consistent formatting, include calculation data for faster workbook loading, and even set a password to secure your exported files.

On the import side, the VP IMPORT DOCUMENT command now supports advanced options that preserve formatting, cell styles, and formulas, maintaining the integrity of your original Excel data. This means less cleanup work and more reliable data integration into your 4D View Pro interface. All export and import features are organized in a clear $excelOptions object, making your code more maintainable and backward-compatible with existing projects.

4D Netkit

Get user information from Google

4D 20 R8 makes accessing Google user information faster and more efficient. With new built-in features, you can effortlessly retrieve details about authenticated users, domain profiles, and contacts. Whether you’re enhancing user interfaces or automating email communications, simple commands like Google.user.getCurrent(), Google.user.list(), and Google.user.get() enable you to quickly access and handle relevant data.

Security

IMPROVED CRYPTO SIGNING AND VERIFICATION

With 4D 20 R8, the 4D.CryptoKey.sign() and 4D.CryptoKey.verify() functions now support both blobs and text, eliminating the need for conversion between formats. This enhancement simplifies your workflow, allowing you to directly sign and verify binary data with ease.

Session

Simplified Session Management for Development and testing

With 4D 20 R8, the Session object is now fully functional in standalone and single-user applications, eliminating the need for complex workarounds during development and debugging. It provides a valid object, enabling easier session data management, role-based restrictions, and testing of client/server functionalities—all within a simplified workflow.

Build Application

BUILD STAND-ALONE APPLICATIONS WITH EASE

Building Stand-Alone applications no longer requires an embedded license. This simplifies the process, giving you more flexibility in deploying your applications. When end users launch your Stand-Alone application, they can easily register a 4D Desktop license via a user-friendly dialog. Once registered, licenses are stored securely on their system. Plus, Stand-Alone applications with a registered license no longer display the Sponsored dialog upon quitting—offering a polished and professional user experience.

Network Handling

New Class to Perform TCP Connections

4D 20 R8 introduces the TCPConnection class, offering a modern, object-oriented, and asynchronous way to handle TCP client connections. It provides an updated syntax and callbacks, such as onConnection, onData, and onError. You can establish connections, send data as blobs, and handle events seamlessly.