If you’re a fan of macros in the code editor, then 4D v18 R5 has some good news for you … because now macros are also available in the form editor!
Let me start by telling you how useful macros can be for you. Have you ever needed to use formatting or naming rules in your application, then apply them to each new form? Or maybe you’ve had to work on existing forms created by someone else, and always need to do the exact same checks and analyses before getting started. If you’ve ever encountered one of these scenarios, then 4D v18 R5 is for you because it gives you the ability to create macros and save time on predictable, repetitive tasks.
Using $1, $2, and $n variables in your code not only makes the code less readable, it can also increase confusion since the human brain can find it difficult to remember what these variables correspond to. The solution is to create a variable with an understandable name and assign it the value of $1, $2, or $n.
4D v18 R5 has good news, you can now name your parameters when declaring:
- a project method,
- a trigger
- a database method
- a form method
- a constructor of a class
- a function of a class.
Let’s see how!
In 4D v18 R5, you can preview the final CSS rendering in the form editor WITHOUT running your dialog. Yes, you heard that right. Standardizing and reviving your forms has never been easier!
If you haven’t yet heard about CSS in 4D, now’s the perfect time to learn more! Introduced in 4D v18 for project applications, this concept includes enhanced and quick style sheets based on CSS. I recommend taking a look at this blog post.
With projects and the ability to share project application source code via a source control system, we’ve published more than 35 repositories to GitHub (at the time of writing this blog post). This includes HDIs, components, and full example applications. Speaking of full example applications, two more have recently been added:
Projects were introduced in 4D v17 R5. An architecture representing a giant evolution for 4D applications, projects opened the 4D world to source control tools, collaborative programming, code sharing, modularity, and much more! To make things even better (and simpler), 4D v18 R4 creates new projects by default, while developers – if they choose to do so – can continue to create binary databases via a simple setting.
In a previous blog post, we showed you that documentation for methods has returned in the Explorer. Want to take things even further and use them as documentation for your components? In this blog post, we’ll show you how!
When developing an application, it can be very useful to have quick access to the details of a method (e.g., an explanation of what it does, its syntax, and a definition of the parameters passed to it). This becomes even more important when using a compiled component. You can’t look at the content of the method, so you can only rely on its documentation to understand how to use it.
The Explorer’s dialog has been enhanced and documentation is now available in 4D v18 R3 for project databases.
In a previous R-release, we added two new automatic themes to define font and the font size, so there are three automatic themes at your disposal which respect the guidelines of each platform. To design your interface, the automatic theme is the recommended way to go with each form object using the font and size recommended by the OS.
In some cases, you may need more control and have valid reasons to ignore the guidelines. With 4D v18 R3, you can override the size of the automatic themes and have more control over how your text is displayed.
In a previous blog post, we introduced a very important concept in object-oriented programming: Classes. Now we’ll go through another core concept: Inheritance, the mechanism that allows a class to acquire the behavior of another class.
Many of you have have been asking to be able to define an object type ever since the Object type became available. Thanks to object notation, many of you dream of having object functions. Dream no more and say hello to classes in 4D v18 R3 project database! In this blog post, we’re introducing one of the most interesting concepts of object-oriented programming … along with a database example and a bonus video!
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