What’s new in 4D v17 R3

4D for ios – Preview

data formatters

A new concept is introduced with 4D v17 R3: data formatters. They allow you to define specific data types for your fields in order for the content to be displayed in the right format. You can quickly override your fields’ default format to display the format of your choice, such as currency, boolean, percentage, dates, and much more.

 

Create your own list and detail form templates

4D for iOS already provides various list and detail form templates to cover most of your needs. With 4D v17 R3, you can easily create your own list and detail form templates. Then, simply create a …/Resources/Mobile/form/detail folder for detail forms or a …/Resources/Mobile/form/list folder for list forms, for your own form templates to be available. 

 

Add your own icons

4D for iOS has a large icon library covering many areas such as: commerce, finance, education, government, health, industry, real estate, services, etc. 4D v17 R3 gives you the ability to add your own icons to the library. Create a …/Resources/Mobile/medias/icons folder, then drag and drop your icons into it.

 

4D Write Pro

New attributes to avoid widows, orphans, and page breaks

With 4D v17 R3, new options have been added to 4D Write Pro to help you avoid widows and orphans for paragraphs or tables, and page breaks inside paragraphs or tables.

Widows and orphans are the lines at the beginning or end of a paragraph which are left all by themselves at the top or bottom of a page. In order to avoid them, you have a new attribute to use with the WP SET ATTRIBUTES command: wk avoid widows and orphans. The available values for this attribute are wk true or wk false. When this attribute is set for a paragraph or a table, 4D Write Pro prevents this paragraph or table from having a single line separated onto another page.

As for page breaks inside paragraphs or tables, a new attribute is available: wk page break inside. The available values are wk avoid or wk auto. This option is useful when you don’t want a paragraph, several paragraphs, or a table to break across two pages.

 

create headers and footers with code

With 4D v17 R3, you can use code to create a header and a footer for a given section. Two new commands have been added: WP New header and WP New footer. You can also use code to delete a header and a footer with the WP DELETE HEADER and WP DELETE FOOTER commands.

 

page layout in 4d write pro

Starting with 4D v17 R3, you can define the page size, orientation, and margins with code. New attributes that can be used with the WP SET ATTRIBUTES and  WP GET ATTRIBUTES command are at your disposal. You can set the properties for an entire 4D Write Pro document. The following values are used by default for all sections of the document which you can then change for a given section:

  • wk page widthwk page height – for page size
  • wk page orientation – for page orientation
  • wk page marginwk page margin leftwk page margin rightwk page margin topwk page margin bottom – for page margins
 

 

manage sections with code in 4d write pro

4D v17 R3 introduces sections. A section allows you to obtain different layouts within the same document. For example, for each section you can define a different paper size and orientation, different margins, different headers and footers, and so on. This results in complex and beautifully designed documents. Sections can be manipulated by code with the WP Get sections command, allowing you to retrieve a collection of sections in your document. The WP Get section command can be used to retrieve the current section. To change the attributes for a specific section, you can pass the section reference to the WP SET ATTRIBUTES and WP GET ATTRIBUTES commands. You can also create subsections with code using the new WP Create subsection command.

 

4D Language

more thread-safe commands

With all the newly thread-safe commands, your applications can take full advantage of multi-core computers. Consequently, this results in faster responses to simultaneous requests.

The following 4D commands are now thread-safe: COMPRESS BLOBEXPAND BLOBBLOB PROPERTIESENCRYPT BLOBDECRYPT BLOB, GENERATE ENCRYPTION KEYPAIRGENERATE CERTIFICATE REQUESRECEIVE BUFFERSET DEFAULT CENTURYGET DOCUMENT ICONTRANSFORM PICTURESVG EXPORT TO PICTUREGet localized document pathGet database localizationLOCKED BYLOG EVENTCurrent client authenticationGET MEMORY STATISTICS.

 

 

New parameters to improve database tests

4D products can already be launched using command line parameters to allow automatic testing or deployment. With 4D v17 R3, new parameters have been added to give you even more flexibility when opening your databases:

–opening-mode: will define opening your database in interpreted or compiled mode.

–create-data: will allow creating new data if the current datafile is not found or with a specific name if –data is passed.

–user-param: will send a string that can be read after the database is launched using the GET DATABASE PARAMETER command.

4D view Pro

WORK WITH MICROSOFT EXCEL (.xlsx) DOCUMENTS USING 4D VIEW PRO

With 4D v17 R3, the existing 4D View Pro commands VP IMPORT DOCUMENT and VP EXPORT DOCUMENT have been enhanced. They now support files using the .xlsx extension (Microsoft Excel). You can just pass your file path to the commands to get up and running.

 

more programming capabilities

create YOUR OWN formula OBJECTS

With 4D v17 R3 and the New formula command, you can create formulas as objects. You can pass parameters or access the contents of the formula object. Formulas as objects can perform calculations for object attributes to be passed to a method.Objects can now have their own call back or error handler. If you’re already using ORDA or doing classic selection-based coding, objects just became much more powerful.

 

EXPORT THE STRUCTURE FILE IN PLAIN TEXT

With 4D v17 R3, you can export the structure (.4DB) file as text in several files. One possibility with this feature is storing your code in a source control repository. Two export options are available:

  • Either via a new menu item that is available in the “File/Export” menu. This will open a window for you to choose the location of the export folder. Then you simply validate your choice to export your database in text files.
  • Or you can use the new Export structure file command to automate the process.

 

 

EXPORT A Classic 4D FORM TO DYNAMIC FORM

With 4D v17 R3, a new FORM Convert to dynamic command is available allowing you to export a classic 4D form (stored in .4DB file) to a dynamic form. You pass the form name and receive an object describing the form. Then depending on your needs, you can change your form options such as the font size or the position of objects on the screen. 

 

GET INFO ABOUT THE RUNNING APPLICATION

The new Get application info command retrieves detailed information about the activity and network configuration of your active database. This command can be called on both a remote client as well as on the 4D Server. In addition to do this, the new OpenSSL version selector is available for the Get database parameter command. 

 

Want to know more? Read all blog posts about 4D v17 R3