This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v20 R7
Deprecated or Removed Features
|
Feature | Replacement | Status in current 4D version |
C_XXX declaration commands | var, #DECLARE and function prototypes | Deprecated |
On REST Authentication database method | Force login and authentify() function | Deprecated |
Built-in PHP interpreter | External PHP interpreter | Removed |
Replication via SQL | ORDA Global Stamp | Deprecated |
PDFCreator Driver | Native Windows PDF driver | Deprecated |
Non-compliance with object notation | Verify compliance and enable Use object notation compatibility option | Removed |
Interprocess variables | Shared objects and collections, Storage | Deprecated |
4D ODBC Pro | Built-in ODBC/SQL Pass through or 4D REST API | Removed |
4D for OCI on macOS | Built-in ODBC/SQL Pass through or 4D REST API | Removed |
4D ODBC Driver on macOS | 4D REST API | Removed |
4D Internet Commands - Mail | Transporters (IMAP, SMTP, POP3), Email objects | Deprecated |
4D Internet Commands - File Transfert | System workers | Deprecated |
User Forms | Dynamic Forms | Deprecated |
Dynamic assignment of variables received through HTTP (compatibility option for databases created prior to v13.4) | WEB GET VARIABLES command (to recover variables). WEB GET BODY PART/WEB Get body part count commands (to recover posted files) | Deprecated |
Converted Subtables | Use N->1 tables | Deprecated |
File and folder APIs on Mac | Path to object, Object to path | Deprecated |
Code-based standard actions | String patterns ("ak" constants in the Standard Action theme) | Deprecated |
Mac Resources | Use "Resources" folder. For compatibility, you can still use it in converted databases. We no longer support write access commands. | OS (cicn icons: removed.) Database .RSR files are not opened automatically. You need to use Open resource file. |
Management of CPU priority | none | Deprecated |
Legacy network layer | Use ServerNet | Deprecated |
Wakanda connection (4D Mobile) | ORDA and REST Server | Deprecated |
Explanation of values for the “Status” column:
Deprecated commands will not be removed from existing code and will continue to work normally as long as they are supported. When a deprecated command is prefixed by "_o_", it is no longer available in 4D lists (code editor, type-ahead feature, etc.) but it is still possible (but not recommended) to add it in a method by simply entering its name prefixed by "_o_"; it will be interpreted correctly.
Command | Replaced with | Obsolete since |
4D Environment theme: | ||
_o_DATA SEGMENT LIST | - | v11 |
Backup theme: | ||
_o_INTEGRATE LOG FILE | INTEGRATE MIRROR LOG FILE | v16 |
Compiler theme: | ||
C_BLOB C_BOOLEEN C_COLLECTION C_DATE C_LONGINT C_OBJECT C_PICTURE C_POINTER C_REAL C_TEXT C_TIME C_VARIANT | var, #DECLARE and function prototypes | 20 R7 |
_o_ARRAY STRING | ARRAY TEXT | v12 |
_o_C_GRAPH | (use SVG with the GRAPH command) | v12 |
_o_C_INTEGER | C_LONGINT | v12 |
_o_C_STRING | C_TEXT (as soon as database is in Unicode) | v12 |
Data Entry theme: | ||
_o_ADD SUBRECORD | ADD RECORD in the n table of a N->1 relation | v12 |
_o_MODIFY SUBRECORD | MODIFY RECORD in the n table of a N->1 relation | v12 |
Drag and Drop theme: | ||
_o_DRAG AND DROP PROPERTIES | Commands from the Pasteboard theme | v17 R4 |
Form Events theme: | ||
_o_During | Replace with Form event code and the appropriate event | v12 |
Forms theme: | ||
_o_FORM GET PARAMETER | Disabled | v17 R4 |
Graphs theme: | ||
GRAPH (using 4D Graph Area) | Use an SVG picture instead | v12 |
Hierarchical Lists theme: | ||
_o_REDRAW LIST | Remove in code (does nothing since v11) | v11 |
Interruptions theme: | ||
GET LAST ERROR STACK | Last errors | 20 R7 |
Licenses theme: | ||
_O_GET SERIAL INFORMATION | License info | 20 R7 |
List Box theme: | ||
LISTBOX Get property constants: | ||
_o_lk display hor scrollbar/_o_lk display ver scrollbar | OBJECT GET SCROLLBAR | v16 R3 |
_o_lk footer height | LISTBOX Get footers height | v16 R3 |
_o_lk header height | LISTBOX Get headers height | v16 R3 |
_o_lk hor scrollbar position/_o_lk ver scrollbar position | OBJECT GET SCROLL POSITION | v16 R3 |
Objects (Forms) theme: | ||
_o_OBJECT Get action | OBJECT Get action | v16 R3 |
_o_OBJECT SET COLOR | OBJECT SET RGB COLORS | v18 |
Pictures theme: | ||
_o_PICTURE TO GIF | PICTURE TO BLOB | v16 R5 |
Printing theme: | ||
_o_PAGE SETUP | SET PRINT OPTION, GET PRINT OPTION, Print settings to BLOB, BLOB to print settings | v18 |
Processes theme: | ||
_o_PROCESS PROPERTIES | Process info | 20 R7 |
Selection theme: | ||
_o_MOBILE Return selection | ORDA | v18 |
SQL theme: | ||
_o_USE EXTERNAL DATABASE | SQL LOGIN | v12 |
_o_USE INTERNAL DATABASE | SQL LOGOUT | v12 |
String theme: | ||
_o_Mac to Win | v11 | |
_o_Win to Mac | v11 | |
Subrecords theme: all commands | Replace “nnn SUBRECORD” and “nnn SUBSELECTION” with an action on the N record or N-selection of the N-table in a N->1 relation | v12 |
System Documents theme: | ||
_o_Document type | Path to object | v12 |
_o_Document creator | Path to object | v16 R6 |
_o_SET DOCUMENT TYPE | Object to path | v16 R6 |
_o_SET DOCUMENT CREATOR | Object to path | v16 R6 |
_o_MAP FILE TYPES | Use UTIs and Info.plist | v16 R6 |
System Environment theme: | ||
_o_Font name | Use font identifiers | v14 |
The OBJECT SET FONT command no longer accepts a LongInt parameter for the font: this parameter is now a String and you must specify the font name. | ||
_o_Gestalt | Get system info / Is macOS / Is Windows | v17 |
_o_PLATFORM PROPERTIES | Get system info / Is macOS / Is Windows | v17 |
_O_SET SCREEN DEPTH | Does nothing under macOS | 20 R7 |
User Forms theme: | ||
_o_CREATE USER FORM | Dynamic Forms | v17 R4 |
_o_DELETE USER FORM | Dynamic Forms | v17 R4 |
_o_EDIT FORM | Dynamic Forms | v17 R4 |
_o_LIST USER FORMS | Dynamic Forms | v17 R4 |
Web Server theme: | ||
_O_WEB Get session process count | Use scalable sessions | v18 R6 |
You can find an alphabetical list of obsolete commands in the Deprecated Commands appendix of the 4D Language Reference.
For consistency reasons, several commands have been renamed in 4D 20 R7.
Previous name | New name (4D 20 R7 and higher) |
Get action info | Action info |
GET ACTIVITY SNAPSHOT | ACTIVITY SNAPSHOT |
Get application info | Application info |
GET BACKUP INFORMATION | BACKUP INFO |
Get call chain | Call chain |
Get database measures | Database measures |
Get last field number | Last field number |
Get last query path | Last query path |
Get last query plan | Last query plan |
Get last table number | Last table number |
Get license info | License info |
Get license usage | License usage |
Get localized document path | Localized document path |
Get localized string | Localized string |
Get locked records info | Locked records info |
GET MEMORY STATISTICS | MEMORY STATISTICS |
Get Monitored Activity | Monitored activity |
GET MOUSE | MOUSE POSITION |
GET RESTORE INFORMATION | RESTORE INFO |
Get process activity | Process activity |
Get system info | System info |
Get table fragmentation | Table fragmentation |
Session storage by id | Session storage |
The On REST Authentication database method is deprecated as of 4D 20 R6. The Force login authentication is now highly recommended to handle REST user login.
In converted projects, you can upgrade your configuration by clicking on the Activate REST authentication through ds.authentify() function settings button. Please refer to this blog post to know how to migrate your code if necessary.
As of 4D v20 R5, the 4D Internet Commands plug-in is no longer provided with the 4D installer. If required, you need to download the 4DInternetCommands.bundle from the 4D product download portal and install the plug-in files in the Plugins folder of your project or database.
The following 4D Internet Commands features are deprecated:
Feature | Replacement | Status |
IC Downloaded Mail | Email objects | Deprecated, documentation removed |
IC IMAP Review Mail | IMAP Transporter | Deprecated, documentation removed |
IC POP3 Review Mail | POP3 Transporter | Deprecated, documentation removed |
IC Send Mail | SMTP Transporter | Deprecated, documentation removed |
IC File Transfert | System workers | Deprecated, documentation removed |
4D v20 R3 and next releases no longer include a built-in 4D PHP interpreter. Most of the features PHP provides are now implemented in 4D and we have decided to remove the built-in PHP interpreter. PHP Execute and other PHP commands will continue to work but only with an external PHP interpreter. See the Executing PHP scripts in 4D page, and also this blog post for more information.
SQL replication and synchronize mechanisms (described in Replication via SQL) are deprecated as of 4D v20 R3. They are still supported but it is now recommended to use the ORDA-based Global Stamp feature, providing a flexible and robust solution to implement replication and synchronization in 4D.
Starting with 4D v20, the compliance of your database code with object notation is mandatory. If you try to convert a database in which the Use object notation to access object properties option was still unchecked (compatibility mode, see Compatibility page), 4D will display a dialog box allowing you to enable temporarily the option to be able to open the database. You still need to check the option explicitely to enable it permanently -- it is however recommended to verify the compatibility of the application beforehand using the MSC.
If you click Cancel or if the database does not allow access to the development mode (compiled database, no access in design...), the error -10537 is generated and the database is not opened.
Note: The compatibility mode was only available in binary databases.
The PDFCreator driver is deprecated as of 4D v20. Windows 10 and higher releases include a native PDF driver. The PDFCreator Printer name constant has been renamed _o_PDFCreator Printer name.
After years of service, it's time for them to bow out: interprocess variables are now deprecated. Use of interprocess variables is not recommended in 4D projects because they are not available from preemptive processes and are not adapted to the handling of complex values like arrays, objects, or collections (when not shared) from multiple processes simultaneously. Eventually, they tend to make the code less maintainable. To share object and collection values between processes, we strongly recommend to use shared objects and collections, the Storage command, and/or the singletons.
As of 4D Write Pro v19 R4, you can handle row breaks. To avoid confusion with paragraph and table breaks, all breaks are now handled through dedicated constants and standard actions (see 4D Write Pro Attributes and Using 4D Write Pro standard actions). Previous generic constant (_o_wk page break inside) and standard action (avoidPageBreakInsideEnabled) are deprecated and are supported for compatibility reasons only.
Starting with 4D v19, 4D ODBC Pro plug-in is no longer available on all platforms. We recommend to use the built-in ODBC/SQL pass-trough (see SQL LOGIN and Overview of SQL Commands) or the 4D REST API to handle ODBC/SQL connectivity features.
Starting with 4D v19, 4D for OCI plug-in is no longer available on macOS. We recommend to use the built-in ODBC/SQL pass-trough (see SQL LOGIN and Overview of SQL Commands) or the 4D REST API to handle connectivity features on this platform.
Starting with 4D v19, 4D ODBC Driver is no longer available on macOS. We recommend to use the 4D REST API for external data access on this platform.
The Outside data file storage option is no longer supported for object type fields (see Stored in record, data file or outside data file). If this option was selected for an object field, it is automatically converted to In data file and used for new records. Existing data in object fields is transparently rewritten at the new location when the parent record is saved. To force all records to be rewritten at once, you can compact the data file with the "Update records" option.
As of 4D v17 R4, user forms are deprecated. To provide customizable user interfaces, it is now recommended to use dynamic forms (see Dynamic Forms in the 4D Design Reference). All commands within the "User Forms" theme have been deprecated.
User forms are still supported for compatibility, however, they should no longer be used. Their support will be removed in future releases.
In previous versions of 4D, the Web server automatically recopied the value of variables sent through a Web form or a URL into 4D variables when they had the same name.
For reasons of optimization and control, this principle is not maintained starting with 4D v14: the value of Web variables are no longer automatically assigned to the 4D variables. To recover variables sent using a POST or a GET, you must use the WEB GET VARIABLES command exclusively. To recover the posted files, you must use the WEB GET BODY PART/WEB Get body part count commands.
Note: Dynamic assignment is also disabled by default in 4D databases created beginning with version 13.4.
However, for compatibility, this mechanism is maintained by default in databases created with a version of 4D earlier than 13.4. In this case, you can disable it using the Automatic variable assignment compatibility option on the Compatibility page of the Database Settings.
Since this mechanism is obsolete, we strongly recommend that you uncheck this option in your converted databases (and adapt your code if necessary) so as to facilitate future evolutions.
Over several major versions, 4D has warned developers against the use of subtables and since 4D v11, it is no longer possible to create a field of the SubTable type. Subrecords have several known limitations. For example, they are always loaded in memory; they are not handled by the SEND RECORD or DUPLICATE RECORD commands.
We do not plan to remove support for subtables in the near future, but it’s really time for developers to convert their subtables to regular N-> tables because we do plan to remove them in a future major version of 4D. Developers who used subtables for performance reasons (certain specific situations where loading related records was slow) can be reassured, especially since v12: the speed is here and using classic N<->1 relations is very fast.
Basically, there are two main ways to remove subtables (note: the following is not a full tech tip; just a quick overview):
What we mean by “change the code everywhere if it is needed” is, basically:
Note: Starting with 4D v14 R3, you can assign values to the special "id_added_by_converter" fields that are automatically added by 4D when it converts a database containing subtables. This allows you to keep the "subtable relation" link, and add or modifiy related records, without needing to use deprecated commands such as _o_CREATE SUBRECORD. Once you have updated your methods, these special relations can be replaced with standard ones with no change in your code.
Starting with 4D v16 R6, Mac OS 9-based APIs for file and folder management are deprecated in 4D. These APIs have already been deprecated by Apple for a long time.
4D commands relying on the old APIs have been renamed: _o_Document type, _o_Document creator, _o_SET DOCUMENT TYPE, _o_SET DOCUMENT CREATOR, and _o_MAP FILE TYPES. These commands are maintained for compatibility, but are deprecated and should no longer be used. 4D includes two new commands to handle pathnames and file extensions: Path to object and Object to path.
Standard actions have been internally redesigned in 4D v16 R3. They are now based on string patterns and support parameters (for more information, please refer to the Standard actions section).
In your converted applications, standard actions are transparently remapped to the new design. However, in the 4D language, standard actions were previously based on code values. This principle is deprecated and should no longer be used:
This is another old Mac OS technology, deprecated since Mac OS X 10.4 (Tiger, 2005). Resources are used to store structured data such as text and strings (localization), as well as icons, etc. Basically, we can say that it’s not the resources that are deprecated, it’s their on-disk support, known as the resource fork. The resource fork is part of the Mac OS file system, and since the beginning of Mac OS X, Apple has tried to remove this support as it is not compatible with other file systems (Unix, Windows), and is the source of a lot of problems when files are transferred via the network.
On Windows, this mechanism is emulated and Mac Resources reside in a .RSR file.
But even if there are still APIs to handle resources (and Mac OS transparently handles resources stored in a data fork), it is no longer recommended to use this old mechanism for several reasons:
We have removed support for commands that write/create resources.
The vast majority of 4D applications using resources are, in fact, using the “Strings List” resources, ‘STR#’. 4D provides tools to easily move from STR# to XLIFF:
For other kinds of resources:
Product: 4D
Deprecated or Removed Features ( 4D v20 R7)