Skip to content

Commit 09710b7

Browse files
authored
Merge pull request #440 from doc4d/main
updates and translations
2 parents 3e1bd0f + 7a5a4bf commit 09710b7

File tree

863 files changed

+3077
-3300
lines changed

Some content is hidden

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

863 files changed

+3077
-3300
lines changed

docs/API/DataClassClass.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ In the optional *settings* parameter, you can pass an object containing addition
184184
<!-- REF #DataClassClass.clearRemoteCache().Syntax -->**.clearRemoteCache()**<!-- END REF -->
185185

186186

187-
<!-- REF #DataStoreClass.clearRemoteCache().Params -->
187+
<!-- REF #DataClassClass.clearRemoteCache().Params -->
188188
|Parameter|Type||Description|
189189
|---------|--- |:---:|------|
190190
||||Does not require any parameters|

docs/API/EntityClass.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -928,7 +928,12 @@ A record locked by `.lock()` is unlocked:
928928
* when the [`unlock()`](#unlock) function is called on a matching entity in the same process
929929
* automatically, when it is no longer referenced by any entities in memory. For example, if the lock is put only on one local reference of an entity, the entity is unlocked when the function ends. As long as there are references to the entity in memory, the record remains locked.
930930

931-
> An entity can also be [locked by a REST session](../REST/$lock.md), in which case it can only be unlocked by the session.
931+
:::note Notes
932+
933+
- [`unlock()`](#unlock) must be called as many times as `lock()` was called in the same process for the entity to be actually unlocked.
934+
- An entity can also be [locked by a REST session](../REST/$lock.md), in which case it can only be unlocked by the session.
935+
936+
:::
932937

933938
By default, if the *mode* parameter is omitted, the function will return an error (see below) if the same entity was modified (i.e. the stamp has changed) by another process or user in the meantime.
934939

@@ -1725,7 +1730,7 @@ The `.unlock()` function <!-- REF #EntityClass.unlock().Summary -->removes the p
17251730
17261731
A record is automatically unlocked when it is no longer referenced by any entities in the locking process (for example: if the lock is put only on one local reference of an entity, the entity and thus the record is unlocked when the process ends).
17271732

1728-
>When a record is locked, it must be unlocked from the locking process and on the entity reference which put the lock. For example:
1733+
When a record is locked, it must be unlocked from the locking process and on the entity reference which put the lock. For example:
17291734

17301735
```4d
17311736
$e1:=ds.Emp.all()[0]
@@ -1735,6 +1740,13 @@ A record is automatically unlocked when it is no longer referenced by any entiti
17351740
$res:=$e1.unlock() //$res.success=true
17361741
```
17371742

1743+
:::note
1744+
1745+
`unlock()` must be called as many times as [`lock()`](#lock) was called in the same process for the entity to be actually unlocked.
1746+
1747+
:::
1748+
1749+
17381750
**Result**
17391751

17401752
The object returned by `.unlock()` contains the following property:

docs/FormObjects/properties_Object.md

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -101,32 +101,15 @@ You can use an [expression](Concepts/quick-tour.md#expressions) as data source f
101101
You can leave it up to 4D to create variables associated with your form objects (buttons, enterable variables, check boxes, etc.) dynamically and according to your needs. To do this, simply leave the "Variable or Expression" property (or `dataSource` JSON field) blank.
102102

103103
When a variable is not named, when the form is loaded, 4D creates a new variable for the object, with a calculated name that is unique in the space of the process variables of the interpreter (which means that this mechanism can be used even in compiled mode). This temporary variable will be destroyed when the form is closed.
104-
In order for this principle to work in compiled mode, it is imperative that dynamic variables are explicitly typed. There are two ways to do this:
105104

106-
- You can set the type using the [Expression type](#expression-type) property.
107-
- You can use a specific initialization code when the form is loaded that uses, for example, the `VARIABLE TO VARIABLE` command:
105+
To get or set the value of form objects that use dynamic variables, you just need to call [`OBJECT Get value`](../commands-legacy/object-get-value.md) and [`OBJECT SET VALUE`](../commands-legacy/object-set-value.md) commands. For example:
108106

109107
```4d
110-
If(Form event code=On Load)
111-
var $init : Text
112-
$Ptr_object:=OBJECT Get pointer(Object named;"comments")
113-
$init:=""
114-
VARIABLE TO VARIABLE(Current process;$Ptr_object->;$init)
115-
End if
108+
var $value : Variant
109+
$value:=OBJECT Get value("comments")
110+
OBJECT SET VALUE("comments";$value+10)
116111
```
117112

118-
In the 4D code, dynamic variables can be accessed using a pointer obtained with the `OBJECT Get pointer` command. For example:
119-
120-
```4d
121-
// assign the time 12:00:00 to the variable for the "tstart" object
122-
$p :=OBJECT Get pointer(Object named;"tstart")
123-
$p->:=?12:00:00?
124-
```
125-
126-
There are two advantages with this mechanism:
127-
128-
- On the one hand, it allows the development of "subform" type components that can be used several times in the same host form. Let us take as an example the case of a datepicker subform that is inserted twice in a host form to set a start date and an end date. This subform will use objects for choosing the date of the month and the year. It will be necessary for these objects to work with different variables for the start date and the end date. Letting 4D create their variable with a unique name is a way of resolving this difficulty.
129-
- On the other hand, it can be used to limit memory usage. In fact, form objects only work with process or inter-process variables. However, in compiled mode, an instance of each process variable is created in all the processes, including the server processes. This instance takes up memory, even when the form is not used during the session. Therefore, letting 4D create variables dynamically when loading the forms can save memory.
130113

131114
### Array List Box
132115

docs/Notes/updates.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ Read [**What’s new in 4D 20 R10**](https://blog.4d.com/en-whats-new-in-4d-20-R
1515
- 4D Language:
1616
- For consistency, [`Create entity selection`](../commands/create-entity-selection.md) and [`USE ENTITY SELECTION`](../commands/use-entity-selection.md) commands have been moved from the ["4D Environment"](../commands/theme/4D_Environment.md) to the ["Selection"](../commands/theme/Selection.md) themes.
1717

18+
#### Behavior changes
19+
20+
- On Windows, current printer fonts intended only for printing (i.e. not usable on screen) are no longer loaded by 4D at startup.
21+
1822

1923
## 4D 20 R9
2024

docs/commands-legacy/get-pasteboard-data-type.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ displayed_sidebar: docs
1111
| --- | --- | --- | --- |
1212
| 4Dsignatures | Text array | &#8592; | 4D signatures of data types |
1313
| nativeTypes | Text array | &#8592; | Native data types |
14-
| formatNames | Text array | &#8592; | Format names (Windows only), empty strings under Mac OS |
14+
| formatNames | Text array | &#8592; | Format names or descriptions |
1515

1616
<!-- END REF-->
1717

@@ -26,7 +26,7 @@ This command returns the data types in several different forms via two (or three
2626
* Under Mac OS, native types are expressed as UTIs (Uniform Type Identifier).
2727
* Under Windows, native types are expressed as numbers, with each number being associated with a format name. The *nativeTypes* array contains these numbers in the form of strings (“3”, “12”, and so on). If you want to use more explicit labels, it is recommended to use the optional *formatNames* array, which contains the format names of the native types under Windows.
2828
The *nativeTypes* array lets any type of data found in the pasteboard to be supported, including data whose type is not referenced by 4D.
29-
* Under Windows, you can also pass the *formatNames* array, which receives the names of the data types found in the pasteboard. The values returned in this array can be used, for example, to build a format selection pop-up menu. Under Mac OS, the *formatNames* array returns empty strings.
29+
* You can also pass the *formatNames* array, which receives the names or descriptions of the data types found in the pasteboard. The values returned in this array can be used, for example, to build a format selection pop-up menu.
3030

3131
For more information about the data types supported, please refer to the *Managing Pasteboards* section.
3232

docs/commands-legacy/listbox-get-row-color-as-number.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ In *row*, pass the number of the row whose color you want to get.
3434

3535
**Note:** The command does not take any hidden/visible states of the list box rows into account.
3636

37-
In the *colorType* parameter, you can pass either the lk background color or lk font color constant ("*List Box*" theme) in order to find out the background or font color for the row. If you omit this parameter, the font color is returned.
37+
In the *colorType* parameter, you can pass either the `lk background color` or `lk font color` constant ("*List Box*" theme) in order to find out the background or font color for the row. If you omit this parameter, the font color is returned.
3838

3939
**Warning:** a color assigned to a row is not necessarily displayed in every cell of the row (see example). If conflicting color values are set using properties for list boxes or list box columns, an order of priority is applied. For more information, refer to the *Design Reference* manual.
4040

docs/commands-legacy/listbox-get-row-color.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ In *row*, pass the number of the row whose color you want to get.
3434

3535
**Note:** The command does not take any hidden/visible states of the list box rows into account.
3636

37-
In the *colorType* parameter, you can pass either the lk background color or lk font color constant ("*List Box*" theme) in order to find out the background or font color for the row. If you omit this parameter, the font color is returned.
37+
In the *colorType* parameter, you can pass either the `lk background color` or `lk font color` constant ("*List Box*" theme) in order to find out the background or font color for the row. If you omit this parameter, the font color is returned.
3838

3939
**Warning:** A color assigned to a row is not necessarily displayed in every cell of the row (see example). If conflicting color values are set using properties for list boxes or list box columns, an order of priority is applied. For more information, refer to the *Design Reference* manual.
4040

docs/commands-legacy/listbox-set-row-color.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ In *row*, pass the number of the row where you want to apply the new color.
3434

3535
**Note:** The command does not take any hidden/visible states of the list box rows into account.
3636

37-
In *color*, pass an RGB color value. For more information about RGB colors, refer to the description of the [OBJECT SET RGB COLORS](object-set-rgb-colors.md) command. If you want the row to inherit the color set for the higher level, you can pass the lk inherited constant in *color*.
37+
In *color*, pass an RGB color value. For more information about RGB colors, refer to the description of the [OBJECT SET RGB COLORS](object-set-rgb-colors.md) command. If you want the row to inherit the color set for the higher level, you can pass the`lk inherited` constant in *color*.
3838

39-
In the *colorType* parameter, pass the lk background color or lk font color constants to indicate whether you want to apply the color as the background or the font color of the row. If you omit this parameter, the color is applied as the font color.
39+
In the *colorType* parameter, pass the `lk background color` or `lk font color` constants to indicate whether you want to apply the color as the background or the font color of the row. If you omit this parameter, the color is applied as the font color.
4040

4141
This command modifies values found in the array of colors that may have been defined for the column or list box. If these arrays are not already defined, the command dynamically creates arrays that you can access using the [LISTBOX Get array](listbox-get-array.md) command.
4242

docs/commands-legacy/web-send-blob.md

Lines changed: 1 addition & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -26,50 +26,7 @@ The type of data contained in the BLOB is indicated by *type*. This parameter ca
2626

2727
**Note:** For more information about MIME types, refer to the page: <http://www.iana.org/assignments/media-types>.
2828

29-
Here is a list of the most common MIME types:
30-
31-
| **Extension** | **Mime/Type** |
32-
| ------------- | ------------------------ |
33-
| .htm | text/html |
34-
| .html | text/html |
35-
| .shtml | text/html |
36-
| .shtm | text/html |
37-
| .css | text/css |
38-
| .pdf | application/pdf |
39-
| .rtf | application/rtf |
40-
| .ps | application/postscript |
41-
| .eps | application/postscript |
42-
| .hqx | application/mac-binhex40 |
43-
| .js | application/javascript |
44-
| .json | application/json |
45-
| .txt | text/plain |
46-
| .text | text/plain |
47-
| .gif | image/gif |
48-
| .jpg | image/jpeg |
49-
| .jpeg | image/jpeg |
50-
| .jpe | image/jpeg |
51-
| .jfif | image/jpeg |
52-
| .pic | image/pict |
53-
| .pict | image/pict |
54-
| .tif | image/tiff |
55-
| .tiff | image/tiff |
56-
| .mpeg | video/mpeg |
57-
| .mpg | video/mpeg |
58-
| .mov | video/quicktime |
59-
| .moov | video/quicktime |
60-
| .aif | audio/aiff |
61-
| .aiff | audio/aiff |
62-
| .wav | audio/wav |
63-
| .ram | audio/x-pn-realaudio |
64-
| .sit | application/x-stuffit |
65-
| .bin | application/x-stuffit |
66-
| .xml | application/xml |
67-
| .z | application/x-zip |
68-
| .zip | application/x-zip |
69-
| .gz | application/x-gzip |
70-
| .tar | application/x-tar |
71-
72-
**Note:** The list of MIME types supported by the 4D HTTP server is saved in the "MimeTypes.xml" file found in the following folder of the 4D application: *\[Contents\]\\Native components\\HTTPServer.bundle\\Contents\\Resources*.
29+
The list of MIME types and their file extensions supported by the 4D HTTP server is saved in the "MimeTypes.xml" file found in the "Resources" folder of the 4D application.
7330

7431
The references to 4D variables and *4DSCRIPT* type tags in the page are always parsed.
7532

i18n/es/docusaurus-plugin-content-docs/current/API/DataClassClass.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ En el parámetro opcional *settings* se puede pasar un objeto que contenga opcio
181181

182182
<!-- REF #DataClassClass.clearRemoteCache().Syntax -->**.clearRemoteCache()**<!-- END REF -->
183183

184-
<!-- REF #DataStoreClass.clearRemoteCache().Params -->
184+
<!-- REF #DataClassClass.clearRemoteCache().Params -->
185185

186186
| Parámetros | Tipo | | Descripción |
187187
| ---------- | ---- | :-: | ---------------------------- |

0 commit comments

Comments
 (0)