Skip to content
Merged

sync #523

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
cd9c39f
New Crowdin updates (#2989)
arnaud4d Nov 13, 2025
c87a9b4
fixes
arnaud4d Nov 13, 2025
8608d1a
add precision for idle connection timeout
arnaud4d Nov 13, 2025
26ebb5f
Update wa-get-url-history.md (#2990)
nobuteshima Nov 13, 2025
1b6063b
Update new-process.md (Changes of local process) (#2991)
nobuteshima Nov 13, 2025
6657f21
Update new-process.md (Changes of local process into ver 21) (#2992)
nobuteshima Nov 13, 2025
3f294c0
Update register-client.md (updating old information) (#2993)
nobuteshima Nov 13, 2025
7040180
Update register-client.md (updating old information into 21) (#2994)
nobuteshima Nov 13, 2025
f4e237f
fix db param en FR
arnaud4d Nov 13, 2025
f23aa6d
Merge branch 'main' of https://github.com/doc4d/docs
arnaud4d Nov 13, 2025
a5c1840
not DP AI integrated
arnaud4d Nov 13, 2025
6efce89
enhanced saving example
arnaud4d Nov 13, 2025
26660df
orda events and table lock
arnaud4d Nov 13, 2025
b68e111
Updated blob to print settings - removed old stuff
arnaud4d Nov 13, 2025
8dd964e
New Crowdin updates (#2995)
arnaud4d Nov 14, 2025
65a8948
Write Pro interface
arnaud4d Nov 14, 2025
ca54667
more consistent release notes
arnaud4d Nov 14, 2025
7d0e42f
exposed available to singletons
arnaud4d Nov 14, 2025
49709d8
fix parameters vs variables confusion
arnaud4d Nov 17, 2025
bb36810
ES Edit in blob to print settings and SET/Get database parameter (#2…
sandritica Nov 17, 2025
e4e5805
New Crowdin updates (#2997)
arnaud4d Nov 17, 2025
a08bbe5
ViewPro: Fix capitalization of foreColor and add borderTop section
e-marchand Nov 17, 2025
e2de028
report fixes 4DVP
arnaud4d Nov 17, 2025
e1d12eb
added link to blog post for code live checker
arnaud4d Nov 17, 2025
347c581
link to SpreadJS release
arnaud4d Nov 17, 2025
47d2c8e
New Crowdin updates (#2998)
arnaud4d Nov 18, 2025
e1975ea
Update wa-get-url-history.md (#2999)
nobuteshima Nov 18, 2025
7e4acf9
Licence usage for 4D Server only
arnaud4d Nov 18, 2025
5081c20
fixes
arnaud4d Nov 18, 2025
53d75c8
old note to remove
arnaud4d Nov 18, 2025
a517a19
Merge branch 'main' into main
arnaud4d Nov 18, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions docs/Concepts/classes.md
Original file line number Diff line number Diff line change
Expand Up @@ -768,13 +768,14 @@ A **singleton class** is a user class that only produces a single instance. For

### Singletons types

Singletons are useful to define values that need to be available from anywhere in an application, a session, or a process.

4D supports three types of singletons:

- a **process singleton** has a unique instance for the process in which it is instantiated,
- a **shared singleton** has a unique instance for all processes on the machine.
- a **session singleton** is a shared singleton but with a unique instance for all processes in the [session](../API/SessionClass.md). Session singletons are shared within an entire session but vary between sessions. In the context of a client-server or a web application, session singletons make it possible to create and use a different instance for each session, and therefore for each user.
- a **session singleton** is a shared singleton but with a unique instance for all processes in the [session](../API/SessionClass.md). Session singletons are shared within an entire session but vary between sessions. In the context of a client-server or a web application, session singletons make it possible to create and use a different instance for each session, and therefore for each user. Session singletons are particularly appropriate with [Qodly applications](https://developer.4d.com/qodly/).

Singletons are useful to define values that need to be available from anywhere in an application, a session, or a process.

:::info

Expand Down Expand Up @@ -817,7 +818,9 @@ The [`.isSingleton`](../API/ClassClass.md#issingleton) property of Class objects
The [`.isSessionSingleton`](../API/ClassClass.md#issessionsingleton) property of Class objects allows to know if the class is a session singleton.


### Exposed singleton functions

Shared and session singleton functions support the [`exposed` keyword](../ORDA/ordaClasses.md#exposed-vs-non-exposed-functions). An exposed singleton function can be directly called by REST requests. This feature is useful to design [Qodly pages calling 4D functions](https://developer.4d.com/qodly/4DQodlyPro/pageLoaders/events/bindingActionToEvents#class-functions).

### Examples

Expand Down
23 changes: 14 additions & 9 deletions docs/Concepts/parameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ title: Parameters

You'll often find that you need to pass data to your methods and functions. This is easily done with parameters.

## Overview
## Passing parameters

**Parameters** (or **arguments**) are pieces of data that a method or a class function needs in order to perform its task. The terms *parameter* and *argument* are used interchangeably throughout this manual. Parameters are also passed to built-in 4D commands. In this example, the string “Hello” is an argument to the `ALERT` built-in command:

Expand Down Expand Up @@ -47,20 +47,19 @@ Any subroutine can return a value. Only one single output parameter can be decla
Input and output values are [evaluated](#values-or-references) at the moment of the call and copied into or from local variables within the called class function or method. Variable parameters must be [declared](#declaring-parameters) in the called code.


:::info Compatibility

The legacy declaration syntax, where parameters are automatically copied in sequentially numbered local variables $0, $1, etc. and declared using compiler directives such as `C_TEXT($1;$2)`, is **deprecated** as of 4D 20 R7.

:::


## Declaring parameters

Inside called methods or class functions, parameter values are assigned to local variables. You declare parameters using a **parameter name** along with a **parameter type**, separated by colon.
Inside called methods or class functions, you declare parameters using a **parameter name** along with a **parameter type**, separated by colon.

- For class functions, parameters are declared along with the function prototype, i.e. when using the `Function` or `Class constructor` keywords.
- For methods (project methods, form object methods, database methods, and triggers), parameters are declared using the **`#DECLARE`** keyword at the beginning of the method code.

:::info Compatibility

The legacy declaration syntax, where parameters are automatically copied in sequentially numbered local variables $0, $1, etc. and declared using compiler directives such as `C_TEXT($1;$2)`, is **deprecated** as of 4D 20 R7.

:::

Examples:

```4d
Expand Down Expand Up @@ -109,6 +108,12 @@ $entitySelection:=ds.User.query("login=:1"; $user)
// Check hash password...
```

:::note

Do not confuse **parameter declarations** with [**variable declarations**](variables.md#declaring-variables). Using the `var` keyword with parameters will generate errors.

:::

### Returned value

You declare the return parameter of a function by adding an arrow (->) and the parameter definition after the input parameter(s) list. For example:
Expand Down
5 changes: 3 additions & 2 deletions docs/Concepts/variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,9 @@ System variables are used by [4D commands](../commands/command-index.md). Refer
|---|---|---|
|`OK`|Integer|Usually set to 1 after a command has displayed a dialog box and the user clicked the **OK** button, and 0 if they clicked **Cancel**. Some commands also modify the value of the `OK` system variable when a operation is successfully executed.
|`Document`|Text|Contains the "long name" (full path+name) of the last file opened or created using commands such as [Open document](../commands-legacy/open-document.md) or [SELECT LOG FILE](../commands/select-log-file.md).|
|`FldDelimit`, `RecDelimit`|Text|Contain the character codes that will be used respectively as a field separator (default is **Tab** (9)) and record separator (default is **carriage return** (13)) when importing or exporting text. To use a different separator, assign a new value to the system variable.|
|`Error`, `Error method`, `Error line`, `Error formula`|Text, Longint|Used in an error-catching method installed by the [`ON ERR CALL`](../commands-legacy/on-err-call.md) command. See [Handling errors within the method](../Concepts/error-handling.md#handling-errors-within-the-method).|
|`FldDelimit`, `RecDelimit`|Integer|Contain the character codes that will be used respectively as a field separator (default is **Tab** (9)) and record separator (default is **carriage return** (13)) when importing or exporting text. To use a different separator, assign a new value to the system variable.|
|`Error`, `Error line`|Integer|Used in an error-catching method installed by the [`ON ERR CALL`](../commands-legacy/on-err-call.md) command. See [Handling errors within the method](../Concepts/error-handling.md#handling-errors-within-the-method).|
|`Error method`, `Error formula`|Text|Used in an error-catching method installed by the [`ON ERR CALL`](../commands-legacy/on-err-call.md) command. See [Handling errors within the method](../Concepts/error-handling.md#handling-errors-within-the-method).|
|`MouseDown`|Integer|Used in a method installed by the [`ON EVENT CALL`](../commands-legacy/on-event-call.md) command. Set to 1 when the mouse button is pushed, otherwise set to 0. |
|`MouseX`, `MouseY`|Integer|Used in a method installed by the [`ON EVENT CALL`](../commands-legacy/on-event-call.md) command. <li>In a `MouseDown=1` event, `MouseX` and `MouseY` are respectively set to the vertical and horizontal coordinates of the click. Both values are expressed in pixels and use the local coordinate system of the window. </li><li>In case of a picture field or variable, `MouseX` and `MouseY` return the local coordinates of a mouse click in the [`On Clicked`](../Events/onClicked.md), [`On Double Clicked`](../Events/onDoubleClicked.md) and [`On Mouse Up`](../Events/onMouseUp.md) form events. Local coordinates of the mouse cursor are also returned in the [`On Mouse Enter`](../Events/onMouseEnter.md) and [`On Mouse Move`](../Events/onMouseMove.md) form events. For more information, see the [Mouse Coordinates in a picture](../FormEditor/pictures.md#mouse-coordinates-in-a-picture) section.</li>|
|`KeyCode`|Integer|Used in a method installed by the [`ON EVENT CALL`](../commands-legacy/on-event-call.md) command. Set to the character code of the key that was just pressed. If the key is a function key, `KeyCode` is set to a special code.|
Expand Down
12 changes: 1 addition & 11 deletions docs/Notes/updates.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,13 @@ Read [**What’s new in 4D 21 R2**](https://blog.4d.com/en-whats-new-in-4d-21-r2

#### Highlights

- [Code Live Checker](../code-editor/write-class-method.md#warnings-and-errors) has been enhanced to provide greater precision in error detection.
- [Code Live Checker](../code-editor/write-class-method.md#warnings-and-errors) has been enhanced to provide greater precision in error detection (see [this blog post](https://blog.4d.com/better-error-handling-and-type-inference-for-4d-developers) for more information).
- [**Fixed bug list**](https://bugs.4d.fr/fixedbugslist?version=21_R2): list of all bugs that have been fixed in 4D 21 R2.


#### Behavior changes


## 4D 21.x LTS

See [**Release Notes for 4D 21.x LTS**](../../21/Notes/updates).


## 4D 20.x LTS


See [**Release Notes for 4D 20.x LTS**](../../20/Notes/updates).



## Library table
Expand Down
11 changes: 9 additions & 2 deletions docs/ORDA/orda-events.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ You cannot directly trigger event function execution. Events are called automati

:::info Compatibility note

ORDA entity events in the datastore are equivalent to triggers in the 4D database. However, actions triggered at the 4D database level using the 4D classic language commands or standard actions do not trigger ORDA events.
ORDA entity events in the datastore are equivalent to triggers in the 4D database. However, actions triggered at the 4D database level using the 4D classic language commands or standard actions do not trigger ORDA events. Note also that, unlike triggers, ORDA entity events do not lock the entire underlying table of a dataclass while saving or dropping entities. Several events can run in parallel as long as they involve distinct entities (i.e. records).

:::

Expand Down Expand Up @@ -453,7 +453,9 @@ If (This.userManualPath#"")
// The user manual document file is created on the disk
// This may fail if no more space is available
Try
$fileCreated:=$userManualFile.create()
// The file content has been generated and stored in a map in Storage.docMap previously
$docInfo:=Storage.docMap.query("name = :1"; This.name).first()
$userManualFile.setContent($docInfo.content)
Catch
// No more room on disk for example
$result:={/
Expand All @@ -467,6 +469,11 @@ return $result

```

:::note

The content of the file is generated outside the `saving` event because it can be time consuming.

:::


### `Function event afterSave`
Expand Down
31 changes: 26 additions & 5 deletions docs/ORDA/ordaClasses.md
Original file line number Diff line number Diff line change
Expand Up @@ -972,25 +972,46 @@ $arch.save() //courseName and name are "Archaeology II"

## Exposed vs non-exposed functions

For security reasons, all of your data model class functions and alias attributes are **not exposed** (i.e., private) by default to remote requests.
For security reasons, all of your data model class functions, including [computed attributes](#computed-attributes-1) and [alias attributes](#alias-attributes-1), as well as [shared singleton functions](../Concepts/classes.md#shared-singleton) are **not exposed** (i.e., private) by default to **remote requests**.

Remote requests include:
Remote requests are:

- Requests sent by remote 4D applications connected through `Open datastore`
- REST requests
- REST requests, including requests from [Qodly pages](https://developer.4d.com/qodly/)

> Regular 4D client/server requests are not impacted. Data model class functions are always available in this architecture.

A function that is not exposed is not available on remote applications and cannot be called on any object instance from a REST request. If a remote application tries to access a non-exposed function, the "-10729 - Unknown member method" error is returned.

To allow a data model class function to be called by a remote request, you must explicitly declare it using the `exposed` keyword. The formal syntax is:
To allow a function or an attribute to be called by a remote request, you must explicitly declare it using the `exposed` keyword. The formal syntax is:

```4d
// declare an exposed function
exposed Function <functionName>
```

> The `exposed` keyword can only be used with Data model class functions. If used with a [regular user class](Concepts/classes.md) function, it is ignored and an error is returned by the compiler.
```4d
// declare an exposed alias
exposed Alias <attributeName> <targetPath>
```

```4d
// declare an exposed computed attribute
exposed Function get <attributeName>
```

```4d
// declare a shared singleton function
shared singleton Class constructor()
exposed Function <functionName>
```


:::note

The `exposed` keyword can only be used with the objects decribed above. If used with a [regular user class](Concepts/classes.md) function, it is ignored and an error is returned by the compiler.

:::

### Example

Expand Down
13 changes: 9 additions & 4 deletions docs/ViewPro/classes.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,12 @@ The `.useFooterDropDownList` property <!-- REF #TableOptions.useFooterDropDownLi
The `.backColor` property is the <!-- REF #TableStyle.backColor.Summary -->[background color](configuring.md#background--foreground) of the table<!-- END REF -->.


### .forecolor
### .foreColor

<!-- REF #TableStyle.forecolor.Syntax -->
**.forecolor** : Text<!-- END REF -->
<!-- REF #TableStyle.foreColor.Syntax -->
**.foreColor** : Text<!-- END REF -->

The `.forecolor` property is the <!-- REF #TableStyle.forecolor.Summary -->[foreground color](configuring.md#background--foreground) of the table<!-- END REF -->.
The `.foreColor` property is the <!-- REF #TableStyle.foreColor.Summary -->[foreground color](configuring.md#background--foreground) of the table<!-- END REF -->.



Expand Down Expand Up @@ -200,7 +200,12 @@ The `.borderRight` property is the <!-- REF #TableStyle.borderRight.Summary -->r

The `.borderBottom` property is the <!-- REF #TableStyle.borderBottom.Summary -->bottom border line of the table <!-- END REF -->.

### .borderTop

<!-- REF #TableStyle.borderTop.Syntax -->
**.borderTop** : [cs.ViewPro.LineBorder](#lineborder)<!-- END REF -->

The `.borderTop` property is the <!-- REF #TableStyle.borderTop.Summary -->top border line of the table <!-- END REF -->.


### .borderHorizontal
Expand Down
6 changes: 6 additions & 0 deletions docs/ViewPro/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ title: Getting Started

A spreadsheet is an application containing a grid of cells into which you can enter information, execute calculations, or display pictures. 4D View Pro is powered by the [SpreadJS spreadsheet solution](https://developer.mescius.com/spreadjs) integrated in 4D.

:::note

Go to the [Library table](../Notes/updates.md#library-table) to know the SpreadJS version integrated in your 4D release.

:::

Embedding 4D View Pro areas in your forms allows you to import and export spreadsheets documents using the 4D View Pro commands.


Expand Down
10 changes: 6 additions & 4 deletions docs/WritePro/writeprointerface.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ title: 4D Write Pro Interface
slug: /WritePro/write-pro-interface
---

4D WritePro Interface offers a set of palettes, which allow end users to easily customize a 4D Write Pro document.
4D Write Pro Interface offers a set of palettes, which allow end users to easily customize a 4D Write Pro document.

A 4D developer can easily implement these palettes in their application. Thus, end users can manage all 4D Write Pro properties, such as fonts, text alignment, bookmarks, table layout, and frames.

The main [4D Write Pro Interface documentation](https://doc.4d.com/4Dv20/4D/20/Entry-areas.300-6263967.en.html) can be found in the *4D Design Reference manual*.
## Installation & documentation

You will find below:
4D Write Pro Interface is a **4D component** that needs to be [installed in your project](../Project/components.md#overview). 4D Write Pro Interface source files are [provided on Github](https://github.com/4d/4D-WritePro-Interface).

The main [4D Write Pro Interface documentation](https://doc.4d.com/4Dv20/4D/20/Entry-areas.300-6263967.en.html) can be found in the *4D Design Reference manual*. You will find below:

- the Table Wizard configuration documentation,
- the integrated A.I. documentation.
Expand Down Expand Up @@ -314,7 +316,7 @@ The 4D Write Pro interface uses OpenAI, for which you need to provide your own k

:::

### Limitations (Developer Preview)
### Limitations

In the current implementation, the feature has the following limitations:

Expand Down
Loading
Loading