This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v20 R7
Converting databases to projects
|
Deprecated feature | Conversion status | Comment |
Picture radio buttons | error | Must be converted to 3D buttons |
Dials | error | Must be converted to progress indicators |
Matrix | warning | Matrix objects are automatically converted to svg pictures and stored in the resources folder of the database |
Highlight buttons | warning | Converted to invisible buttons (with "on mouse move" event selected if a help tip is associated to the highlight button - in this case, the roll over is disabled). |
Boolean field as radio buttons | warning | |
On Background picture format | - | Converted to Truncated (non-centered) |
Transparent background | - | Converted to "None" fill color. |
List box - Scrollable area compatibility | warning/error | Use regular list box features |
List box - Connected list boxes compatibility | error | Use standard list box features |
Platform interface "printing" property | warning | Objects with "printing" property are automatically converted to "flat" style (button, checkbox, radio button, variable/field with "system" border) |
"Visible title"/"Visible icon" properties for 3D buttons | - | Remove title and/or icon not to be displayed |
Active menu bar | warning | Associated menu bars are always active in projects. The form method code may need to be adapted. |
Help Topic Number | warning | Not supported. Use OPEN URL |
Because of behavior changes in projects, form object rendering can be different when using formatting commands with default or missing parameters.
Command | Behavior change in projects | After conversion | Solution |
GET STYLE SHEET INFO, OBJECT SET STYLE SHEET, OBJECT Get style sheet | Legacy style sheets not supported | Only "automatic" legacy style sheets can be used | Wrap and use OBJECT SET FONT, OBJECT SET FONT SIZE, OBJECT SET FONT STYLE to apply styles dynamically |
OBJECT SET FORMAT | No default support for omitted parameters. | Incorrect object rendering, e.g. button picture not clipped | Check the displayFormat parameter to make sure all values are declared. |
Command ignored for deprecated objects (matrix, dials...) | Deprecated objects not rendered | Use supported objects. | |
OBJECT SET RGB COLORS | "Transparent" form option is removed, transparency is only set by the None fill color | Black or white background instead of transparent | Remove the optional backgroundColor parameter if not used |
_o_OBJECT SET COLOR | The command is deprecated in projects | Black or white background instead of transparent | Use OBJECT SET RGB COLORS |
The following database structure options are deprecated and will be edited or generate errors in the project conversion log file (see comments).
Deprecated feature | Conversion status | Comment |
"Can't Modify" field option | warning | Automatically moved at form level during export to project |
"Display only" field option | warning | Automatically moved at form level during export to project |
"Mandatory" field option | error | Select "Reject NULL value input" option |
The following Toolbox editors and features are deprecated and are not supported in projects:
Deprecated feature | Conversion status | Comment |
Picture library | warning | Pictures are automatically exported to the resources folder of the database |
GET PICTURE FROM LIBRARY | - | Do not work - Use READ PICTURE FILE instead |
"Editable by user" list option | - | |
LIST OF CHOICE LISTS | - | - |
SAVE LIST | - | Error at runtime if called from a project |
USERS TO BLOB | - | Does nothing - use directory.json file |
Group named "" or "*" | error | Reserved in projects |
Standard user named "Designer" or "Administrator" | - | Names reserved in projects |
During conversion, existing 4D users and groups are automatically extracted from the .4db file and stored into the directory.json file for the project.
In projects, since the code is stored in open format text files, the 4D user access management works differently than in binary databases. In particular:
In client-server mode, the user access control works in project databases as in binary databases. However, group assignment to menus, methods, and forms is not supported (see Security Notes).
Consequently, after conversion:
Security Notes:
When you build a client-server project application that controls access through users and groups, make sure to copy the directory.json file in the Settings folder of the data folder so that it is available to the resulting server application.
Existing custom object libraries (.4il on Windows or .4dlibrary on macOS) must be exported separately if you want to use them in your projects. For more information, please refer to this dedicated blog post.
4D project deployment strategy is based upon .4dz packed files, where the whole structure is read only. This is the case for merged applications, or compiled components. Consequently, commands that modify the structure will not work and should not be used in deployed applications. If called, they will do nothing, or throw an error, depending on the context.
Keep in mind that modifying structure files in deployed applications is not recommended for the following reasons:
However, if you absolutely need to avoid the .4dz format and keep your "Project" folder as is, so that you can modify its source files on deployed sites (which is not recommended, as explained above), you may be interested in the PackProject key.
Here is the list of commands that modify the structure:
Command | Comment |
ARRAY TO LIST | Supports listRef, only the legacy syntax (choice list) modifies the structure |
SAVE LIST | |
Set group properties | |
CHANGE PASSWORD | |
DELETE USER | |
EDIT ACCESS | |
BLOB TO USERS | |
SET PLUGIN ACCESS | |
SET PICTURE TO LIBRARY | |
CREATE INDEX | |
DELETE INDEX | |
SET INDEX | |
IMPORT STRUCTURE | |
REGENERATE MISSING TABLE | |
Set user properties | |
SET DATABASE PARAMETER | Only certain parameters persist across sessions |
FORM Convert to dynamic | Expects a binary form as input |
ALTER TABLE (SQL) | Only local access modifies the structure |
DROP TABLE (SQL) | Only local access modifies the structure |
CREATE TABLE (SQL) | Only local access modifies the structure |
CREATE INDEX (SQL) | Only local access modifies the structure |
When a database is converted to a project, the backup archive counter is reset. It means that the first backup archive file in a converted project will be named myBase-0001, whatever the sequence number of the last archive file in the binary database.
Actually, the backup archive counter is linked to the database structure file. When you rename or move a .4DB file, and even more so when you convert it to a .4DProject, a new backup counter is started.
Once your are satisfied with your converted database and want to start working on your project, you can clean up your working directory:
If you want the data file to be open automatically after the project is moved to other machines, you can make it compliant with the project architecture, as described on developer.4d.com:
4D Blog - Binary database vs project database
4D Blog - Project databases completing the conversion
4D Blog - Project databases from binary to text-based
Creating a new database
Product: 4D
Theme: Managing 4D databases
Created: 4D v18
4D Design Reference ( 4D v20 R7)