Skip to content

Commit

Permalink
Merge branch 'pr/382'
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaud4d committed Dec 13, 2024
2 parents 91d3760 + 090eba8 commit c071bce
Show file tree
Hide file tree
Showing 801 changed files with 6,990 additions and 6,590 deletions.
6 changes: 4 additions & 2 deletions docs/API/EntityClass.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,11 @@ The attribute value type depends on the attribute [kind](DataClassClass.md#attri

#### Description

The `.clone()` function <!-- REF #EntityClass.clone().Summary -->creates in memory a new entity referencing the same record as the original entity<!-- END REF -->. This function allows you to update entities separately.
The `.clone()` function <!-- REF #EntityClass.clone().Summary -->creates in memory a new entity referencing the same record as the original entity<!-- END REF -->.

>Keep in mind that any modifications done to entities will be saved in the referenced record only when the [`.save( )`](#save) function is executed.
This function allows you to update entities separately. Note however that, for performance reasons, the new entity shares the same reference of object attributes as the cloned entity.

>Keep in mind that any modifications done to entities will be saved in the referenced record only when the [`.save()`](#save) function is executed.
This function can only be used with entities already saved in the database. It cannot be called on a newly created entity (for which [`.isNew()`](#isnew) returns **True**).

Expand Down
2 changes: 1 addition & 1 deletion docs/API/IncomingMessageClass.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ title: IncomingMessage

The `4D.IncomingMessage` class allows you to handle the object received by a custom [**HTTP request handler**](../WebServer/http-request-handler.md). HTTP requests and their properties are automatically received as an instance of the `4D.IncomingMessage` class. Parameters given directly in the request with GET verb are handled by the [`.urlQuery`](#urlquery) property, while parameters passed in the body of the request are available through functions such as [`.getBlob()`](#getblob) or [`getText()`](#gettext).

The HTTP request handler can return any value (or nothing). It usually returns an instance of the [`4D.OutgoingMessage`](OutGoingMessageClass.md) class.
The HTTP request handler can return any value (or nothing). It usually returns an instance of the [`4D.OutgoingMessage`](OutgoingMessageClass.md) class.

All properties of this class are read-only. They are automatically filled by the request handler.

Expand Down
197 changes: 0 additions & 197 deletions docs/API/OutgoingMessageClass.md

This file was deleted.

4 changes: 2 additions & 2 deletions docs/Concepts/classes.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ Available classes are accessible from their class stores. Two class stores are a
<!-- REF #_command_.cs.Params -->
|Parameter|Type||Description|
|---|---|---|---|
|classStore|Object|&larr;|User class store for the project or component|<!-- END REF -->
|classStore|Object|&#8592;|User class store for the project or component|<!-- END REF -->

The `cs` command <!-- REF #_command_.cs.Summary -->returns the user class store for the current project or component<!-- END REF -->. It returns all user classes [defined](#class-definition) in the opened project or component. By default, only project [ORDA classes](ORDA/ordaClasses.md) are available.

Expand All @@ -136,7 +136,7 @@ $instance:=cs.myClass.new()
<!-- REF #_command_.4D.Params -->
|Parameter|Type||Description|
|---|---|---|---|
|classStore|Object|&larr;|4D class store|<!-- END REF -->
|classStore|Object|&#8592;|4D class store|<!-- END REF -->

The `4D` command <!-- REF #_command_.4D.Summary -->returns the class store for available built-in 4D classes<!-- END REF -->. It provides access to specific APIs such as [CryptoKey](API/CryptoKeyClass.md).

Expand Down
10 changes: 7 additions & 3 deletions docs/Debugging/basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,11 @@ The syntax error window proposes several options:

- **Continue**: Execution continues. The line with the error may be partially executed, depending on where the error is located. Continue with caution: the error may prevent the rest of your method from executing properly. We recommend clicking **Continue** only if the error is in a trivial call (such as `SET WINDOW TITLE`) that does not prevent executing and testing the rest of your code.

> Tip: To ignore an error that occurs repeatedly (for example, in loops), you can turn the **Continue** button into an **Ignore** button. Hold down **Alt** (Windows) or **Option** (macOS) key and click the **Continue** button the first time it appears. The button label changes to **Ignore** if the dialog is called again for the same error.
:::tip

To ignore an error that occurs repeatedly (for example, in loops), you can turn the **Continue** button into an **Ignore** button. Hold down **Alt** (Windows) or **Option** (macOS) key and click the **Continue** button the first time it appears. The button label changes to **Ignore** if the dialog is called again for the same error.

:::

- **Abort**: Stops method execution and returns to the state before the method started executing:

Expand All @@ -84,14 +88,14 @@ The syntax error window proposes several options:

## Debugger

A common beginner mistake in dealing with error detection is to click **Abort** in the Syntax Error Window, go back to the Code Editor, and try to figure out what's going by looking at the code. Do not do that! You will save plenty of time and energy by always using the **Debugger**.
A common beginner mistake in dealing with error detection is to click **Abort** in the Syntax Error Window, go back to the Code Editor, and try to figure out what's going by looking at the code. Do not do that! You will save plenty of time and energy by always using the [**Debugger**](debugger.md).

The Debugger allows you to step through methods slowly. It displays all the information you need in order to understand why an error occurred. Once you have this information, you know how to fix the error.

Another reason to use the Debugger is for developing code. Sometimes you may write an algorithm that is more complex than usual. Despite all feelings of accomplishment, you can't be totally sure that your coding is 100% correct. Instead of running it "blind", you can use the `TRACE` command at the beginning of your code, then execute it step by step to keep an eye on what happens.

## Breaks

In the debugging process, you may need to skip the tracing of some parts of the code until a certain line. Or, you may want to trace the code when a given expression has a certain value (e.g. "$myVar > 1000"), or every time a specific 4D command is called.
In the debugging process, you may need to skip the tracing of some parts of the code until a certain line. Or, you may want to trace the code when a given expression has a certain value (e.g. `$myVar > 1000`), or every time a specific 4D command is called.

These needs are covered by **breakpoints** and **command catching** features. They can be configured from the Code Editor, the debugger, or the Runtime Explorer.
2 changes: 1 addition & 1 deletion docs/Debugging/breakpoints.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Catching a command enables you to start tracing the execution of any process as

To create a break point, click in the left margin of the Source Code pane in the debugger or in the Code Editor.

In the following example, a break point (the red bullet) has been set, in the debugger, on the line `If ($in.dataClass#Null)`:
In the following example, a break point (the red bullet) has been set, in the debugger, on the line `If (Value type(request.reponse.headers...`:

![break-point](../assets/en/Debugging/break.png)

Expand Down
Loading

0 comments on commit c071bce

Please sign in to comment.