This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com

Home

 
4D v19.8
Deprecated or removed features

Deprecated or removed features    


 

 

For over 30 years, our main goal has been to enhance our product (using new concepts and technologies) while ensuring the compatibility of 4D applications. As early adopters of 4D know, we have always put a lot of effort into compatibility, and we can find 4D applications all over the world that were created years and years ago, with old versions of 4D and of an OS, that are still working with the latest revisions of the product.

Unfortunately, it sometimes becomes too difficult to mix old technologies with new:

  • 4D must bring new technologies, new APIs, and new paradigms to developers
  • OSes change every day, and sometimes deprecate their own old APIs

This is why 4D sometimes needs to tag some commands and features as deprecated, meaning that one day, they will be removed from the language in a future major version.

Letting developers know what is deprecated and what kind of replacement can be used instead makes it much more comfortable for them to implement the change in their code: There is no urgency, no pressure, and the developer has plenty of time to make any necessary changes.

FeatureReplacementStatus in current 4D version
4D ODBC ProBuilt-in ODBC/SQL Pass through or 4D REST APIRemoved
4D for OCI on macOSBuilt-in ODBC/SQL Pass through or 4D REST APIRemoved
4D ODBC Driver on macOS4D REST APIRemoved
User FormsDynamic 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 SubtablesUse N->1 tablesDeprecated
File and folder APIs on MacPath to object, Object to pathDeprecated
Code-based standard actionsString 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 prioritynone Deprecated
Legacy network layerUse ServerNetDeprecated
4D MobileORDA and REST ServerDeprecated

 

Explanation of values for the “Status” column:

  • Removed: No longer available in the current version (or the version indicated).
  • Deprecated: Should no longer be used and will be removed in a future major version.
  • OS: Depends on officially deprecated OS technologies (e.g.: PICT format). Status is the same as Deprecated, but an OS could remove the support before we do.

Every obsolete command is prefixed by "_o_" and is not available in 4D lists (code editor, type-ahead feature, etc.). Obsolete (or deprecated) commands will not be removed from existing code and will continue to work normally as long as they are supported. It is still possible (but not recommended) to add an obsolete command in a method by simply entering its name prefixed by "_o_"; it will be interpreted correctly.

 

CommandReplaced withObsolete since
4D Environment theme:
_o_DATA SEGMENT LIST-v11
Backup theme:
_o_INTEGRATE LOG FILEINTEGRATE MIRROR LOG FILEv16
Compiler theme:
_o_ARRAY STRINGARRAY TEXTv12
_o_C_GRAPH(use SVG with the GRAPH command)v12
_o_C_INTEGERC_LONGINTv12
_o_C_STRINGC_TEXT (as soon as database is in Unicode)v12
Data Entry theme:
_o_ADD SUBRECORDADD RECORD in the n table of a N->1 relationv12
_o_MODIFY SUBRECORDMODIFY RECORD in the n table of a N->1 relationv12
Drag and Drop theme:
_o_DRAG AND DROP PROPERTIESCommands from the Pasteboard themev17 R4
Form Events theme:
_o_DuringReplace with Form event code and the appropriate eventv12
Forms theme:
_o_FORM GET PARAMETERDisabledv17 R4
Graphs theme:
GRAPH (using 4D Graph Area)Use an SVG picture insteadv12
Hierarchical Lists theme:
_o_REDRAW LISTRemove in code (does nothing since v11)v11
List Box theme:
LISTBOX Get property constants:
_o_lk display hor scrollbar/_o_lk display ver scrollbarOBJECT GET SCROLLBARv16 R3
_o_lk footer heightLISTBOX Get footers heightv16 R3
_o_lk header heightLISTBOX Get headers heightv16 R3
_o_lk hor scrollbar position/_o_lk ver scrollbar positionOBJECT GET SCROLL POSITIONv16 R3
Objects (Forms) theme:
_o_OBJECT Get actionOBJECT Get actionv16 R3
_o_OBJECT SET COLOROBJECT SET RGB COLORSv18
Pictures theme:
_o_PICTURE TO GIFPICTURE TO BLOBv16 R5
Printing theme:
_o_PAGE SETUPSET PRINT OPTION, GET PRINT OPTIONPrint settings to BLOBBLOB to print settingsv18
Selection theme:
_o_MOBILE Return selectionORDAv18
SQL theme:
_o_USE EXTERNAL DATABASESQL LOGINv12
_o_USE INTERNAL DATABASESQL LOGOUTv12
String theme:
_o_Mac to Winv11
_o_Win to Macv11
Subrecords theme: all commandsReplace “nnn SUBRECORD” and “nnn SUBSELECTION” with an action on the N record or N-selection of the N-table in a N->1 relationv12
System Documents theme:
_o_Document typePath to objectv12
_o_Document creatorPath to objectv16 R6
_o_SET DOCUMENT TYPEObject to pathv16 R6
_o_SET DOCUMENT CREATORObject to pathv16 R6
_o_MAP FILE TYPESUse UTIs and Info.plistv16 R6
System Environment theme:
_o_Font nameUse font identifiersv14
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_GestaltGet system info / Is macOS / Is Windowsv17
_o_PLATFORM PROPERTIESGet system info / Is macOS / Is Windowsv17
User Forms theme:
_o_CREATE USER FORMDynamic Formsv17 R4
_o_DELETE USER FORMDynamic Formsv17 R4
_o_EDIT FORMDynamic Formsv17 R4 
_o_LIST USER FORMSDynamic Formsv17 R4
Web Server theme:
_O_WEB Get session process countUse scalable sessionsv18 R6
4D Internet Commands:
POP3 Review Mail commands4D Mail built-in themev18
SMTP Send Mail commands4D Mail built-in themev18 R6
IMAP Review Mail commands4D Mail built-in themev19

You can find an alphabetical list of obsolete commands in the Deprecated Commands appendix of the 4D Language Reference.

The following commands, previously deprecated, have been removed from 4D v19 and must not be used in your code. If they are called, they will trigger an error (Error 33 - Unimplemented command or function). 

Warning: Calls to removed commands cannot be detected by the check syntax or compile features. You must verify your code to make sure that it does not contain any calls to removed commands.   

 

CommandReplaced withRemoved in
Language theme:
_o_NO TRACENo trace button in debuggerv18 R2
Objects (Forms) theme:
_o_DISABLE BUTTON / _o_ENABLE BUTTONOBJECT SET ENABLEDv18 R2

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):

  • Before conversion from a pre-v11 structure: in 2004, create the appropriate N table and the ID field in Table 1 (if not already there). Then change the code everywhere it is needed (see below).
     
  • After conversion: in this situation, 4D has replaced the subtable with a N table using a special relation, that allows the language to work with the subselection and the subrecords. The 4D developer needs to remove this special relation, replace it with a normal relation and change the code everywhere if it is needed (see below).

What we mean by “change the code everywhere if it is needed” is, basically:

  • Create the new forms, update included forms
     
  • In the methods (project, form, object, etc.):
    • Replace all commands of the “SubRecords” theme with the corresponding Selection or Record command (for example, replace _o_CREATE SUBRECORD with CREATE RECORD, filling the ID fields)
    • Explicitly load the N records when needed

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:

  • Text and strings are Mac-Roman. You can’t store Unicode in resources of type TEXT or STR#
     
  • PICT resources store PICTs: not modern, deprecated, no transparency, etc. (See the “” topic above.)
     
  • The count of resources and the size of the resources are limited (about 2,700 resources or 16 MB)

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:

  • The 4D Pop component can automatically create the XLIFF files by reading and transferring the content of the STR#.
     
  • All the routines and expressions that reference STR# work with no change with XLIFF. For example, if the label of a button or a menu was “:15000,3” (meaning “get the third item of STR# ID 15000”), 4D will load the appropriate XLIFF (if it exists).

For other kinds of resources:

  • Put resources in separate files inside the Resources folder (create sub-directories if needed):
    • Save 'TEXT' resources in XLIFF or .txt files
    • Save 'PICT' resources as separate .jpg/.png/etc. files
    • Save 'PICT' + MASK’ resources as png files
    • Save any private resources as appropriate for you (typically: save as a binary file with a specific extension)
       
  • Use the “Resources” folder to store your resources. Use Get 4D folder(Current resources folder) to dynamically get the parent path for your resources.

 
 

 
PROPERTIES 

Product: 4D Chart
Theme: Deprecated or removed features

 
PAGE CONTENTS 
 
HISTORY 

 
ARTICLE USAGE

4D v19.x Release Notes ( 4D v19)
4D v19.x Release Notes ( 4D v19.1)
4D v19.x Release Notes ( 4D v19.2)
4D v19.x Release Notes ( 4D v19.3)
4D v19.x Release Notes ( 4D v19.4)
4D v19.x Release Notes ( 4D v19.5)
4D v19.x Release Notes ( 4D v19.6)
4D v19.x Release Notes ( 4D v19.7)
4D v19.x Release Notes ( 4D v19.8)