Build an Application with 4D Commands
Since several versions of 4D, different features have been added to create your own build chain. For example,
- the creation of a “.zip” folder,
- the addition of information such as the copyright on an executable or a “dll”,
- the creation of an “info.plist” file,
- and the new build4D component.
With 4D v20, two new features allow finalizing the creation of a standalone or client/server application in 4D code:
- the addition of an icon to an executable
- the generation of the deployment license file for a server (OEM license only) or a standalone application.
Data Explorer Embedded in 4D
Data Explorer allows you to view the data in your database. You can choose which fields to display, organize, filter, and sort the data.
With 4D v20, the Data Explorer can be opened in 4D instead of an external browser. Users can access the Data Explorer directly from the toolbar with just one click, saving time and improving productivity.
Evolution of Form Objects
To allow you to make the most beautiful interfaces, we continue to improve the form objects. Since 4D v19 R6, you can define a rounded border for static text and input text form objects.
With 4D v20, new possibilities are available.
- For buttons, radio buttons, and checkboxes, we have added new settings for the text and the icon.
- For radio buttons and checkboxes, the number of states for the icon has been improved to allow a better rendering for the end user.
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.
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.
Create a Help Menu with a Simple Collection
The “Help” menu of a software is handy. Obviously, you have a menu item to open the online documentation of the software, but also how to contact the support, and several other items depending on the software.
With 4D v20, you can easily create your application’s “Help” menu by passing a collection describing the different menu items.
4D for Mobile Tutorial – Choose an Input Control
Formatters allow you to format the displayed data or to define behavior when the user touches the data. The input controls follow the same principle. They allow you to select the type of keyboard, define the behavior, or format the data in an action form.
For example, for image data, you have by default two types of control, the first one allows you to select an image or to take a picture, and the second one displays a zone to sign.
There are 3 types of input controls:
4D for Mobile Tutorial – Create actions
Actions allow users to interact with the application to change the customer’s address, add a new contact and modify a picture.
In the 4D language, an action allows you to add, edit, and delete an entity or a selection entity. But also, it can simply execute a method of your 4D server.
4D for Mobile Tutorial – Include relations
The data of your application are linked together by two types of relationship: Many to One or One to Many.
In this blog post, we will show you how to include relations. With 4D for Android and 4D for iOS, you can easily navigate between your related data. We automatically generate the transition between views in your application.
4D for Mobile Tutorial – Using Formatters
A data formatter allows you to map a data type from your database to a specific display on the mobile side. For example, you can define a date, percentage, or currency format. Data formatters can also call some code to create intelligent interfaces.
For example, you can attach a data formatter to phone numbers that open an action menu on the mobile app when the user touches the number (e.g., to call the person or save them in contacts).
You have three formatter types:
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