Skip to content

Commit 3e1bd0f

Browse files
authored
Merge pull request #430 from doc4d/main
fixes and translations
2 parents 23974c6 + da77644 commit 3e1bd0f

File tree

1,052 files changed

+15595
-5687
lines changed

Some content is hidden

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

1,052 files changed

+15595
-5687
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,14 @@ Exemple:
7777
-> regénérer page des thèmes en anglais
7878

7979

80+
## Classic Commands Update
81+
82+
- new command:
83+
1. create a page in commands folder
84+
2. add reference in:
85+
- commands/theme/ page
86+
- sidebars.js
87+
- commands/command-index.md (includes version added number)
88+
- modified command (moved to commands):
89+
1. move to commands (use move_command.exe)
90+
2. same as above

crowdin.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ files:
44
- /docs/preprocessing.conf
55
- /docs/commands-legacy/*.*
66
- /docs/WritePro/commands-legacy/*.*
7+
- /docs/*-legacy/*.*
78
translation: /i18n/%two_letters_code%/docusaurus-plugin-content-docs/current/**/%original_file_name%
89
- source: /i18n/en/docusaurus-plugin-content-docs/*.json
910
ignore:
@@ -15,6 +16,7 @@ files:
1516
- /versioned_docs/**/commands-legacy/*.*
1617
- /versioned_docs/**/WritePro/commands-legacy/*.*
1718
- /versioned_docs/version-18/
19+
- /versioned_docs/**/*-legacy/*.*
1820
translation: /i18n/%two_letters_code%/docusaurus-plugin-content-docs/**/%original_file_name%
1921
- source: /i18n/en/docusaurus-theme-classic/*.json
2022
translation: /i18n/%two_letters_code%/docusaurus-theme-classic/%original_file_name%

docs/API/DataStoreClass.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ The `.getInfo()` function <!-- REF #DataStoreClass.getInfo().Summary -->returns
467467
On a remote datastore:
468468

469469
```4d
470-
var $remoteDS : cs.DataStore
470+
var $remoteDS : 4D.DataStoreImplementation
471471
var $info; $connectTo : Object
472472
473473
$connectTo:=New object("hostname";"111.222.33.44:8044";"user";"marie";"password";"aaaa")
@@ -1128,7 +1128,7 @@ You can nest several transactions (sub-transactions). Each transaction or sub-tr
11281128
```4d
11291129
var $connect; $status : Object
11301130
var $person : cs.PersonsEntity
1131-
var $ds : cs.DataStore
1131+
var $ds : 4D.DataStoreImplementation
11321132
var $choice : Text
11331133
var $error : Boolean
11341134

docs/API/EntityClass.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -600,15 +600,14 @@ The following generic code duplicates any entity:
600600

601601
</details>
602602

603-
<!-- REF #EntityClass.getKey().Syntax -->**.getKey**( { *mode* : Integer } ) : Text<br/>**.getKey**( { *mode* : Integer } ) : Integer<!-- END REF -->
603+
<!-- REF #EntityClass.getKey().Syntax -->**.getKey**( { *mode* : Integer } ) : any<!-- END REF -->
604604

605605

606606
<!-- REF #EntityClass.getKey().Params -->
607607
|Parameter|Type||Description|
608608
|---------|--- |:---:|------|
609609
|mode|Integer|->|`dk key as string`: primary key is returned as a string, no matter the primary key type|
610-
|Result|Text|<-|Value of the text primary key of the entity|
611-
|Result|Integer|<-|Value of the numeric primary key of the entity|
610+
|Result|any|<-|Value of the primary key of the entity (Integer or Text)|
612611

613612
<!-- END REF -->
614613

@@ -1603,11 +1602,11 @@ Returns:
16031602

16041603
#### Description
16051604

1606-
The `.touched()` function <!-- REF #EntityClass.touched().Summary -->tests whether or not an entity attribute has been modified since the entity was loaded into memory or saved<!-- END REF -->.
1605+
The `.touched()` function <!-- REF #EntityClass.touched().Summary -->returns True if at least one entity attribute has been modified since the entity was loaded into memory or saved<!-- END REF -->. You can use this function to determine if you need to save the entity.
16071606

1608-
If an attribute has been modified or calculated, the function returns True, else it returns False. You can use this function to determine if you need to save the entity.
1607+
This only applies to attributes of [`kind`](DataClassClass.md#returned-object) "storage" or "relatedEntity".
16091608

1610-
This function returns False for a new entity that has just been created (with [`.new( )`](DataClassClass.md#new)). Note however that if you use a function which calculates an attribute of the entity, the `.touched()` function will then return True. For example, if you call [`.getKey()`](#getkey) to calculate the primary key, `.touched()` returns True.
1609+
For a new entity that has just been created (with [`.new()`](DataClassClass.md#new)), the function returns False. However in this context, if you access an attribute whose [`autoFilled` property](./DataClassClass.md#returned-object) is True, the `.touched()` function will then return True. For example, after you execute `$id:=ds.Employee.ID` for a new entity (assuming the ID attribute has the "Autoincrement" property), `.touched()` returns True.
16111610

16121611
#### Example
16131612

@@ -1649,7 +1648,7 @@ In this example, we check to see if it is necessary to save the entity:
16491648

16501649
The `.touchedAttributes()` function <!-- REF #EntityClass.touchedAttributes().Summary -->returns the names of the attributes that have been modified since the entity was loaded into memory<!-- END REF -->.
16511650

1652-
This applies for attributes of the [kind](DataClassClass.md#attributename) `storage` or `relatedEntity`.
1651+
This only applies to attributes of [`kind`](DataClassClass.md#returned-object) "storage" or "relatedEntity".
16531652

16541653
In the case of a related entity having been touched (i.e., the foreign key), the name of the related entity and its primary key's name are returned.
16551654

docs/API/FileClass.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@ You want to rename "ReadMe.txt" in "ReadMe_new.txt":
572572

573573
The `.setAppInfo()` function <!-- REF #FileClass.setAppInfo().Summary -->writes the *info* properties as information contents of an application file<!-- END REF -->.
574574

575-
The function must be used with an existing, supported file: **.plist** (all platforms), **.exe**/**.dll** (Windows), or **macOS executable**. If the file does not exist on disk or is not a supported file, the function does nothing (no error is generated).
575+
The function can only be used with the following file types: **.plist** (all platforms), existing **.exe**/**.dll** (Windows), or **macOS executable**. If used with another file type or with a **.exe**/**.dll** file that does not already exist on disk, the function does nothing (no error is generated).
576576

577577
***info* parameter object with a .plist file (all platforms)**
578578

@@ -582,6 +582,8 @@ The function only supports .plist files in xml format (text-based). An error is
582582

583583
:::
584584

585+
If the .plist file already exists on the disk, it is updated. Otherwise, it is created.
586+
585587
Each valid property set in the *info* object parameter is written in the .plist file as a key. Any key name is accepted. Value types are preserved when possible.
586588

587589
If a key set in the *info* parameter is already defined in the .plist file, its value is updated while keeping its original type. Other existing keys in the .plist file are left untouched.

docs/API/WebServerClass.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ The `.start()` function <!-- REF #WebServerClass.start().Summary -->starts the w
607607

608608
The web server starts with default settings defined in the settings file of the project or (host database only) using the `WEB SET OPTION` command. However, using the *settings* parameter, you can define customized properties for the web server session.
609609

610-
All settings of [Web Server objects](../commands/web-server.md-object) can be customized, except read-only properties ([.isRunning](#isrunning), [.name](#name), [.openSSLVersion](#opensslversion), [.perfectForwardSecrecy](#perfectforwardsecrecy), and [.sessionCookieName(#sessioncookiename)]).
610+
All settings of [Web Server objects](../commands/web-server.md-object) can be customized, except read-only properties ([.isRunning](#isrunning), [.name](#name), [.openSSLVersion](#opensslversion), [.perfectForwardSecrecy](#perfectforwardsecrecy), and [.sessionCookieName](#sessioncookiename)).
611611

612612
Customized session settings will be reset when the [`.stop()`](#stop) function is called.
613613

docs/Concepts/error-handling.md

Lines changed: 8 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ Within a custom error method, you have access to several pieces of information t
100100
4D automatically maintains a number of variables called [**system variables**](variables.md#system-variables), meeting different needs.
101101
:::
102102

103-
- the [`Last errors`](../commands-legacy/last-errors.md) command that returns a collection of the current stack of errors that occurred in the 4D application.
103+
- the [`Last errors`](../commands/last-errors.md) command that returns a collection of the current stack of errors that occurred in the 4D application.
104104
- the `Call chain` command that returns a collection of objects describing each step of the method call chain within the current process.
105105

106106

@@ -158,7 +158,7 @@ Try (expression) : any | Undefined
158158

159159
If an error occurred during its execution, it is intercepted and no error dialog is displayed, whether an [error-handling method](#installing-an-error-handling-method) was installed or not before the call to `Try()`. If *expression* returns a value, `Try()` returns the last evaluated value, otherwise it returns `Undefined`.
160160

161-
You can handle the error(s) using the [`Last errors`](../commands-legacy/last-errors.md) command. If *expression* throws an error within a stack of `Try()` calls, the execution flow stops and returns to the latest executed `Try()` (the first found back in the call stack).
161+
You can handle the error(s) using the [`Last errors`](../commands/last-errors.md) command. If *expression* throws an error within a stack of `Try()` calls, the execution flow stops and returns to the latest executed `Try()` (the first found back in the call stack).
162162

163163
:::note
164164

@@ -255,7 +255,7 @@ For more information on *deferred* and *non-deferred* errors, please refer to th
255255
:::
256256

257257

258-
In the `Catch` code block, you can handle the error(s) using standard error handling commands. The [`Last errors`](../commands-legacy/last-errors.md) function contains the last errors collection. You can [declare an error-handling method](#installing-an-error-handling-method) in this code block, in which case it is called in case of error (otherwise the 4D error dialog box is displayed).
258+
In the `Catch` code block, you can handle the error(s) using standard error handling commands. The [`Last errors`](../commands/last-errors.md) function contains the last errors collection. You can [declare an error-handling method](#installing-an-error-handling-method) in this code block, in which case it is called in case of error (otherwise the 4D error dialog box is displayed).
259259

260260
:::note
261261

@@ -299,58 +299,12 @@ Function createInvoice($customer : cs.customerEntity; $items : Collection; $invo
299299

300300
## Error codes
301301

302-
Exceptions that interrupt code execution are returned by 4D but can have different origins such as the OS, a device, the 4D kernel, a [`throw`](../commands-legacy/throw.md) in your code, etc. A returned error is therefore defined by three elements:
302+
Exceptions that interrupt code execution are returned by 4D but can have different origins such as the OS, a device, the 4D kernel, a [`throw`](../commands-legacy/throw.md) in your code, etc. An error is therefore defined by three elements:
303303

304-
- a **component signature**, which is the origin of the error
305-
- a **message**, wich explains why the error occurred
304+
- a **component signature**, which is the origin of the error (see [`Last errors`](../commands/last-errors.md) to have a list of signatures)
305+
- a **message**, which explains why the error occurred
306306
- a **code**, which is an arbitrary number returned by the component
307307

308-
These information are returned for every error (when available) by the [4D error dialog box](../Debugging/basics.md) and the [`Last errors`](../commands-legacy/last-errors.md) command. Keep in mind that, if you intercept and handle errors using a [error-handling method](#installing-an-error-handling-method), you need to process all information since a simple error code could not be correctly interpreted.
309-
310-
#### 4D component signatures
311-
312-
|Component Signature|Component|
313-
|--|---|
314-
|4DCM|4D Compiler runtime|
315-
|4DRT|4D runtime|
316-
|bkrs|4D backup & restore manager|
317-
|brdg|SQL 4D bridge|
318-
|cecm|4D code Editor|
319-
|CZip|zip 4D apis|
320-
|dbmg|4D database manager|
321-
|FCGI|fast cgi 4D bridge|
322-
|FiFo|4D file objects|
323-
|HTCL|http client 4D apis|
324-
|HTTP|4D http server|
325-
|IMAP|IMAP 4D apis|
326-
|JFEM|Form Macro apis|
327-
|LD4D|LDAP 4D apis|
328-
|lscm|4D language syntax manager|
329-
|MIME|MIME 4D apis|
330-
|mobi|4D Mobile|
331-
|pdf1|4D pdf apis|
332-
|PHP_|php 4D bridge|
333-
|POP3|POP3 4D apis|
334-
|SMTP|SMTP 4D apis|
335-
|SQLS|4D SQL server|
336-
|srvr|4D network layer apis|
337-
|svg1|SVG 4D apis|
338-
|ugmg|4D users and groups manager|
339-
|UP4D|4D updater|
340-
|VSS |4D VSS support (Windows Volume Snapshot Service) |
341-
|webc|4D Web view|
342-
|xmlc|XML 4D apis|
343-
|wri1|4D Write Pro|
344-
345-
346-
#### System component signatures
347-
348-
|Component Signature|Component|
349-
|--|---|
350-
|CARB|Carbon subsystem|
351-
|COCO|Cocoa subsystem|
352-
|MACH|macOS Mach subsystem|
353-
|POSX|posix/bsd subsystem (mac, linux, win)|
354-
|PW32|Pre-Win32 subsystem|
355-
|WI32|Win32 subsystem|
308+
The [4D error dialog box](../Debugging/basics.md) displays the code and the message to the user.
356309

310+
To have a full description of an error and especially its origin, you need to call the [`Last errors`](../commands/last-errors.md) command. When you intercept and handle errors using an [error-handling method](#installing-an-error-handling-method) in your final applications, use [`Last errors`](../commands/last-errors.md) and make sure you log all properties of the *error* object since error codes depend on the components.

0 commit comments

Comments
 (0)