4D v17.1

Changes in behavior

Home

 
4D v17.1
Changes in behavior

Changes in behavior    


 

The OBJECT Get action and OBJECT SET ACTION commands now use constants with string values instead of long int  (when used on form objects).

Previous code:

 ARRAY TEXT($arrObjects;0)
 FORM GET OBJECTS($arrObjects)
 For($i;1;Size of array($arrObjects))
    If(OBJECT Get action(*;$arrObjects{$i})=Object No standard action)
       OBJECT SET ACTION(*;$arrObjects{$i};Object Cancel action)
    End if
 End for

Code after conversion to v17:

 ARRAY TEXT($arrObjects;0)
 FORM GET OBJECTS($arrObjects)
 For($i;1;Size of array($arrObjects))
    If(_o_OBJECT Get action(*;$arrObjects{$i})=_o_Object No standard action)
       OBJECT SET ACTION(*;$arrObjects{$i};_o_Object Cancel action)
    End if
 End for

Note: Only the _o_Object Get action function has been declared obsolete because in the case of compilation, it is necessary to set the type of result in advance. This was done so you can consider changing your code (see below), otherwise the compilation would be impossible.

New code: command and obsolete constants to be replaced by :

 ARRAY TEXT($arrObjects;0)
 FORM GET OBJECTS($arrObjects)
 For($i;1;Size of array($arrObjects))
    If(OBJECT Get action(*;$arrObjects{$i})=ak none)
       OBJECT SET ACTION(*;$arrObjects{$i};ak cancel)
    End if
 End for

As of v17, 4D hours (type C_TIME) manipulated via object properties are converted to the number of seconds. In previous versions, they were converted to milliseconds.

This change applies to all hours converted to/from objects or collections using object notation, commands such as OB SET and OB Get, QUERY BY ATTRIBUTE, or JSON commands such as JSON Stringify and JSON Parse. It also impacts hourly/digital conversions in the following 4D features:

  • Web areas (via JavaScript),
  • 4D Mobile,
  • SQL (CAST function)

To facilitate the migration of 4D databases (especially if hours have been stored in field object attributes), a new compatibility option can be used to restore the prior behavior for the session:

  //restore the prior behavior
  //to be placed in the On opening / On server startup database method
 SET DATABASE PARAMETER(Times inside objects;Times in milliseconds)

  • External entity resolution
    As of 4D v16 R3, to enhance security the resolution of external entities is not activated by default in XML documents (the declaration of an external entity generates an analysis error). To restore the previous behavior, use the new XML external entity resolution selector with the XML enabled value for the XML SET OPTIONS command.
  • Case sensitivity
    Starting with 4D v16 R4, the DOM Get XML element and DOM Count XML elements commands are case-sensitive by default. A new selector allows you to go back to the previous behavior: XML DOM case sensitivity with the following available values:
    • XML case sensitive (value by default): commands are case sensitive
    • XML case insensitive: commands are not case sensitive

The wk image, wk list style image, and wk background image attributes used with the WP GET ATTRIBUTES or OB Get commands return the image itself and not its URL when the image is not declared.

To find the image URL, use the new wk image url, wk list style image url, and wk background image url attributes.

 
 

 
PROPERTIES 

Product: 4D
Theme: Changes in behavior

 
HISTORY 

Modified: 4D v16.2

 
ARTICLE USAGE

Conversion to 4D v17 ( 4D v17)
Conversion to 4D v17 ( 4D v17.1)