Product Discover how object notation can simplify your developer's life!

Discover how object notation can simplify your developer’s life!

With the object notation, available as a preview in 4D v16 R4, your code is simpler to write, easier to read and more natural to think. That is true. But did you really see the full potential of the object notation?

Before 4D v16 R4, when you wanted to create a detail form to enter contact information from an object field, you had no choice but to write an expression like OB GET ([CONTACT]Info; “City”) in the variable data source. You could retrieve the attribute value, but it was not possible to change it. Moreover, you had to write a loadRecord method with the OB GET command for each attribute and a saveRecord method with the OB SET command for each attribute.

What does object notation change in this scenario? From 4D v16 R4, you just write [CONTACT]Info.City in the variable data source! This variable is available in Read/Write mode. OB GET and OB SET commands are no longer necessary. That’s it! Now you see the full potential.

Product

4D Write Pro supports tables!

Your wish has finally come true, you can now insert and fill tables by programming in your 4D Write Pro documents. We are not talking about bar tabs mimicking tables here, this is all about “real” tables! Tables where the text will automatically wrap to fit into the column size you defined, that will not “break” when your data changes. 

This feature is the first major improvement exceeding the old 4D Write set of functionalities. You will now be able to generate invoices containing tables, fully by programming and style them exactly as you want with a few line of codes! Another scenario is that you can now provide your users with a button in your application UI that will insert a table with a predefined number of lines and rows, a predefined size for each column then you can let the user edit and style the content by itself.

Product

Another way of coding: Object notation

Objects are great, everyone says so. Beside their wonderful flexibility, they are unbelievably fast. You can search through millions of records in just a fraction of a second. 4D v16 even allows to order by object attributes, and to do calculations such as Sum or Average.

With 4D v16 R4, the 4D language has been drastically enhanced to make the usage of objects much more comfortable – with the support of the object notation. Fast, flexible, efficient and now elegant!

Product

Get ready for Object Notation

You are looking forward to start coding with Object Notation? For sure, Object Notation will make your life easier as a developer. But before activating it in your existing application, you should make sure that your code is ready.

The new Object Notation syntax introduces some restraints as 4D language now considers the three following characters as reserved symbols: “ . ”, “ [ ” and “ ] ” (i.e. dot, opening and closing brackets).

As a consequence, once you have activated the Object Notation in your database, it is no longer allowed to use these symbols in variable names, method names, table names, or field names. And of course it is the same for your existing code!

So it is important to check that your application does not contain these symbols before activating this feature. But don’t worry the MSC can do it for you!

Product

More standard actions for Styled Text areas

You want to quickly create a toolbar for your Styled text areas. You want to change the font of the text or compute/freeze 4D Expressions without writing a line of code. It is possible using the new standard actions for Styled Text areas.

Just associate a standard action to each button object and 4D will handle everything automatically: action triggering but also the button activation or deactivation if the action is not available in the current context.

Product New tabs with macOS Sierra

Merge your windows into tabs on macOS Sierra

Thanks to macOS Sierra, applications now have to opportunity to use tabbed windows instead of multiple windows. From 4D v16 R3, 4D Developer Edition 64-bit can take advantage of this Apple’s new feature for the design environment.

The type of windows that can be tabbed are Methods and Form Editors windows. Other windows as explorer or tools for instance remain separate.

As in every application based on tab windows:

  • each tab can be moved to a new window by dragging the tab out of the tab bar.
  • each tab can be moved to another existing window.
Product

Export results of “Find in design” dialog

When you search for all objects in the Design Environment, 4D displays the results in the hierarchical list. From 4D v16 R3, you can export these results in a text file that can be opened using a spreadsheet for example, so that you can easily dispatch some refactoring work or store the results in a document to work on it later.

Product

New object: an easy way to initialize an object

Discover New object, the new command of 4D to initialize an object. This command allows you to either create an empty object or create it with some initial properties and values. OB SET is now becoming unnecessary in several situations, New object is enough.

New object also allows to re-initialize an temporary object in a loop or simply directly pass an object as a parameter to a 4D command requesting an object as parameter, as Get database measures or GRAPH commands for instance.

This new command changes your way to write 4D code in many situations. New object creates an object and returns a reference to it. It allows more flexibility in your code. This command is the first of a series of new features related to objects … Stay tuned !

Product 4D Write Pro Standard action

Create your own interface for 4D Write Pro

You want to quickly create a menu bar to manage your 4D Write Pro areas? You want to create your own contextual menu for your end-users ? You would like to create a color mosaic to change the document background? So this feature is made for you – and better, you do not even need to write a single line of code…

We added standard actions to handle 4D Write Pro areas. They can be defined at design phase or by programming. More than 80+ actions are available and to name just some of them: Font style (bold, italic, underline), Font color, Background color, Text alignment (left, center, right, justify…), Borders (style, color, width, radius…), Spellchecker actions…

Something important to notice, when assigned to interface objects, standard actions automatically handle the activation/disabling of the object depending on the context. Easy!