Building Forms on the fly with New Data Source Commands
In application development, it is often necessary to build forms dynamically. For example, you might want to generate a search form on the fly, tailored to the user’s needs. In 4D, there are two main approaches for building dynamic forms: either constructing the entire form programmatically or adding objects to an existing form layout. For the second option, until now, it was possible to duplicate objects with OBJECT DUPLICATE, and modify the data source with OBJECT SET DATA SOURCE, all using a classic pointer-based approach.
With 4D 20 R10, new and powerful commands, OBJECT SET DATA SOURCE FORMULA and OBJECT Get data source formula, allow developers to bind a formula as the data source of form objects. Moreover, you can dynamically assign formulas to key listbox properties with the LISTBOX SET PROPERTY command such as Current item, Current item position, and Selected items.
This opens the way to a more modern, flexible and readable approach, thanks in particular to expressions such as Form.xx or the classes.
Improved FORM EDIT Command: Access Form Objects Easily
The 4D language allows you to develop outstanding business applications. Many of you have taken the initiative to create tools that streamline specific tasks: code, validating links to external elements like images, converting legacy code to ORDA, managing XLIFF resource files, or facilitating refactoring. These custom solutions enhance productivity and foster innovation.
In 4D 20 R8, the FORM EDIT command has evolved. You can now open a form and select a form object.
For instance, you can list the objects in a form from an analysis and introspection tool. Double-clicking on an element in the list will open the form, and you can select the form object to modify one of its properties using the new syntax of the command.
4D Write Pro commands optimized again!
As each new version is released, we take into account the feedback we receive from our customers on the general use of 4D Write Pro and its commands. While remaining 100% compatible, some commands and language functions are evolving!
Some commands, whose syntax have been improved in 4D 20 R8, now allow the use of modern parameters such as objects or collections. Others are now functions, making them easier to use. Finally, a number of new functions have been created. All this will make your code simpler, more generic and easier to maintain!
Energize your Web applications with the OutgoingMessage Class
In today’s digital world, a smooth and intuitive user experience is key to any web application’s success. A critical part of this experience is providing users with easy access to various resources—whether documents, images, or other data types. To make this possible, your server must manage and deliver different content formats efficiently.
With 4D’s 20 R7 new REST server feature, managing diverse content delivery is now easier than ever. Previously, the REST server could only return scalar, entity, or entity selection data. Now, it can deliver full web content directly—content ready for a browser to handle.
Downloading files or receiving binary data from the REST server is now straightforward, thanks to the new OutgoingMessage class. With it, you can easily customize responses to suit your needs.
Read on to explore how the OutgoingMessage class can enhance your application!
Introducing Session Singletons
Singletons have been one of the standout features of 4D 20 R5. Previously, developers could leverage two types of singletons:
- the process singleton, which is unique to each process but different across processes,
- and the shared singleton, which is unique across the whole application.
With 4D 20 R7, we are releasing a new type of singleton: the session singleton!
Enhancing Compilation with Direct Typing in 4D
With 4D 20 R7 you can say goodbye to “Compiler_” methods and embrace more freedom in how and where you declare your variables. Save time by staying focus on your development workflow and your coding process thanks to Direct Typing.
Exciting enhancements for managing processes and sessions
Managing processes and sessions is essential for optimizing and monitoring your 4D applications. You can easily manipulate and retrieve crucial information about these elements thanks to different commands.
With 4D 20 R7, we are pleased to announce a series of enhancements that make these functions even more accessible and effective. These new features are designed not only to simplify your work, but also to boost the performance of your code. The improvements include:
- Getting the process info in an object to make it easier to manipulate the properties,
- Allowing direct access to session info using a session ID for easier management,
- Making it easier to get a process number directly from its ID,
- Accessing the creation date of a process
- Optimized filtering of the results returned by the Process activity command to obtain all processes in a session.
Find out how these updates can transform your development experience and improve the efficiency of your applications!
Define a different icon for each window
We are excited to announce a new feature that will enhance the user experience in multi-window applications in 4D 20 R7. With the introduction of the SET WINDOW DOCUMENT ICON command, you now have the ability to define an icon for each type of window, making it easier for users to identify and navigate through different windows.
Permissions: Inspect Session Privileges for Easy Debugging
Today, you can benefit from a powerful feature to filter access to data, which is essential for preventing malicious access to your application.
This feature uses privileges that allow certain actions on your data. These privileges are assigned to users through roles and stored in the Session during authentication.
In 4D 20 R6, we enhanced this functionality by allowing you to inspect the privileges in the Session, which is very helpful for debugging.
Keep reading to learn more.
Easy Reference Comparison of Objects & Collections
Objects have become an essential part of the 4D language and of Qodly.
But when you declare a variable of this type, you define a reference. So, how do you know if two objects are, in fact, just one and share the same reference?
Starting with 4D 20 R6, comparing object references is simple: enter the = and # operators!
This blog post explores these operators and how they help determine if objects share the same reference. Let’s find out more!
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
