4D for iOS: Optimized data synchronization
The 4D for iOS data synchronization process has been redesigned from scratch in 4D v18 R5!
As you probably already know, 4D for iOS allows you to extend a subset of your physical structure to mobile devices and consult your data offline in a very efficient way.
Search emails with IMAP protocol
Sometimes you need to find all of the unread emails on your mail server and download them to display them to your client. The searchMails method does it for you! It uses the IMAP search protocol which is done entirely on the server-side. This means that it’s fast and allows you to retrieve only the desired emails.
Multiple instances of merged server applications on the same machine
Hosting several 4D Server applications on the same machine is not unusual, especially for production and pre-production environments. But if your machine hosts merged server applications built with different 4D versions, which is the case if you use your pre-production server with the latest 4D version, you may encounter problems due to the shared 4D structure folder.
Let’s see how to resolve this issue.
ORDA – Share an entity selection between processes
4D v16 R6 introduced a new concept of communication between processes: shared object and shared collection variables! Thanks to this, you’re able to easily share information between processes.
Until now, entity selections weren’t shareable between processes. However, that has changed … we’re pleased to announce that in 4D v18 R5 entity selections are shareable!
Gone are the days of building a list of primary keys to move a selection of entities to another process. Enhance your multi-processes code by including ORDA entity selections as shared objects.
Keep reading to learn more.
4D View Pro: Use 4D formulas in your spreadsheet
4D v18 R5 introduces a new command that simplifies writing your code: VP SET CUSTOM FUNCTIONS. It creates custom functions in 4D View Pro which execute 4D formulas.
Thanks to this command you can now allow 4D commands, fields, variables, methods, or any arbitrary expression to be used in your cell formulas. For example, there’s no need to create a method to use a simple variable in 4D View Pro, just pass it as a parameter to your Formula.
Automate repetitive tasks and more with form macros!
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.
4D Write Pro: soft-hyphens made easy
With 4D v18 R5, we’ve simplified the insertion of soft-hyphens by providing new standard actions, as well as new buttons in the 4D Write Pro Interface widgets.
4D for iOS: Improved UX (& more) with deep Linking
4D v18 R5 includes a new great feature: Deep linking. That’s cool, but what the heck is it?
Here’s an example:
Have you ever gotten an email from Netflix asking if you want to continue watching a movie that you stopped halfway through? You click the link, but it doesn’t take you to the Netflix home page or launch the application on your phone. Instead, clicking the link opens the player, and resumes the movie exactly where you stopped.
That’s deep linking! It allows users to open a specific view in their app just by clicking on a URL (significantly improving the user experience and increasing user retention and engagement).
Remote debugger: Debug server code on the client
There are many different client/server development scenarios, but in all of them, you need to switch between the client-side and the server-side to look at your server debugger or error window. To make your life easier, we’ve added a new option that allows you to decide where you want to debug your server code. Do you need to debug on a client because your server is headless? Just attach it to your client through your 4D menu!
Coder-friendly syntax for class functions and methods
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!
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