Skip to content

Commit bdb22e8

Browse files
authored
Merge pull request #419 from doc4d/main
update 20 R9 beta
2 parents 9441f2f + 14ba759 commit bdb22e8

File tree

18,652 files changed

+287608
-273163
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

18,652 files changed

+287608
-273163
lines changed

docs/Extensions/overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ The 4D [project architecture](../Project/architecture.md) is modular. You can pr
2020
|[4D SVG](https://github.com/4d/4D-SVG)|Create and manipulate common svg graphic objects|`SVGTool_Display_viewer`, multiple `SVG_` methods |
2121
|[4D ViewPro](ViewPro/getting-started.md)|Spreadsheet features in your forms|See [4D View Pro documentation](ViewPro/getting-started.md)|
2222
|[4D Widgets](https://github.com/4d/4D-Widgets)|Manage DatePicker, TimePicker, SearchPicker 4D widgets|`DatePicker calendar`, `DateEntry area`, `TimeEntry`, `SearchPicker SET HELP TEXT`, ...|
23-
|[4D WritePro Interface](https://github.com/4d/4D-WritePro-Interface)|Manage [4D Write Pro](https://doc.4d.com/4Dv20/4D/20/4D-Write-Pro-Reference.100-6229455.en.html) palettes and [table wizard](../WritePro/writeprointerface.md#table-wizard)|`WP PictureSettings`, `WP ShowTabPages`, `WP SwitchToolbar`, `WP UpdateWidget`|
23+
|[4D WritePro Interface](https://github.com/4d/4D-WritePro-Interface)|Manage [4D Write Pro palettes](https://doc.4d.com/4Dv20R9/4D/20-R9/Entry-areas.300-7543821.en.html and [table wizard](../WritePro/writeprointerface.md#table-wizard)|`WP PictureSettings`, `WP ShowTabPages`, `WP SwitchToolbar`, `WP UpdateWidget`|
2424

2525

2626
## Third-party components

docs/Notes/updates.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ Read [**What’s new in 4D 20 R9**](https://blog.4d.com/en-whats-new-in-4d-v20-R
2121
- New [4D AIKit component](../aikit/overview.md) enabling interaction with third-party AI APIs.
2222
- The following VP command callbacks now wait for all 4D custom functions to complete their calculations: [VP IMPORT DOCUMENT](../ViewPro/commands/vp-import-document.md), [VP IMPORT FORM BLOB](../ViewPro/commands/vp-import-form-blob.md), [VP IMPORT FROM OBJECT](../ViewPro/commands/vp-import-from-object.md), and [VP FLUSH COMMANDS](../ViewPro/commands/vp-flush-commands.md).
2323
- New [4D Netkit](https://developer.4d.com/4D-NetKit/) features to manage Google and Microsoft 365 calendars; ability to use the host web server for OAuth 2.0 authentication.
24+
- [**Fixed bug list**](https://bugs.4d.fr/fixedbugslist?version=20_R9): list of all bugs that have been fixed in 4D 20 R9.
25+
2426

2527
## 4D 20 R8
2628

docs/ORDA/ordaClasses.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -157,17 +157,14 @@ The `City Class` provides an API:
157157
158158
Class extends DataClass
159159
160-
Function getCityName()
161-
var $1; $zipcode : Integer
160+
Function getCityName($zipcode : Integer) -> $cityName : Text
162161
var $zip : 4D.Entity
163-
var $0 : Text
164162
165-
$zipcode:=$1
166163
$zip:=ds.ZipCode.get($zipcode)
167-
$0:=""
164+
$cityName:=""
168165
169166
If ($zip#Null)
170-
$0:=$zip.city.name
167+
$cityName:=$zip.city.name
171168
End if
172169
```
173170

docs/REST/ClassFunctions.md

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -522,17 +522,13 @@ In this example, we associate an existing school to a Students entity. The `Stud
522522
523523
Class extends Entity
524524
525-
exposed Function putToSchool()
526-
var $1, $school , $0, $status : Object
525+
exposed Function putToSchool($school : Object) -> $status : Object
527526
528-
//$1 is a Schools entity
529-
$school:=$1
527+
//$school is a Schools entity
530528
//Associate the related entity school to the current Students entity
531529
This.school:=$school
532530
533531
$status:=This.save()
534-
535-
$0:=$status
536532
```
537533

538534
You run this request, called on a Students entity :
@@ -566,18 +562,12 @@ In the `Students` Dataclass class, the `setFinalExam()` function updates a recei
566562
567563
Class extends DataClass
568564
569-
exposed Function setFinalExam()
570-
565+
exposed Function setFinalExam($es : Object ; $examResult : Text) -> $keys : Collection
571566
572-
var $1, $es, $student, $status : Object
573-
var $2, $examResult : Text
574567
575-
var $keys, $0 : Collection
568+
var $student, $status : Object
576569
577-
//Entity selection
578-
$es:=$1
579-
580-
$examResult:=$2
570+
//$es is an Entity selection
581571
582572
$keys:=New collection()
583573
@@ -589,8 +579,6 @@ exposed Function setFinalExam()
589579
$keys.push($student.ID)
590580
End if
591581
End for each
592-
593-
$0:=$keys
594582
```
595583

596584
An entity set is first created with this request:

docs/code-editor/write-class-method.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -845,7 +845,7 @@ The `<method>` tag allows you to generate and use macro-commands that execute 4D
845845

846846
The code of a called method is executed in a new process. This process is killed once the method is executed.
847847

848-
> The structure process remains frozen until the called method execution is completed. You must make sure that the execution is quick and that there is no risk of it blocking the application. If this occurs, use the **Ctrl+F8** (Windows) or **Command+F8** (Mac OS) command to "kill" the process.
848+
> The structure process remains frozen until the called method execution is completed. You must make sure that the execution is quick and that there is no risk of it blocking the application. If this occurs, use the **Ctrl+F8** (Windows) or **Command+F8** (macOS) command to "kill" the process.
849849
850850
### Calling macros
851851

docs/commands-legacy/append-data-to-pasteboard.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ displayed_sidebar: docs
2020

2121
**Note:** In the case of copy/paste operations, the pasteboard is equivalent to the Clipboard.
2222

23-
In *dataType*, pass a value specifying the type of data to be added. You can pass a 4D signature, a UTI type (Mac OS), a format name/number (Windows), or a 4-character type (compatibility). For more information about these types, please refer to the *Managing Pasteboards* section.
23+
In *dataType*, pass a value specifying the type of data to be added. You can pass a 4D signature, a UTI type (macOS), a format name/number (Windows), or a 4-character type (compatibility). For more information about these types, please refer to the *Managing Pasteboards* section.
2424

2525
**Note for Windows users:** When the command is used with Text type data (*dataType* is "TEXT", com.4d.private.text.native or com.4d.private.text.utf16), the string contained in the BLOB parameter *data* must end with the NULL character under Windows.
2626

docs/commands-legacy/display-selection.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Keep in mind that with the **DISPLAY SELECTION** command, this parameter only al
4343

4444
If the selection contains only one record and the first optional *\** is not used, the record appears in the input form instead of the output form. If the first optional *\** is specified, a one-record selection is displayed, using the output form. If the first optional *\** is specified and the user displays the record in the input form by double-clicking on it, the scroll bars will be hidden in the input form. To reverse this effect, pass the second optional \*.
4545

46-
Custom buttons may be put in the Footer or Header area of the output form in order to terminate the execution of the **DISPLAY SELECTION** command. You can use automatic Accept or Cancel buttons to exit, or use an object method that calls [ACCEPT](accept.md) or [CANCEL](cancel.md). When an output form called by the **DISPLAY SELECTION** command has no buttons, only the **Escape** (Windows) or **Esc** (Mac OS) key can be used to exit the list.
46+
Custom buttons may be put in the Footer or Header area of the output form in order to terminate the execution of the **DISPLAY SELECTION** command. You can use automatic Accept or Cancel buttons to exit, or use an object method that calls [ACCEPT](accept.md) or [CANCEL](cancel.md). When an output form called by the **DISPLAY SELECTION** command has no buttons, only the **Escape** (Windows) or **Esc** (macOS) key can be used to exit the list.
4747

4848
During and after execution of **DISPLAY SELECTION**, the records that the user highlighted (selected) are kept in a set named UserSet. The UserSet is available within the selection display for object methods when a button is clicked or a menu item is chosen. It is also available to the project method that called **DISPLAY SELECTION** after the command was completed.
4949

docs/commands-legacy/export-data.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -57,23 +57,21 @@ This example illustrates the use of the EXPORT DATA command to export data in bi
5757
* Here is the code for the ExportBinary method:
5858

5959
```4d
60-
 var $1 : Pointer //table
61-
 var $2 : Text //path of destination file
62-
 var $3 : Boolean //export all records
60+
#DECLARE ($tablePtr : Pointer ; $path : Text ; $all : Boolean)
6361
 var $i : Integer
6462
 var $ref : Text
6563
 $ref:=DOM Create XML Ref("settings-import-export")
66-
  // Export the table "$1" in '4D' binary format, all the records or only the current selection
67-
 DOM SET XML ATTRIBUTE($ref;"table_no";Table($1);"format";"4D";"all_records";$3)
64+
  // Export the table "$tablePtr" in '4D' binary format, all the records or only the current selection
65+
 DOM SET XML ATTRIBUTE($ref;"table_no";Table($tablePtr);"format";"4D";"all_records";$all)
6866
  // Definition of fields to export
69-
 For($i;1;Last field number($1))
70-
    If(Is field number valid($1;$i))
71-
       $elt:=DOM Create XML element($ref;"field";"table_no";Table($1);"field_no";$i)
67+
 For($i;1;Last field number($tablePtr))
68+
    If(Is field number valid($tablePtr;$i))
69+
       $elt:=DOM Create XML element($ref;"field";"table_no";Table($tablePtr);"field_no";$i)
7270
    End if
7371
 End for
74-
 EXPORT DATA($2;$ref)
72+
 EXPORT DATA($path;$ref)
7573
 If(Ok=0)
76-
    ALERT("Error during export of table "+Table name($1))
74+
    ALERT("Error during export of table "+Table name($tablePtr))
7775
 End if
7876
 DOM CLOSE XML($ref)
7977
```

docs/commands-legacy/find-in-array.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ The following project method deletes all empty elements from the string or text
3737
  // CLEAN UP ARRAY ( Pointer )
3838
  // CLEAN UP ARRAY ( -> Text or String array )
3939
 
40-
 var $1 : Pointer
40+
 #DECLARE ($arrPtr : Pointer) : Pointer
4141
 Repeat
42-
    $vlElem:=Find in array($1->;"")
42+
    $vlElem:=Find in array($arrPtr->;"")
4343
    If($vlElem>0)
44-
       DELETE FROM ARRAY($1->;$vlElem)
44+
       DELETE FROM ARRAY($arrPtr->;$vlElem)
4545
    End if
4646
 Until($vlElem<0)
4747
```
@@ -66,9 +66,10 @@ The following project method selects the first element of an array whose pointer
6666
  // SELECT ELEMENT ( Pointer ; Pointer)
6767
  // SELECT ELEMENT ( -> Text or String array ; -> Text or String variable or field )
6868
 
69-
 $1->:=Find in array($1->;$2->)
70-
 If($1->=-1)
71-
    $1->:=0 // If no element was found, set the array to no selected element
69+
 #DECLARE($arrPtr : Pointer ; $varPtr : Pointer)
70+
$arrPtr->:=Find in array($arrPtr->; $varPtr->)
71+
 If($tabPtr->=-1)
72+
    $tabPtr->:=0 // If no element was found, set the array to no selected element
7273
 End if
7374
```
7475

docs/commands-legacy/get-document-properties.md

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -47,18 +47,14 @@ The Time stamp project method listed below calculates the time stamp for a speci
4747
  // Time stamp { ( date ; Time ) } -> Long
4848
  // Time stamp { ( date ; Time ) } -> Number of seconds since Jan, 1st 1995
4949
 
50-
 var $1;$vdDate : Date
51-
 var $2;$vhTime : Time
52-
 var $0 : Integer
50+
 #DECLARE ($vdDate : Date ; $vhTime : Time) : Integer
5351
 
5452
 If(Count parameters=0)
5553
    $vdDate:=Current date
5654
    $vhTime:=Current time
57-
 Else
58-
    $vdDate:=$1
59-
    $vhTime:=$2
6055
 End if
61-
 $0:=(($vdDate-!01/01/95!)*86400)+$vhTime
56+
return (($vdDate-!01/01/95!)*86400)+$vhTime
57+
6258
```
6359

6460
**Note:** Using this method, you can encode dates and times from the *01/01/95* at *00:00:00* to the *01/19/2063* at *03:14:07* which cover the long integer range *0* to *2^31* minus one.
@@ -70,19 +66,19 @@ Conversely, the Time stamp to date and Time stamp to time project methods listed
7066
  // Time stamp to date ( Long ) -> Date
7167
  // Time stamp to date ( Time stamp ) -> Extracted date
7268
 
73-
 var $0 : Date
74-
 var $1 : Integer
75-
 
76-
 $0:=!01/01/95!+($1\86400)
77-
 
69+
#DECLARE ($timeStamp : Integer) : Date
70+
71+
return !01/01/95!+($timeStamp\86400)
72+
```
73+
74+
```4d
7875
  // Time stamp to time Project Method
7976
  // Time stamp to time ( Long ) -> Date
8077
  // Time stamp to time ( Time stamp ) -> Extracted time
8178
 
82-
 var $0 : Time
83-
 var $1 : Integer
84-
 
85-
 $0:=Time(Time string(†00:00:00†+($1%86400)))
79+
#DECLARE ($timeStamp : Integer) : Time
80+
81+
return Time(Time string(?00:00:00?+($timeStamp %86400)))
8682
```
8783

8884
For ensuring that the records have their time stamps correctly updated no matter the way they are created or modified, we just need to enforce that rule using the trigger of the table *\[Documents\]*:
@@ -103,7 +99,7 @@ Once this is implemented in the database, we have all we need to write the proje
10399
```4d
104100
  // CREATE DOCUMENTATION Project Method
105101
 
106-
 C_STRING(255;$vsPath;$vsDocPathName;$vsDocName)
102+
 C_TEXT($vsPath;$vsDocPathName;$vsDocName)
107103
 var $vlDoc : Integer
108104
 var $vbOnWindows;$vbDoIt;$vbLocked;$vbInvisible : Boolean
109105
 var $vhDocRef;$vhCreatedAt;$vhModifiedAt : Time

0 commit comments

Comments
 (0)