Four different ways to use objects with 4D Write Pro!
Quite frankly, we love objects. 4D Write Pro uses objects as the input/output of commands and functions to manipulate documents, text, paragraphs, etc. In this blog post, we’ll show you four different ways to use objects with 4D Write Pro.
Rearrange the object entry order in a single click
When working on a form, it often happens, for a reason or another, that you insert new objects within a group of existing objects in your form. In that scenario, the resulting object entry order often becomes illogical, and would let the user enter information in an awkward manner. This is where you need to restore the entry order to a logic one, and it can be a tedious task…
Enhancement of Get process activity command
The Get process activity command, added with 4D v16 R4, makes it possible to retrieve a list of running processes and connected users. With 4D v16 R5 we’ve further enhanced the command to make parsing the results easier. In addition to that, a new systemID attribute has been added to uniquely identify any process, whatever its type: user, 4D or spare.
Working with JSON Pointers
In 4D v16 R4, we enriched object commands so you can validate JSON objects. 4D v16 R5 is going even further by introducing the support of JSON pointers. Great – but what is a JSON pointer and what can I do with it?
Just like you don’t store company details for each employee in a database record (using a link to the company record instead), it can be really useful to structure a JSON document with parts that can be reused in a number of places.
For instance, let’s take an example of a website order; the customer enters the shipping address and designates the billing address as the same. Instead of duplicating the address information, we can define the shipping address as a reference to the the billing address.
Help tips on list boxes!
Help tips or hints are very useful, as they simplify the user interface and help users understand objects that sometimes aren’t self-evident. 4D supports help tips in most areas and inputs when hovering the pointer over them, but that was not the case with a list box object.
With 4D v16 R5 we have added the possibility to display a help tip on a list box cell thanks to the enrichment of two commands.
Passing data back and forth between forms
Wouldn’t it be great if you could just open a form and pass it some parameters to initialize your form objects? What about being able to also get the data back to process, after it’s been modified by the user? 4D v16 R5 makes your coding so much easier by greatly simplifying communications with forms.
Until now, when you wanted to display data (not coming from the database itself, but computed or external) to multiple users, you had two options: either write complex code to handle data display in multiple processes, or create as many forms as necessary with a bunch of global variables. But you know that global variables are not an optimized way of coding, from a memory point of view.
So get rid of your complex code and global variables! With 4D v16 R5 you can just bind an object to your form and use it internally with the new Form command. Painless…and powerful!
4D v16 R5 Beta starts today!
We are pleased to announce the launch of beta testing for 4D v16 R5! It’s chock-full of interesting things, so let’s take a look and see what 4D v16 R5 BETA has in store for you…
This release introduces some compelling features and enhancements, including:
- Enforced security for 4D Web Server and password handling with appropriate and effective protocols and algorithms.
- Simplified handling of undefined values in the 4D language.
- The ability to programmatically manage your 4D Write Pro headers and footers.
- Fully automatic adaptation of a list’s row height in 4D View Pro.
Define the tab order by programming
Here are 2 very common developer needs: 1. Depending on the user criteria, you want to rearrange the objects in the form. – 2. Depending on the selected item in a list, you want to show, hide or move the objects in the form.
In all theses cases, you need to change the tab order of the form objects. Now in 4D v16 R4, you can modify the tab order at runtime by programming. To do so, 2 new commands have been created: FORM SET ENTRY ORDER and FORM GET ENTRY ORDER.
Support of pictures in Objects
From 4D v16 R4, we have added the support of pictures in object attributes. For example, if you use an object to exchange settings or data between methods, forms or processes, now, you can also pass an icon or a picture in this object. You don’t need anymore to temporarily save the picture on disk.
This new type can be used like any other object attribute type: you can use, get and set pictures in objects. You can also use the controls of the picture theme.
New type supported by 4D: Null
4D introduces a new Null type to ease the management of objects and collections. Thanks to the null value, you can represent a missing value and easily verify if your object or collection is correctly set.
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