Skip to content

Commit 2122590

Browse files
authored
Merge pull request #387 from doc4d/main
launch R8 beta
2 parents e8f3395 + d375636 commit 2122590

17,970 files changed

Lines changed: 753277 additions & 283917 deletions

File tree

Some content is hidden

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

.github/workflows/build.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@ on:
99
- '!main'
1010

1111
jobs:
12-
workflow-check:
12+
check:
1313
uses: ./.github/workflows/workflow-syntax-check.yml
14-
workflow-build:
14+
build:
1515
uses: ./.github/workflows/workflow-build.yml
1616
concurrency:
17-
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
18-
cancel-in-progress: true
17+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-build
18+
cancel-in-progress: true
19+
build-static:
20+
uses: ./.github/workflows/workflow-build-static.yml

.github/workflows/deploy.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ jobs:
99
uses: ./.github/workflows/workflow-syntax-check.yml
1010
workflow-build:
1111
uses: ./.github/workflows/workflow-build.yml
12+
workflow-static:
13+
uses: ./.github/workflows/workflow-build-static.yml
1214

1315
gh-release:
1416
needs: [workflow-build]
@@ -22,3 +24,29 @@ jobs:
2224
with:
2325
github_token: ${{ secrets.GITHUB_TOKEN }}
2426
publish_dir: ./build/
27+
28+
publish-release:
29+
needs: [workflow-static]
30+
name: 'Publish Release'
31+
runs-on: ubuntu-latest
32+
steps:
33+
- name: Download artifact
34+
uses: actions/download-artifact@v4
35+
with:
36+
pattern: static-doc-*
37+
path: ./release
38+
- name: Zip
39+
run: |
40+
cd release
41+
for dir in *; do
42+
zip -r "$dir.zip" "$dir"
43+
done
44+
- name: Upload Release Asset
45+
uses: softprops/action-gh-release@v2
46+
with:
47+
tag_name: "latest"
48+
files: |
49+
release/*.zip
50+
token: ${{ secrets.GITHUB_TOKEN }}
51+
prerelease: true
52+
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Build static documentation
2+
3+
on:
4+
workflow_call:
5+
6+
jobs:
7+
build:
8+
strategy:
9+
matrix:
10+
language: ["en", "fr", "es", "ja", "pt"]
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: actions/setup-node@v4
15+
with:
16+
node-version: '22.x'
17+
- name: Build
18+
run: |
19+
if [ -e package-lock.json ]; then
20+
npm ci
21+
else
22+
npm i
23+
fi
24+
npm run build -- --locale ${{ matrix.language }}
25+
env:
26+
DOCUSAURUS_LANGUAGE: ${{ matrix.language }}
27+
DOCUSAURUS_ROUTER: 'hash'
28+
- uses: actions/upload-artifact@v4
29+
with:
30+
path: ./build
31+
name: static-doc-${{ matrix.language }}

.github/workflows/workflow-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
- uses: actions/checkout@v4
2929
- uses: actions/setup-node@v4
3030
with:
31-
node-version: '20.x'
31+
node-version: '22.x'
3232
- name: Build
3333
run: |
3434
if [ -e package-lock.json ]; then

.github/workflows/workflow-syntax-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- uses: actions/checkout@v4
1616
- uses: actions/setup-node@v4
1717
with:
18-
node-version: '20.x'
18+
node-version: '22.x'
1919
- name: Diff images
2020
env:
2121
CLICOLOR_FORCE: 1

docs/Concepts/dt_pointer.md

Lines changed: 51 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,13 @@ $MyVar:="Hello"
3333
$MyVar is now a variable containing the string “Hello.” We can now create a pointer to $MyVar:
3434

3535
```4d
36-
C_POINTER($MyPointer)
36+
var $MyPointer : Pointer
3737
$MyPointer:=->$MyVar
3838
```
3939
The -> symbol means “get a pointer to.” This symbol is formed by a dash followed by a “greater than” sign. In this case, it gets the pointer that references or “points to” $MyVar. This pointer is assigned to MyPointer with the assignment operator.
4040

4141
$MyPointer is now a variable that contains a pointer to $MyVar. $MyPointer does not contain “Hello”, which is the value in $MyVar, but you can use $MyPointer to get this value. The following expression returns the value in $MyVar:
42+
4243
```4d
4344
$MyPointer->
4445
```
@@ -84,8 +85,35 @@ With:
8485
|Inequality |Pointer # Pointer |Boolean |vPtrA # vPtrC |True|
8586
||||vPtrA # vPtrB|False|
8687

88+
89+
:::warning Null Pointers
90+
91+
Trying to assign or to read a null pointer (aka "nil") will produce an error at runtime. For example:
92+
93+
```4d
94+
var $p : Pointer // non initialized pointer (Nil value)
95+
$v:=$p-> // error
96+
$p->:=$v // error
97+
```
98+
99+
To prevent such errors, you can write:
100+
101+
```4d
102+
If ($p#Null)
103+
$p->:=$v
104+
End if
105+
```
106+
107+
:::
108+
109+
110+
111+
87112
## Main usages
113+
114+
88115
### Pointers to tables
116+
89117
Anywhere that the language expects to see a table, you can use a dereferenced pointer to the table. You create a pointer to a table by using a line like this:
90118
```4d
91119
$TablePtr:=->[anyTable]
@@ -118,19 +146,26 @@ OBJECT SET FONT($FieldPtr->;"Arial")
118146

119147
When you use pointers to process or local variables, you must be sure that the variable pointed to is already set when the pointer is used. Keep in mind that local variables are deleted when the method that created them has completed its execution and process variables are deleted at the end of the process that created them. When a pointer calls a variable that no longer exists, this causes a syntax error in interpreted mode (variable not defined) but it can generate a more serious error in compiled mode.
120148

121-
Pointers to local variables allow you to save process variables in many cases. Pointers to local variables can only be used within the same process. In the debugger, when you display a pointer to a local variable that has been declared in another method, the original method name is indicated in parentheses, after the pointer. For example, if you write in Method1:
149+
Pointers to local variables allow you to save process variables in many cases. Pointers to local variables can only be used within the same process. In the debugger, when you display a pointer to a local variable that has been declared in another method, the original method name is indicated in parentheses, after the pointer. For example, if you write in *Method1*:
150+
122151
```4d
123152
$MyVar:="Hello world"
124153
Method2(->$MyVar)
125154
```
126-
In Method2, the debugger will display $1 as follows:
155+
*Method2*:
127156

128-
|$1|->$MyVar (Method1)
129-
|---|---
157+
```4d
158+
#DECLARE($param : Pointer)
159+
...
160+
```
161+
The debugger will display $param as follows:
130162

131-
The value of $1 will be:
163+
|$param|->$MyVar (Method1)|
164+
|---|---|
165+
166+
You can expand $param and its value will be:
132167

133-
|$MyVar (Method1)|"Hello world"|
168+
|$MyVar|"Hello world"|
134169
|---|---|
135170

136171
### Pointers to array elements
@@ -162,12 +197,14 @@ If you need to refer to the fourth element in the array by using the pointer, yo
162197

163198
### Pointers as parameters to methods
164199
You can pass a pointer as a parameter to a method. Inside the method, you can modify the object referenced by the pointer. For example, the following method, `takeTwo`, takes two parameters that are pointers. It changes the object referenced by the first parameter to uppercase characters, and the object referenced by the second parameter to lowercase characters. Here is the project method:
200+
165201
```4d
166202
//takeTwo project method
167-
//$1 – Pointer to a string field or variable. Change this to uppercase.
168-
//$2 – Pointer to a string field or variable. Change this to lowercase.
169-
$1->:=Uppercase($1->)
170-
$2->:=Lowercase($2->)
203+
//$changeUp – Pointer to a string field or variable. Change this to uppercase.
204+
//$changeLow – Pointer to a string field or variable. Change this to lowercase.
205+
#DECLARE($changeUp : Pointer ; $changeLow : Pointer)
206+
$changeUp->:=Uppercase($changeUp->)
207+
$changeLow->:=Lowercase($changeLow->)
171208
```
172209

173210
The following line uses the `takeTwo` method to change a field to uppercase characters and to change a variable to lowercase characters:
@@ -180,6 +217,7 @@ If the field [myTable]myField contained the string "jones", it would be changed
180217
In the takeTwo method, and in fact, whenever you use pointers, it is important that the data type of the object being referenced is correct. In the previous example, the pointers must point to something that contains a string or text.
181218

182219
### Pointers to pointers
220+
183221
If you really like to complicate things, you can use pointers to reference other pointers. Consider this example:
184222
```4d
185223
$MyVar:="Hello"
@@ -214,3 +252,5 @@ $NewVar:=($PointerTwo->)->
214252
```
215253

216254
**Important:** Multiple dereferencing requires parentheses.
255+
256+

docs/Debugging/debugLogFiles.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ id: debugLogFiles
33
title: Log files
44
---
55

6-
4D applications can generate several log files that are useful for debugging or optimizing their execution. Logs are usually started or stopped using selectors of the [SET DATABASE PARAMETER](https://doc.4d.com/4dv20/help/command/en/page642.html), [WEB SET OPTION](https://doc.4d.com/4dv20/help/command/en/page1210.html), or [HTTP SET OPTION](https://doc.4d.com/4dv20/help/command/en/page1160.html) commands and are stored in the [Logs folder](Project/architecture.md#logs) of the project.
6+
4D applications can generate several log files that are useful for debugging or optimizing their execution. Logs are usually started or stopped using selectors of the [SET DATABASE PARAMETER](../commands-legacy/set-database-parameter.md), [WEB SET OPTION](../commands-legacy/web-set-option.md), or [HTTP SET OPTION](../commands-legacy/http-set-option.md) commands and are stored in the [Logs folder](Project/architecture.md#logs) of the project.
77

88
Information logged needs to be analyzed to detect and fix issues. This section provides a comprehensive description of the following log files:
99

@@ -290,7 +290,7 @@ These log files record each exchange between the 4D application and the mail ser
290290

291291
* SMTP - [SMTP New transporter](../commands/smtp-new-transporter.md)
292292
* POP3 - [POP3 New transporter](../commands/pop3-new-transporter.md)
293-
* IMAP - [IMAP New transporter](../commands/imap-new-transporter.mdnsporter)
293+
* IMAP - [IMAP New transporter](../commands/imap-new-transporter.md)
294294

295295
The log files can be produced in two versions:
296296

docs/Develop/preemptive.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ It is possible to [disable locally the thread-safety verification](#).
188188

189189
:::
190190

191-
The [symbol file](../Project/compiler.md/#complete-list-of-methods), if enabled, also contains the thread safety status for each method.
191+
The [symbol file](../Project/compiler.md#complete-list-of-methods), if enabled, also contains the thread safety status for each method.
192192

193193
### User interface
194194

docs/FormEditor/forms.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ You can create multiple pages for an input form. If you have more fields or vari
8888

8989
- Place the most important information on the first page and less important information on other pages.
9090
- Organize each topic on its own page.
91-
- Reduce or eliminate scrolling during data entry by setting the [entry order](../FormEditor/formEditor.html#data-entry-order).
91+
- Reduce or eliminate scrolling during data entry by setting the [entry order](formEditor.md#data-entry-order).
9292
- Provide space around the form elements for an attractive screen design.
9393

9494
Multiple pages are a convenience used for input forms only. They are not for printed output. When a multi-page form is printed, only the first page is printed.
@@ -112,7 +112,7 @@ When a form is executed, the objects are loaded and combined in the following or
112112
3. Page zero of the open form
113113
4. Current page of the open form.
114114

115-
This order determines the default [entry order](../FormEditor/formEditor.html#data-entry-order) of objects in the form.
115+
This order determines the default [entry order](formEditor.md#data-entry-order) of objects in the form.
116116

117117
> Only pages 0 and 1 of an inherited form can appear in other forms.
118118

docs/FormObjects/dropdownList_Overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ You can create different types of drop-down lists with different features. To de
2828

2929
> This feature is only available in 4D projects.
3030
31-
An [object](Concepts/dt_object.md) encapsulating a [collection](Concepts/dt_collection) can be used as the data source of a drop-down list. The object must contain the following properties:
31+
An [object](Concepts/dt_object.md) encapsulating a [collection](Concepts/dt_collection.md) can be used as the data source of a drop-down list. The object must contain the following properties:
3232

3333
|Property|Type|Description|
3434
|---|---|---|

0 commit comments

Comments
 (0)