Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
169 commits
Select commit Hold shift + click to select a range
5c4964e
sessionclass.md Spanish
arnaud4d Jul 2, 2026
08b6d01
sessionclass.md French
arnaud4d Jul 2, 2026
7720f56
sessionclass.md Japanese
arnaud4d Jul 2, 2026
8e0b457
sessionclass.md Portuguese, Brazilian
arnaud4d Jul 2, 2026
3adb759
dataclassclass.md Spanish
arnaud4d Jul 2, 2026
731afcf
dataclassclass.md Spanish
arnaud4d Jul 2, 2026
0460b26
sessionclass.md Spanish
arnaud4d Jul 2, 2026
8edcb8f
flow-control.md Spanish
arnaud4d Jul 2, 2026
9b55d16
dataclassclass.md Spanish
arnaud4d Jul 2, 2026
f036612
updates.md French
arnaud4d Jul 2, 2026
8e63cb1
updates.md Spanish
arnaud4d Jul 2, 2026
670e158
updates.md Japanese
arnaud4d Jul 2, 2026
93a25b8
updates.md Portuguese, Brazilian
arnaud4d Jul 2, 2026
7a78fee
building.md Spanish
arnaud4d Jul 2, 2026
8b19a8e
clientserver.md Spanish
arnaud4d Jul 2, 2026
2b4bad8
buttongrid_overview.md Spanish
arnaud4d Jul 2, 2026
b9ae122
input_overview.md Spanish
arnaud4d Jul 2, 2026
a85dcae
picturepopupmenu_overview.md Spanish
arnaud4d Jul 2, 2026
ff79c96
properties_entry.md Spanish
arnaud4d Jul 2, 2026
2da71fc
writeproarea_overview.md Spanish
arnaud4d Jul 2, 2026
e8757ed
webarea_overview.md Spanish
arnaud4d Jul 2, 2026
acd50ce
user-new.md Spanish
arnaud4d Jul 2, 2026
ccf08f9
user-new.md Spanish
arnaud4d Jul 2, 2026
bf73a65
quotamanagerclass.md Spanish
arnaud4d Jul 2, 2026
1d5cdc0
directory.md French
arnaud4d Jul 2, 2026
ca0fbd3
directory.md French
arnaud4d Jul 2, 2026
58708ad
signalclass.md French
arnaud4d Jul 2, 2026
af804fc
dt_string.md French
arnaud4d Jul 2, 2026
9a27106
methods.md French
arnaud4d Jul 2, 2026
1d6a71f
formobjects_overview.md French
arnaud4d Jul 2, 2026
503f9eb
list_overview.md French
arnaud4d Jul 2, 2026
da4744a
listbox_overview.md French
arnaud4d Jul 2, 2026
4e6265a
properties_text.md French
arnaud4d Jul 2, 2026
5cfbaa6
general.md French
arnaud4d Jul 2, 2026
f39fd61
compatibility.md French
arnaud4d Jul 2, 2026
364b148
database.md French
arnaud4d Jul 2, 2026
140b7ca
directory.md French
arnaud4d Jul 2, 2026
d3b2992
directory.md French
arnaud4d Jul 2, 2026
ba1073e
xml.md French
arnaud4d Jul 2, 2026
9056746
xml_dom.md French
arnaud4d Jul 2, 2026
5ee0496
xml_sax.md French
arnaud4d Jul 2, 2026
62bfb0b
directory.md French
arnaud4d Jul 2, 2026
c3ef2e1
updates.md French
arnaud4d Jul 2, 2026
f279f86
compatibility.md French
arnaud4d Jul 2, 2026
1b785ae
drag-and-drop.md French
arnaud4d Jul 2, 2026
7f42b3e
dragdrop1.png French
arnaud4d Jul 2, 2026
432b4b0
dragdrop2.png French
arnaud4d Jul 2, 2026
1e53a78
dragdrop3.png French
arnaud4d Jul 2, 2026
dc156b1
dragdrop4.png French
arnaud4d Jul 2, 2026
2a82e11
dragdrop5.png French
arnaud4d Jul 2, 2026
865a93c
dragdrop6.png French
arnaud4d Jul 2, 2026
848e1dc
dragdrop7.png French
arnaud4d Jul 2, 2026
e4f5c1f
relations.png French
arnaud4d Jul 2, 2026
20600d8
code.json Spanish
arnaud4d Jul 2, 2026
93f24a6
directory.md Spanish
arnaud4d Jul 2, 2026
f7ac7ac
imaptransporterclass.md Spanish
arnaud4d Jul 2, 2026
3f0c050
smtptransporterclass.md Spanish
arnaud4d Jul 2, 2026
a5e0470
classes.md Spanish
arnaud4d Jul 2, 2026
a33a5ef
listbox_overview.md Spanish
arnaud4d Jul 2, 2026
96e5219
directory.md Spanish
arnaud4d Jul 2, 2026
ac8e3c4
signalclass.md Spanish
arnaud4d Jul 2, 2026
40bb7ab
dt_string.md Spanish
arnaud4d Jul 2, 2026
225cb22
methods.md Spanish
arnaud4d Jul 2, 2026
a62c1b9
formobjects_overview.md Spanish
arnaud4d Jul 2, 2026
596ef92
list_overview.md Spanish
arnaud4d Jul 2, 2026
e7b31bd
listbox_overview.md Spanish
arnaud4d Jul 2, 2026
7b5c9d3
properties_text.md Spanish
arnaud4d Jul 2, 2026
4aa0511
general.md Spanish
arnaud4d Jul 2, 2026
10a8f10
monitor.md Spanish
arnaud4d Jul 2, 2026
5185c9d
users.md Spanish
arnaud4d Jul 2, 2026
94f0004
vp-set-allowed-methods.md Spanish
arnaud4d Jul 2, 2026
f23fd15
vp-set-column-attributes.md Spanish
arnaud4d Jul 2, 2026
ea2af35
database.md Spanish
arnaud4d Jul 2, 2026
6b6f1c0
http-request-handler.md Spanish
arnaud4d Jul 2, 2026
05c04fb
wp-insert-picture.md Spanish
arnaud4d Jul 2, 2026
1461781
dataclassclass.md Spanish
arnaud4d Jul 2, 2026
df35225
directory.md Spanish
arnaud4d Jul 2, 2026
06434ac
entityclass.md Spanish
arnaud4d Jul 2, 2026
3004ce4
listbox_overview.md Spanish
arnaud4d Jul 2, 2026
442878c
imap-new-transporter.md Spanish
arnaud4d Jul 2, 2026
96697a0
pop3-new-transporter.md Spanish
arnaud4d Jul 2, 2026
006dbb7
smtp-new-transporter.md Spanish
arnaud4d Jul 2, 2026
1372987
monitor.md Spanish
arnaud4d Jul 2, 2026
73fd8d9
vp-set-allowed-methods.md Spanish
arnaud4d Jul 2, 2026
9eb0878
vp-set-column-attributes.md Spanish
arnaud4d Jul 2, 2026
30a0c2b
http-request-handler.md Spanish
arnaud4d Jul 2, 2026
7dad545
dataclassclass.md Spanish
arnaud4d Jul 2, 2026
4da3caa
directory.md Spanish
arnaud4d Jul 2, 2026
39582a5
entityclass.md Spanish
arnaud4d Jul 2, 2026
2f0a239
monitor.md Spanish
arnaud4d Jul 2, 2026
c33e635
vp-set-allowed-methods.md Spanish
arnaud4d Jul 2, 2026
1c23a81
vp-set-column-attributes.md Spanish
arnaud4d Jul 2, 2026
a97bf10
http-request-handler.md Spanish
arnaud4d Jul 2, 2026
e473a72
imap-new-transporter.md Spanish
arnaud4d Jul 2, 2026
9d00762
open-datastore.md Spanish
arnaud4d Jul 2, 2026
d998ad7
pop3-new-transporter.md Spanish
arnaud4d Jul 2, 2026
187366e
smtp-new-transporter.md Spanish
arnaud4d Jul 2, 2026
20d9d39
xml.md Spanish
arnaud4d Jul 2, 2026
266a573
xml_dom.md Spanish
arnaud4d Jul 2, 2026
a8f6fe9
xml_sax.md Spanish
arnaud4d Jul 2, 2026
713f7df
directory.md Spanish
arnaud4d Jul 2, 2026
d099955
entityclass.md Spanish
arnaud4d Jul 2, 2026
88b4b3d
listbox_overview.md Spanish
arnaud4d Jul 2, 2026
800ae48
monitor.md Spanish
arnaud4d Jul 2, 2026
22fa00f
vp-set-allowed-methods.md Spanish
arnaud4d Jul 2, 2026
d2fc5e5
vp-set-column-attributes.md Spanish
arnaud4d Jul 2, 2026
1bf8146
http-request-handler.md Spanish
arnaud4d Jul 2, 2026
7576dfc
wp-insert-picture.md Spanish
arnaud4d Jul 2, 2026
951d191
drag-and-drop.md Spanish
arnaud4d Jul 2, 2026
d934992
dragdrop1.png Spanish
arnaud4d Jul 2, 2026
b341caf
dragdrop2.png Spanish
arnaud4d Jul 2, 2026
b6845f9
dragdrop3.png Spanish
arnaud4d Jul 2, 2026
36df94d
dragdrop4.png Spanish
arnaud4d Jul 2, 2026
b1ce3aa
dragdrop5.png Spanish
arnaud4d Jul 2, 2026
a48b98b
dragdrop6.png Spanish
arnaud4d Jul 2, 2026
becd094
dragdrop7.png Spanish
arnaud4d Jul 2, 2026
f990c93
relations.png Spanish
arnaud4d Jul 2, 2026
4cd07e0
directory.md Japanese
arnaud4d Jul 2, 2026
526a3db
directory.md Japanese
arnaud4d Jul 2, 2026
cdaffd6
signalclass.md Japanese
arnaud4d Jul 2, 2026
b0cc1e0
dt_string.md Japanese
arnaud4d Jul 2, 2026
b47778c
methods.md Japanese
arnaud4d Jul 2, 2026
c22293a
formobjects_overview.md Japanese
arnaud4d Jul 2, 2026
c0401ee
list_overview.md Japanese
arnaud4d Jul 2, 2026
5450935
listbox_overview.md Japanese
arnaud4d Jul 2, 2026
ed00237
properties_text.md Japanese
arnaud4d Jul 2, 2026
355866f
general.md Japanese
arnaud4d Jul 2, 2026
4ab7ccf
database.md Japanese
arnaud4d Jul 2, 2026
61263dc
directory.md Japanese
arnaud4d Jul 2, 2026
494c6eb
directory.md Japanese
arnaud4d Jul 2, 2026
54d44ef
xml.md Japanese
arnaud4d Jul 2, 2026
296382b
xml_dom.md Japanese
arnaud4d Jul 2, 2026
a83a8c1
xml_sax.md Japanese
arnaud4d Jul 2, 2026
d7c5cc1
directory.md Japanese
arnaud4d Jul 2, 2026
74b2f31
drag-and-drop.md Japanese
arnaud4d Jul 2, 2026
6412e7b
dragdrop1.png Japanese
arnaud4d Jul 2, 2026
20f31dc
dragdrop2.png Japanese
arnaud4d Jul 2, 2026
5369b6b
dragdrop3.png Japanese
arnaud4d Jul 2, 2026
65fe42d
dragdrop4.png Japanese
arnaud4d Jul 2, 2026
6745591
dragdrop5.png Japanese
arnaud4d Jul 2, 2026
faec2e7
dragdrop6.png Japanese
arnaud4d Jul 2, 2026
5343857
dragdrop7.png Japanese
arnaud4d Jul 2, 2026
2baafd7
relations.png Japanese
arnaud4d Jul 2, 2026
d609e1c
directory.md Portuguese, Brazilian
arnaud4d Jul 2, 2026
93373b7
directory.md Portuguese, Brazilian
arnaud4d Jul 2, 2026
7a1c481
signalclass.md Portuguese, Brazilian
arnaud4d Jul 2, 2026
d7d5387
dt_string.md Portuguese, Brazilian
arnaud4d Jul 2, 2026
3e2655d
methods.md Portuguese, Brazilian
arnaud4d Jul 2, 2026
6329c74
formobjects_overview.md Portuguese, Brazilian
arnaud4d Jul 2, 2026
da14bcc
list_overview.md Portuguese, Brazilian
arnaud4d Jul 2, 2026
1ca7f82
listbox_overview.md Portuguese, Brazilian
arnaud4d Jul 2, 2026
55fb406
properties_text.md Portuguese, Brazilian
arnaud4d Jul 2, 2026
4209216
general.md Portuguese, Brazilian
arnaud4d Jul 2, 2026
a3e391f
database.md Portuguese, Brazilian
arnaud4d Jul 2, 2026
7768a19
directory.md Portuguese, Brazilian
arnaud4d Jul 2, 2026
d516ace
directory.md Portuguese, Brazilian
arnaud4d Jul 2, 2026
1d1f999
xml.md Portuguese, Brazilian
arnaud4d Jul 2, 2026
ab39403
xml_dom.md Portuguese, Brazilian
arnaud4d Jul 2, 2026
be35c4f
xml_sax.md Portuguese, Brazilian
arnaud4d Jul 2, 2026
1eba965
directory.md Portuguese, Brazilian
arnaud4d Jul 2, 2026
9e8396b
drag-and-drop.md Portuguese, Brazilian
arnaud4d Jul 2, 2026
49807c9
dragdrop1.png Portuguese, Brazilian
arnaud4d Jul 2, 2026
0e04603
dragdrop2.png Portuguese, Brazilian
arnaud4d Jul 2, 2026
c5250a4
dragdrop3.png Portuguese, Brazilian
arnaud4d Jul 2, 2026
28c1dfe
dragdrop4.png Portuguese, Brazilian
arnaud4d Jul 2, 2026
2590d82
dragdrop5.png Portuguese, Brazilian
arnaud4d Jul 2, 2026
b76aaf6
dragdrop6.png Portuguese, Brazilian
arnaud4d Jul 2, 2026
ac51caa
dragdrop7.png Portuguese, Brazilian
arnaud4d Jul 2, 2026
45a49b7
relations.png Portuguese, Brazilian
arnaud4d Jul 2, 2026
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
2 changes: 1 addition & 1 deletion i18n/es/code.json
Original file line number Diff line number Diff line change
Expand Up @@ -880,6 +880,6 @@
"message": "4D Analyzer"
},
"theme.docs.versionDropdown.notAvailable": {
"message": "Page not available in this version\nOpening the default page instead"
"message": "La página no está disponible en esta versión\nEn su lugar, se abrirá la página predeterminada."
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ Para cada objeto de *objectCol*:
- Si no se da la llave primaria, se crea la entidad y se asigna el valor de la llave primaria con respecto a las reglas estándar de la base de datos.
- Si el objeto contiene una propiedad booleana "\_\_NEW" definida como **true**, la entidad se crea con los valores correspondientes de los atributos del objeto. Se realiza una verificación con respecto a la llave primaria:
- Si se da la llave primaria (tal cual) y existe, se envía un error
- If the primary key is given (as is) and does not exist, the entity is created
- Si se da la llave primaria (tal cual) y no existe, se crea la entidad
- Si no se da la primaria, se crea la entidad y se asigna el valor de la llave primaria con respecto a las reglas estándar de la base de datos.

> La propiedad "\__KEY" que contiene un valor sólo se tiene en cuenta cuando la propiedad "\__NEW" tiene el valor **false** (o se omite) y existe una entidad correspondiente. The use of a \_\_KEY property allows independence from the primary key attribute name.
Expand Down Expand Up @@ -1257,7 +1257,7 @@ var $results := ds.MyClass.query("myVectorField > :1 order by myVectorField desc

You will generally want vector similarity query results to be sorted from "most similar" to "least similar." Por defecto, los resultados devueltos con una cláusula **order by** se ordenan en orden ascendente. Depending on the similarity metric used, you may need to adjust the sorting direction to obtain the correct ranking:

- for [**cosine**](./VectorClass.md#cosinesimilarity) and [**dot**](./VectorClass.md#dotsimilarity) similarity, higher values indicate greater similarity. Therefore, you will typically need to include the `desc` keyword in the query string.
- for [**cosine**](./VectorClass.md#cosinesimilarity) and [**dot**](./VectorClass.md#dotsimilarity) similarity, higher values indicate greater similarity. Por lo tanto, normalmente deberá incluir la palabra clave `desc` en la cadena de consulta.
- for [**euclidean distance**](./VectorClass.md#euclideandistance) similarity, lower values indicate greater similarity. In this case, the default ascending order (or explicitly using the `asc` keyword) is appropriate.

:::
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ La función `.files()` devuelve <!-- REF #directory.files().Summary -->una colec

> Los alias o enlaces simbólicos no se resuelven.

Por defecto, si se omite el parámetro *options*, sólo se devuelven en la colección los archivos del primer nivel de la carpeta, así como los archivos o carpetas invisibles. Puede modificar esto pasando, en el parámetro *options*, una o varias de las siguientes constantes:
By default, if you omit the *options* parameter, only the files at the first level of the folder are returned in the collection, including invisible files. Puede modificar esto pasando, en el parámetro *options*, una o varias de las siguientes constantes:

| Constante | Valor | Comentario |
| --------------------- | ----- | ------------------------------------------------------------------------------- |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ You can change this value dynamically using the [`quotas.defaultEntitySetTimeout

:::note

If you define a value higher than the `maxEntitySetTimeout` property value, it will be aligned with the `maxEntitySetTimeout` value.
Si se define un valor superior al de la propiedad `maxEntitySetTimeout`, dicho valor se ajustará al de `maxEntitySetTimeout`.

:::

You cannot pass a value <=0 (an error is generated in this case). To reset the property value for the session, pass *undefined*.
No se puede pasar un valor <=0 (en ese caso se produce un error). Para restablecer el valor de la propiedad para la sesión, pase *undefined*.

#### Ejemplo

Expand Down Expand Up @@ -92,7 +92,7 @@ http://127.0.0.1/rest/People?$filter=ID>=4&$method=entityset&$timeout=3000

... then the timeout defined in the request is ignored and the entity set will be released after 40 minutes if not used during this period of time.

You cannot pass a value <=0 (an error is generated in this case). To reset the property value for the session, pass *undefined*.
No se puede pasar un valor <=0 (en ese caso se produce un error). Para restablecer el valor de la propiedad para la sesión, pase *undefined*.

#### Ejemplo

Expand All @@ -114,11 +114,11 @@ Session.quotas.maxEntitySetTimeout:=2400

The `.nbEntitySets` property contains <!-- REF #QuotaManagerClass.nbEntitySets.Summary -->the maximum number of REST entity sets allowed in memory for the current session (in seconds)<!-- END REF -->.

By default, there is no limit for entity sets [stored in memory by REST requests](../REST/$info.md) (the value is 0). You can set a limit to control the server payload for a specific session.
By default, there is no limit for entity sets [stored in memory by REST requests](../REST/$info.md) (the value is 0). Puede definir un límite para controlar la carga útil del servidor para una sesión específica.

When the maximum number of allowed entity sets is reached, a REST request that need to create an entity set will get a [**429** HTTP status code and an error response](../REST/REST_requests.md#rest-status-and-response), until at least one entity set is released. You can release an entity set from the cache using the [`$release` REST command](../REST/$entityset.md#entitysetrelease).

You cannot pass a value <=0 (an error is generated in this case). To reset the property value for the session, pass *undefined*.
No se puede pasar un valor <=0 (en ese caso se produce un error). Para restablecer el valor de la propiedad para la sesión, pase *undefined*.

#### Ejemplo

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -694,11 +694,11 @@ End if

#### Descripción

La propiedad `.quotas` contiene <!-- REF #SessionClass.quotas.Summary -->un objeto `4D.QuotaManager` con los valores actuales y los valores establecidos para los umbrales del servidor en la sesión actual<!-- END REF -->. Los límites del servidor se utilizan para controlar las solicitudes dirigidas al servidor y ayudan a evitar un uso excesivo de los recursos (ver la clase [`4D.QuotaManager`](./QuotaManagerClass.md)).
The `.quotas` property contains <!-- REF #SessionClass.quotas.Summary -->a `4D.QuotaManager` object with current values and set values for server thresholds regarding REST requests in the current session<!-- END REF -->. Los límites del servidor se utilizan para controlar las solicitudes dirigidas al servidor y ayudan a evitar un uso excesivo de los recursos (ver la clase [`4D.QuotaManager`](./QuotaManagerClass.md)).

Esta propiedad es **solo lectura**.

The following properties of the `4D.QuotaManager` object are available for the session:
Las siguientes propiedades del objeto `4D.QuotaManager` están disponibles para la sesión:

| Propiedad | | Tipo | Writable | Descripción |
| ------------------------------------------------------------------------- | ------------ | ------- | -------- | -------------------------------------------------------------------------------------------------------------- |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,15 @@ title: Signal

Las señales son herramientas que ofrece el lenguaje 4D para gestionar las interacciones y evitar conflictos entre procesos en una aplicación multiproceso. Las señales le permiten asegurarse de que uno o más procesos esperarán a que se complete una tarea específica antes de continuar la ejecución. Todo proceso puede esperar y/o liberar una señal.

> Los semáforos también pueden utilizarse para gestionar las interacciones. Los semáforos permiten asegurarse de que dos o más procesos no modifican el mismo recurso (archivo, registro...) al mismo tiempo. Sólo el proceso que define el semáforo puede eliminarlo.
:::note

### Objeto signal
[Semaphores](../Develop/processes.md#semaphores) can also be used to manage interactions. Los semáforos permiten asegurarse de que dos o más procesos no modifican el mismo recurso (archivo, registro...) al mismo tiempo. Sólo el proceso que define el semáforo puede eliminarlo.

Una señal es un objeto compartido que debe ser pasado como parámetro a los comandos que llaman o crean trabajadores o procesos.
:::

Un objeto `4D.Signal` contiene los siguientes métodos y propiedades integrados:
### Objeto signal

- [`.wait()`](#wait)
- [`.trigger()`](#trigger)
- [`.signaled`](#signaled)
- [`.description`](#description).
Una señal es un objeto compartido que debe ser pasado como parámetro a los comandos que llaman o crean trabajadores o procesos.

Lanzamiento Mientras espera una señal, el proceso que llama no utiliza ninguna CPU. Esto puede ser muy interesante para el rendimiento en aplicaciones multiproceso. Lanzamiento

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ Las siguientes secuencias de escape pueden utilizarse dentro de las cadenas:

**Nota:** el carácter \ (barra invertida) se utiliza como separador en las rutas de acceso en Windows. Por lo tanto, debe utilizar una doble barra invertida \\\ en las rutas cuando quiera tener una barra invertida delante de un caracter utilizado en una de las secuencias de escape reconocidas por 4D (por ejemplo, "C:\\MisDocumentos\\\Nuevos.txt").

### Normalización automática de los finales de línea

Para garantizar la compatibilidad multiplataforma de los textos gestionados en la base de datos, 4D normaliza automáticamente los finales de línea de modo que ocupen un solo carácter: `\r` (retorno de carro). Esta normalización se lleva a cabo a nivel de los objetos del formulario (variables o campos) que contienen texto sin formato o de varios estilos. Los finales de línea que no sean nativos, o que utilicen una combinación de varios caracteres (por ejemplo, `\r\n`), se consideran como un único `\r`. Note that in compliance with the XML standard (multi-style text format), the [multi-style text commands](../commands/theme/Styled_Text.md) also normalize line endings for text variables that are not associated with objects.

Este principio facilita el uso de comandos de texto con múltiples estilos o de comandos como [`HIGHLIGHT TEXT`](../commands/highlight-text) en un contexto multiplataforma. Sin embargo, debe tenerlo en cuenta en su procesamiento cuando trabaje con textos de fuentes heterogénicas.

## Operadores de cadenas

| Operación | Sintaxis | Devuelve | Expression | Valor |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -832,9 +832,9 @@ El comando [`defer`](../commands/defer) permite encadenar una o varias expresion
Whether you are managing document closings, resetting interprocess flags, or freeing up resources, ensuring that your housekeeping tasks execute flawlessly no matter how or where your function terminates can be handled by `defer` keywords.

```4d
//make sure some code is executed at exit
//Asegurarse de que se ejecute cierto código al salir
defer(myCleaningMethod)
//Do something...
//Hacer algo...
```

Vea la descripción del comando [`defer`](../commands/defer) para más información.
53 changes: 53 additions & 0 deletions i18n/es/docusaurus-plugin-content-docs/current/Concepts/methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,57 @@ En el lenguaje 4D, hay varias categorías de métodos. La categoría depende de
| **Método base** | Automático, cuando se produce un evento de la sesión de trabajo | Sí (predefinido) | Hay 16 métodos base en 4D. |
| **Class** | Se llama automáticamente cuando un objeto de la clase es instanciado o cuando una función de la clase es ejecutada en una instancia de un objeto en cualquier otro método o en un [campo de base de datos](../Develop/field-properties.md#class). | sí (funciones de clase) | Una **Clase** se utiliza para declarar y configurar la clase [constructor](./classes.md#class-constructor), [propiedades](./classes.md#property) y [funciones](./classes.md#function) de objetos. Ver [**Clases**](classes.md) y [clase **Función**](../API/FunctionClass.md). |

## Language tokens

4D's language includes a unique tokenization system for constants, commands, tables, fields and keywords names that are used in the code. Tokenizing these names means that as you type in the code editor they are stored internally as absolute references (numbers) and then restored as text during execution or display depending on the context. This allows you to guarantee that the code will always be interpreted correctly, even if you rename your tables or fields, or when 4D language commands are renamed over the course of different application versions.

**Note:** This also ensures automatic translation of the code when you have enabled the ["Use regional system settings" preference](../Preferences/methods.md#4d-programming-language-use-regional-system-settings) and open your databases with 4D versions in different languages.

Tokenisation is completely transparent for 4D developers when working in the [4D code editor](../code-editor/write-class-method.md), and you generally won't need to worry about it. However, there are two cases where you might need to take action regarding tokenization: if you want to disable it, and if you want to use tokenization in your formulas.

### Disabling tokenization

When your project is stored on a version control system (VCS) such as GitHub or GitLab, you may want to disable tokenization to make the code more readable on the external platform. To do this, you can deselect the [**Include tokens in project source files**](../Preferences/general.md#include-tokens-in-project-source-files) preference to prevent tokens from being stored in your **new projects**.

You can configure your **existing projects** to save code without tokens by inserting the following key in the `<applicationName>.4DProject` file using a text editor:

```json
"tokenizedText": false
```

Este parámetro sólo se tiene en cuenta cuando se guardan los métodos. Los métodos existentes en sus proyectos no se modifican, a menos que los vuelva a guardar.

### Using tokens in formulas

A text-based 4D [formula](../commands/theme/Formulas.md) is a text that is interpreted at runtime, and not as it is typed. In fact, this is the case as soon as 4D code is expressed as raw text, more specifically when code is exported and then imported using the [`METHOD GET CODE`](../commands/method-get-code) and [`METHOD SET CODE`](../commands/method-set-code) commands, copied/pasted or [interpreted from 4D HTML tags](../Tags/transformation-tags.md).
To benefit from tokenization mechanisms in these contexts, you just need to use an explicit syntax which consists in preceding object names in the language by their token.

### Token syntax

For tokenizable named elements contained in expressions, 4D offers a special syntax you can use to reference the tokens directly: you just need to add a specific suffix after the element name to indicate its type (command, field, etc.), followed by its reference. The token syntax is detailed in this table:

| Elemento | Example (standard syntax) | Suffix | Example (token syntax) | Comentarios |
| ----------- | ------------------------------------------------------------------- | --------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
| 4D Command | String(a) | :Cxx | String:C10(a) | xx is the command number |
| 4D Constant | Pi | :Kxx:yy | Pi:K30:1 | xx is the ID of the constant group and yy is its index (position) within this group |
| Tabla | [Employees] | :xx | [Employees:1] | xx is the table number |
| Campo | [Employees]Name | :xx | [Employees:1]Name:2 | xx is the field number |
| 4D Plugin | PV PRINT(area) | :Pxx:yy | PV PRINT:P13000:229(area) | xx is the plug-in ID and yy is the index of the command |

**Note:** Uppercase letters (C, P) must be used in the suffixes; otherwise, they will not be interpreted correctly.

When you use this syntax, you guarantee that your formulas will be interpreted correctly even in the case of renaming or when the database is executed in a different language.

This syntax is accepted in all 4D formulas (or 4D expressions) regardless of the calling context:

- 4D formulas executed using the Formula editor or using commands such as [`EXECUTE FORMULA`](../commands/execute-formula), [`APPLY TO SELECTION`](../commands/apply-to-selection), [`QUERY BY FORMULA`](../commands/query-by-formula), [`LISTBOX INSERT COLUMN FORMULA`](../commands/listbox-insert-column-formula), etc.
- expressions inserted in [multi-style text areas](../FormObjects/properties_Text.md#supported-tags) (see ST INSERT EXPRESSION),
- expressions calculated in [transformation tags](../Tags/transformation-tags.md),
- expressions inserted in external areas such as [4D Write Pro areas](../WritePro/managing-formulas.md).

#### Where to find the element numbers?

The token syntax requires the addition of the reference numbers of various elements. The location of these references depends on the type of element.

- **4D commands:** Command numbers can be found in the documentation ("Properties" area) as well as on the Commands page of the Explorer.
- **Tables and fields**: Table and field numbers can be obtained using the [`Table`](../commands/table) and [`Field`](../commands/field) commands. They are also displayed in the Inspector palette of the Structure editor.
Loading