diff --git a/crowdin.yml b/crowdin.yml index 2f8898eda5573d..ebc1a79010dc79 100644 --- a/crowdin.yml +++ b/crowdin.yml @@ -1,7 +1,6 @@ files: - source: /docs/**/*.md translation: /website/translated_docs/%two_letters_code%/**/%original_file_name% - type: fm_md7 - source: /docs/assets/en/**/*.png translation: /docs/assets/%two_letters_code%/**/%original_file_name% - source: /website/i18n/en.json diff --git a/docs/Backup/backup.md b/docs/Backup/backup.md index 48e9d0eb97faec..abe8848dfc4793 100644 --- a/docs/Backup/backup.md +++ b/docs/Backup/backup.md @@ -66,8 +66,7 @@ Conversely, if only the data file is being backed up, access to the structure is It may happen that a backup is not executed properly. There may be several causes of a failed backup: user interruption, attached file not found, destination disk problems, incomplete transaction, etc. 4D processes the incident according to the cause. -In all cases, keep in mind that the status of the last backup (successful or failed) is stored in the Last Backup Information area of the [Backup page in the MSC](MSC/backup.md) or in the **Maintenance page** of 4D Server, as well as in the database **Backup journal.txt**. - displayed in the Last Backup Information area of the Backup page in the MSC or in GRAPH SETTINGS of 4D Server, as well as in the Backup journal of the database. +In all cases, keep in mind that the status of the last backup (successful or failed) is stored in the Last Backup Information area of the [Backup page in the MSC](MSC/backup.md) or in the **Maintenance page** of 4D Server, as well as in the database **Backup journal.txt**. - **User interruption**: The **Stop** button in the progress dialog box allows users to interrupt the backup at any time. In this case, the copying of elements is stopped and the error 1406 is generated. You can intercept this error in the `On Backup Shutdown` database method. - **Attached file not found**: When an attached file cannot be found, 4D performs a partial backup (backup of database files and accessible attached files) and returns an error. diff --git a/docs/Backup/settings.md b/docs/Backup/settings.md index f21abad4939814..4e3eca07e79b12 100644 --- a/docs/Backup/settings.md +++ b/docs/Backup/settings.md @@ -33,6 +33,9 @@ The options found on this tab let you set and configure scheduled automatic back - **Every X day(s) at x**: Allows programming backups on a daily basis. For example, enter 1 if you want to perform a daily backup. When this option is checked, you must enter the time when the backup should start. - **Every X week(s) day at x**: Allows programming backups on a weekly basis. Enter 1 if you want to perform a weekly backup. When this option is checked, you must enter the day(s) of the week and the time when the backup should start. You can select several days of the week, if desired. For example, you can use this option to set two weekly backups: one on Wednesday and one on Friday. - **Every X month(s), Xth Day at x**: Allows programming backups on a monthly basis. Enter 1 if you want to perform a monthly backup. When this option is checked, you must indicate the day of the month and the time when the backup should start. + +> Switches back and forth from Standard time to Daylight saving time could temporarily affect the automatic scheduler and trigger the next backup with a one-hour time shift. This happens only once and subsequent backups are run at the expected scheduled time. + ## Configuration @@ -108,7 +111,7 @@ The **Segment Size** menu is a combo box that allows you to set the size in MB f By default, 4D compresses backups to help save disk space. However, the file compression phase can noticeably slow down backups when dealing with large volumes of data. The **Compression Rate** option allows you to adjust file compression: - **None:** No file compression is applied. The backup is faster but the archive files are considerably larger. - **Fast** (default): This option is a compromise between backup speed and archive size. -- **Compact**: The maximum compression rate is applied to archives. The archive files take up the least amount of space possible on the disk, but the backup is noticeable slowed. + - **Compact**: The maximum compression rate is applied to archives. The archive files take up the least amount of space possible on the disk, but the backup is noticeable slowed. - **Interlacing Rate and Redundancy Rate** 4D generates archives using specific algorithms that are based on optimization (interlacing) and security (redundancy) mechanisms. You can set these mechanisms according to your needs. The menus for these options contain rates of **Low**, **Medium**, **High** and **None** (default). diff --git a/docs/Concepts/dt_blob.md b/docs/Concepts/dt_blob.md index da69f49ef02675..f67ebd9ff15d81 100644 --- a/docs/Concepts/dt_blob.md +++ b/docs/Concepts/dt_blob.md @@ -3,7 +3,10 @@ id: blob title: BLOB --- -- A BLOB (Binary Large OBjects) field, variable or expression is a contiguous series of bytes which can be treated as one whole object or whose bytes can be addressed individually. A BLOB can be empty (null length) or can contain up to 2147483647 bytes (2 GB). +- A BLOB (Binary Large OBjects) field, variable or expression is a contiguous series of bytes which can be treated as one whole object or whose bytes can be addressed individually. A BLOB can be empty (null length) or contain up to 2147483647 bytes (2 GB). + +> By default, 4D sets the maximum blob size to 2GB, but this size limit may be lower depending on your OS and how much space is available. + - A BLOB is loaded into memory in its entirety. A BLOB variable is held and exists in memory only. A BLOB field is loaded into memory from the disk, like the rest of the record to which it belongs. - Like the other field types that can retain a large amount of data (such as the Picture field type), BLOB fields are not duplicated in memory when you modify a record. Consequently, the result returned by the `Old` and `Modified` commands is not significant when applied to a BLOB field. diff --git a/docs/Concepts/dt_number.md b/docs/Concepts/dt_number.md index e9e381bf9fb8c4..71b17761c1deb7 100644 --- a/docs/Concepts/dt_number.md +++ b/docs/Concepts/dt_number.md @@ -140,7 +140,7 @@ The following table lists the bitwise operators and their effects: |---|---|---| |Bitwise AND|0x0000FFFF & 0xFF00FF00|0x0000FF00| |Bitwise OR (inclusive)|0x0000FFFF | 0xFF00FF00| 0xFF00FFFF -|Bitwise OR (exclusive)|0x0000FFFF \^| 0xFF00FF00 0xFF0000FF| +|Bitwise OR (exclusive)|0x0000FFFF \^| 0xFF00FF00| 0xFF0000FF| |Left Bit Shift|0x0000FFFF << 8|0x00FFFF00| |Right Bit Shift|0x0000FFFF >> 8|0x000000FF| |Bit Set|0x00000000 ?+ 16|0x00010000| diff --git a/docs/Concepts/dt_object.md b/docs/Concepts/dt_object.md index b53da237f06afa..b1841ef5bcd4d0 100644 --- a/docs/Concepts/dt_object.md +++ b/docs/Concepts/dt_object.md @@ -47,6 +47,8 @@ You can create two types of objects: - regular (non-shared) objects, using the `New object` command. These objects can be edited without any specific access control but cannot be shared between processes. - shared objects, using the `New shared object` command. These objects can be shared between processes, including preemptive threads. Access to these objects is controlled by `Use...End use` structures. For more information, refer to the [Shared objects and collections](Concepts/shared.md) section. + + ## Syntax basics Object notation can be used to access object property values through a chain of tokens. @@ -220,7 +222,7 @@ When expressions of a given type are expected in your 4D code, you can make sure ## Object property identifiers -Token member names (i.e., object property names accessed using the object notation) are more restrictive than standard 4D object names. They must comply with JavaScript Identifier Grammar (see ECMA Script standard): +Token member names (i.e., object property names accessed using the object notation) are more restrictive than standard 4D object names. They must comply with JavaScript Identifier Grammar (see [ECMA Script standard](https://www.ecma-international.org/ecma-262/5.1/#sec-7.6)): - the first character must be a letter, an underscore (_), or a dollar sign ($), - subsequent characters may be any letter, digit, an underscore or dollar sign (space characters are NOT allowed), diff --git a/docs/Concepts/dt_string.md b/docs/Concepts/dt_string.md index 043d918719485c..17b7f46562e440 100644 --- a/docs/Concepts/dt_string.md +++ b/docs/Concepts/dt_string.md @@ -139,7 +139,7 @@ Unlike other string comparisons, searching by keywords looks for "words" in "tex ``` >**Notes:** ->- 4D uses the ICU library for comparing strings (using <>=# operators) and detecting keywords. For more information about the rules implemented, please refer to the following address: http://www.unicode.org/unicode/reports/tr29/#Word_Boundaries. +>- 4D uses the ICU library for comparing strings (using <>=# operators) and detecting keywords. For more information about the rules implemented, please refer to the following address: http://www.unicode.org/reports/tr29/#Word_Boundaries. >- In the Japanese version, instead of ICU, 4D uses Mecab by default for detecting keywords. ## Character Reference Symbols diff --git a/docs/Concepts/error-handling.md b/docs/Concepts/error-handling.md index a09a55ba8a8160..b12bbc1e331779 100644 --- a/docs/Concepts/error-handling.md +++ b/docs/Concepts/error-handling.md @@ -49,16 +49,15 @@ The `Method called on error` command allows to know the name of the method inst Within the custom error method, you have access to several information that will help you identifying the error: -- dedicated system variables(*): +- 4D automatically maintains a number of variables called **system variables**, meeting different needs (see the *4D Language Reference manual*): - `Error` (longint): error code - `Error method` (text): name of the method that triggered the error - `Error line` (longint): line number in the method that triggered the error - `Error formula` (text): formula of the 4D code (raw text) which is at the origin of the error. -(*) 4D automatically maintains a number of variables called **system variables**, meeting different needs. See the *4D Language Reference manual*. - - the `GET LAST ERROR STACK` command that returns information about the current stack of errors of the 4D application. +- the `Get call chain` command that returns a collection of objects describing each step of the method call chain within the current process. #### Example diff --git a/docs/Concepts/identifiers.md b/docs/Concepts/identifiers.md index 227d850b3277e3..c92f012638aa5e 100644 --- a/docs/Concepts/identifiers.md +++ b/docs/Concepts/identifiers.md @@ -6,9 +6,10 @@ This section describes the conventions and rules for naming various elements in ## Basic Rules + The following rules apply for all 4D frameworks. -- A name can begin with an alphabetic character, an underscore, or a dollar ("$") (note that a dollar sign can denote a local element, see below). +- A name must begin with an alphabetic character, an underscore, or a dollar ("$") (note that a dollar sign can denote a local element, see below). - Thereafter, the name can include alphabetic characters, numeric characters, the space character, and the underscore character ("_"). - Periods (".") and brackets ("[ ]") are not allowed in table, field, method, or variable names. - Commas, slashes, quotation marks, and colons are not allowed. diff --git a/docs/Concepts/parameters.md b/docs/Concepts/parameters.md index 1c19dc85b0c557..3d2efc513c83bc 100644 --- a/docs/Concepts/parameters.md +++ b/docs/Concepts/parameters.md @@ -154,7 +154,7 @@ C_TEXT($1;$2;$3;$4;$5;$6) The $0 parameter (Longint), which is the result of a trigger, will be typed by the compiler if the parameter has not been explicitly declared. Nevertheless, if you want to declare it, you must do so in the trigger itself. - Form objects that accept the `On Drag Over` form event -The $0 parameter (Longint), which is the result of the `On Drag Over` form event, is typed by the compiler if the parameter has not been explicitly declared. Nevertheless, if you want to decalre it, you must do so in the object method. +The $0 parameter (Longint), which is the result of the `On Drag Over` form event, is typed by the compiler if the parameter has not been explicitly declared. Nevertheless, if you want to declare it, you must do so in the object method. **Note:** The compiler does not initialize the $0 parameter. So, as soon as you use the `On Drag Over` form event, you must initialize $0. For example: ```4d C_LONGINT($0) diff --git a/docs/Concepts/quick-tour.md b/docs/Concepts/quick-tour.md index 01f0a99b46727c..a201d3b7871362 100644 --- a/docs/Concepts/quick-tour.md +++ b/docs/Concepts/quick-tour.md @@ -251,7 +251,7 @@ You refer to an expression by the data type it returns. There are several expres ### Assignable vs non-assignable expressions An expression can simply be a literal constant, such as the number 4 or the string "Hello", or a variable like `$myButton`. It can also use operators. For example, 4 + 2 is an expression that uses the addition operator to add two numbers together and return the result 6. In any cases, these expressions are **non-assignable**, which means that you cannot assign a value to them. -In 4D, expressions can be **assignable**. An expression is assignable when it can be used on the right side of an assignation. For example: +In 4D, expressions can be **assignable**. An expression is assignable when it can be used on the left side of an assignation. For example: ```4d //$myVar variable is assignable, you can write: diff --git a/docs/FormObjects/checkbox_overview.md b/docs/FormObjects/checkbox_overview.md index c3f90f967e26c9..77e1657a2377f3 100644 --- a/docs/FormObjects/checkbox_overview.md +++ b/docs/FormObjects/checkbox_overview.md @@ -21,7 +21,7 @@ A check box can be associated to a [variable or expression](properties_Object.md - **integer:** if the box is checked, the variable has the value 1. When not checked, it has the value 0. If check box is in third state (see below), it has the value 2. - **boolean:** if the box is checked, the variable has the value `True`. When not checked, it has the value `False`. -Any or all check boxes in a form can be checked or unchecked. A group of check boxes allows the user to select multiple options. +Any or all check boxes in a form can be checked or unchecked. Multiple check boxes allow the user to select multiple options. ### Three-States check box diff --git a/docs/FormObjects/listbox_overview.md b/docs/FormObjects/listbox_overview.md index 50208192c6c083..2e6908a73025dc 100644 --- a/docs/FormObjects/listbox_overview.md +++ b/docs/FormObjects/listbox_overview.md @@ -73,7 +73,7 @@ The 4D Language includes a dedicated "List Box" theme for list box commands, but In an array list box, each column must be associated with a one-dimensional 4D array; all array types can be used, with the exception of pointer arrays. The number of rows is based on the number of array elements. -By default, 4D assigns the name “ColumnX” to each column variable, and thus to each associated array. You can change it, as well as other column properties, in the [column properties](listbox_overview.md#column-specific-properties). The display format for each column can also be defined using the `OBJECT SET FORMAT` command +By default, 4D assigns the name "ColumnX" to each column. You can change it, as well as other column properties, in the [column properties](listbox_overview.md#column-specific-properties). The display format for each column can also be defined using the `OBJECT SET FORMAT` command. >Array type list boxes can be displayed in [hierarchical mode](listbox_overview.md#hierarchical-list-boxes), with specific mechanisms. @@ -81,13 +81,13 @@ With array type list box, the values entered or displayed are managed using the The values of columns are managed using high-level List box commands (such as `LISTBOX INSERT ROWS` or `LISTBOX DELETE ROWS`) as well as array manipulation commands. For example, to initialize the contents of a column, you can use the following instruction: ```4d -ARRAY TEXT(ColumnName;size) +ARRAY TEXT(varCol;size) ``` You can also use a list: ```4d -LIST TO ARRAY("ListName";ColumnName) +LIST TO ARRAY("ListName";varCol) ``` >**Warning**: When a list box contains several columns of different sizes, only the number of items of the smallest array (column) will be displayed. You should make sure that each array has the same number of elements as the others. Also, if a list box column is empty (this occurs when the associated array was not correctly declared or sized using the language), the list box displays nothing. @@ -231,6 +231,7 @@ When headers are displayed, you can select a header in the Form editor by clicki You can set standard text properties for each column header of the list box; in this case, these properties have priority over those of the column or of the list box itself. + In addition, you have access to the specific properties for headers. Specifically, an icon can be displayed in the header next to or in place of the column title, for example when performing [customized sorts](#managing-sorts). ![](assets/en/FormObjects/lbHeaderIcon.png) diff --git a/docs/FormObjects/properties_Action.md b/docs/FormObjects/properties_Action.md index b697cd30e2cda2..5892816cc7fb72 100644 --- a/docs/FormObjects/properties_Action.md +++ b/docs/FormObjects/properties_Action.md @@ -102,7 +102,7 @@ Several types of method references are supported: In this case, 4D does not provide automatic support for object operations. - a custom method file path including the .4dm extension, e.g.: -`ObjectMethods/objectName.4dm` +`../../CustomMethods/myMethod.4dm` You can also use a filesystem: `/RESOURCES/Buttons/bOK.4dm` In this case, 4D does not provide automatic support for object operations. diff --git a/docs/FormObjects/properties_Display.md b/docs/FormObjects/properties_Display.md index 943981f5ffae26..f88f12c290131a 100644 --- a/docs/FormObjects/properties_Display.md +++ b/docs/FormObjects/properties_Display.md @@ -543,21 +543,33 @@ The Truncate with ellipsis property can be applied to Boolean type columns; howe --- ## Visibility -This property allows hiding by default the object in the Application environment. +This property allows hiding the object in the Application environment. -You can handle the Visible property for most form objects. This property simplifies dynamic interface development. In this context, it is often necessary to hide objects programatically during the `On load` event of the form then to display certain objects afterwards. The Visible property allows inverting this logic by making certain objects invisible by default. The developer can then program their display using the `OBJECT SET VISIBLE` command depending on the context. +You can handle the Visibility property for most form objects. This property is mainly used to simplify dynamic interface development. In this context, it is often necessary to hide objects programatically during the `On load` event of the form then to display certain objects afterwards. The Visibility property allows inverting this logic by making certain objects invisible by default. The developer can then program their display using the [`OBJECT SET VISIBLE`](https://doc.4d.com/4dv18/help/command/en/page603.html) command when needed. +#### Automatic visibility in list forms + +In the context of ["list" forms](FormEditor/properties_FormProperties.md#form-type), the Visibility property supports two specific values: + +- **If record selected** (JSON name: "selectedRows") +- **If record not selected** (JSON name: "unselectedRows") + +This property is only used when drawing objects located in the body of a list form. It tells 4D whether or not to draw the object depending on whether the record being processed is selected/not selected. It allows you to represent a selection of records using visual attributes other than highlight colors: + +![](assets/en/FormObjects/select-row.png) + +4D does not take this property into account if the object was hidden using the [`OBJECT SET VISIBLE`](https://doc.4d.com/4dv18/help/command/en/page603.html) command; in this case, the object remains invisible regardless of whether or not the record is selected. #### JSON Grammar |Name|Data Type|Possible Values| |---|---|---| -|visibility|string|"visible", "hidden"| +|visibility|string|"visible", "hidden", "selectedRows" (list form only), "unselectedRows" (list form only)| #### Objects Supported -[4D View Pro area](viewProArea_overview) - [4D Write Pro area](writeProArea_overview) - [Button](button_overview.md) - [Button Grid](buttonGrid_overview.md) - [Check Box](checkbox_overview.md) - [Combo Box](comboBox_overview.md) - [Drop-down List](dropdownList_Overview.md) - [Group Box](groupBox.md) - [Hierarchical List](list_overview.md) - [List Box](listbox_overview.md) - [List Box Column](listbox_overview.md#list-box-columns) - [List Box Footer](listbox_overview.md#list-box-footers) - [List Box Header](listbox_overview.md#list-box-headers) - [Picture Button](pictureButton_overview.md) - [Picture Pop-up Menu](picturePopupMenu_overview.md) - [Plug-in Area](pluginArea_overview.md) - [Progress indicator](progressIndicator.md) - [Radio Button](radio_overview.md) - [Spinner](spinner.md) - [Splitter](splitters.md) - [Static Picture](staticPicture.md) - [Stepper](stepper.md) - [Subform](subform_overview.md) - [Tab control](tabControl.md) - [Text Area](text.md) - [Web Area](webArea_overview.md) +[4D View Pro area](viewProArea_overview.md) - [4D Write Pro area](writeProArea_overview.md) - [Button](button_overview.md) - [Button Grid](buttonGrid_overview.md) - [Check Box](checkbox_overview.md) - [Combo Box](comboBox_overview.md) - [Drop-down List](dropdownList_Overview.md) - [Group Box](groupBox.md) - [Hierarchical List](list_overview.md) - [List Box](listbox_overview.md) - [List Box Column](listbox_overview.md#list-box-columns) - [List Box Footer](listbox_overview.md#list-box-footers) - [List Box Header](listbox_overview.md#list-box-headers) - [Picture Button](pictureButton_overview.md) - [Picture Pop-up Menu](picturePopupMenu_overview.md) - [Plug-in Area](pluginArea_overview.md) - [Progress indicator](progressIndicator.md) - [Radio Button](radio_overview.md) - [Spinner](spinner.md) - [Splitter](splitters.md) - [Static Picture](staticPicture.md) - [Stepper](stepper.md) - [Subform](subform_overview.md) - [Tab control](tabControl.md) - [Text Area](text.md) - [Web Area](webArea_overview.md) diff --git a/docs/FormObjects/properties_Object.md b/docs/FormObjects/properties_Object.md index f1bfe600a781a4..97ae905a0d532a 100644 --- a/docs/FormObjects/properties_Object.md +++ b/docs/FormObjects/properties_Object.md @@ -103,9 +103,9 @@ There are two advantages with this mechanism: - 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. -### Hierarchical List Box +### Array List Box -Using a string array (collection of arrays names) as *dataSource* value for a list box column defines a [hierarchical list box](listbox_overview.md#hierarchical-list-boxes). +For an array list box, the **Variable or Expression** property usually holds the name of the array variable defined for the list box, and for each column. However, you can use a string array (containing arrays names) as *dataSource* value for a list box column to define a [hierarchical list box](listbox_overview.md#hierarchical-list-boxes). diff --git a/docs/FormObjects/properties_Reference.md b/docs/FormObjects/properties_Reference.md index de7171007027f5..66805512716c16 100644 --- a/docs/FormObjects/properties_Reference.md +++ b/docs/FormObjects/properties_Reference.md @@ -34,7 +34,7 @@ You will find in this page a comprehensive list of all object properties sorted |Property|Description|Possible Values| |---|---|---| -|**a**||| +|**a**||| |[action](properties_Action.md#standard-action)|Typical activity to be performed. |The name of a valid standard action. | |[allowFontColorPicker](properties_Text.md#allow-font-color-picker)|Allows displaying system font picker or color picker to edit object attributes|true, false (default)| |[alternateFill](properties_BackgroundAndBorder.md#alternate-background-color)|Allows setting a different background color for odd-numbered rows/columns in a list box.|Any CSS value; "transparent"; "automatic"| @@ -76,7 +76,7 @@ You will find in this page a comprehensive list of all object properties sorted |**e**||| |[enterable](properties_Entry.md#enterable)|Indicates whether users can enter values into the object.|true, false| |[enterableInList](properties_Subform.md#enterable-in-list)|Indicates whether users can modify record data directly in the list subform.|true, false| -[entryFiler](properties_Entry.md#entry-filter)|Associates an entry filter with the object or column cells. This property is not accessible if the Enterable property is not enabled.|Text to narrow entries | +|[entryFiler](properties_Entry.md#entry-filter)|Associates an entry filter with the object or column cells. This property is not accessible if the Enterable property is not enabled.|Text to narrow entries| |[events](https://doc.4d.com/4Dv18/4D/18/Form-Events.302-4504424.en.html)|List of all events selected for the object or form|Collection of event names, e.g. ["onClick","onDataChange"...].| |[excludedList](properties_RangeOfValues.md#excluded-list)|Allows setting a list whose values cannot be entered in the column.|A list of values to be excluded.| |**f**||| @@ -92,7 +92,7 @@ You will find in this page a comprehensive list of all object properties sorted |**g**||| |[graduationStep](properties_Scale.md#graduation-step)| Scale display measurement.|minimum: 0| |**h**||| -|[header](properties_Headers.md#header)|Defines the header of a list box column|Object with properties "text", "name", "icon", "dataSource", "fontWeight", "fontStyle", "tooltip" | +|[header](properties_Headers.md#headers)|Defines the header of a list box column|Object with properties "text", "name", "icon", "dataSource", "fontWeight", "fontStyle", "tooltip" | |[headerHeight](properties_Headers.md#height)|Used to set the row height |pattern ^(\\d+)(px|em)?$ (positive decimal + px/em )| |[height](properties_CoordinatesAndSizing.md#height)|Designates an object's vertical size|minimum: 0| |[hideExtraBlankRows](properties_BackgroundAndBorder.md#hide-extra-blank-rows)|Deactivates the visibility of extra, empty rows. |true, false| @@ -164,7 +164,7 @@ You will find in this page a comprehensive list of all object properties sorted |[shortcutControl](properties_Entry.md#shortcut)|Designates the Control key (Windows)|true, false| |[shortcutKey](properties_Entry.md#shortcut)|The letter or name of a special meaning key.|"[F1]" -> "[F15]", "[Return]", "[Enter]", "[Backspace]", "[Tab]", "[Esc]", "[Del]", "[Home]", "[End]", "[Help]", "[Page up]", "[Page down]", "[left arrow]", "[right arrow]", "[up arrow]", "[down arrow]"| |[shortcutShift](properties_Entry.md#shortcut) |Designates the Shift key |true, false| -|[showFooters](properties_Footers.md#display-headers)|Displays or hides column footers. |true, false| +|[showFooters](properties_Footers.md#display-footers)|Displays or hides column footers. |true, false| |[showGraduations](properties_Scale.md#display-graduation)|Displays/Hides the graduations next to the labels. |true, false| |[showHeaders](properties_Headers.md#display-headers)|Displays or hides column headers. |true, false| |[showHiddenChars](properties_Appearance.md#show-hidden-characters)|Displays/hides invisible characters.|true, false| @@ -187,8 +187,8 @@ You will find in this page a comprehensive list of all object properties sorted |[stroke](properties_Text.md#font-color) (text)
[stroke](properties_BackgroundAndBorder.md#line-color) (lines)
[stroke](properties_BackgroundAndBorder.md#transparent) (list box)|Specifies the color of the font or line used in the object. |Any CSS value, "transparent", "automatic"| |[strokeDashArray](properties_BackgroundAndBorder.md#dotted-line-type)|Describes dotted line type as a sequence of black and white points|Number array or string| |[strokeWidth](properties_BackgroundAndBorder.md#line-width) |Designates the thickness of a line.|An integer or 0 for smallest width on a printed form| -|[style](properties_TextAndPicture.md#multi-style)|Enables the possibility of using specific styles in the selected area.|true, false| -|[styledText](properties_Text.md#style)|Allows setting the general appearance of the button. See Button Style for more information.|"regular", "flat", "toolbar", "bevel", "roundedBevel", "gradientBevel", "texturedBevel", "office", "help", "circular", "disclosure", "roundedDisclosure", "custom"| +|[style](properties_TextAndPicture.md#multi-style)|Allows setting the general appearance of the button. See Button Style for more information.|"regular", "flat", "toolbar", "bevel", "roundedBevel", "gradientBevel", "texturedBevel", "office", "help", "circular", "disclosure", "roundedDisclosure", "custom"| +|[styledText](properties_Text.md#style)|Enables the possibility of using specific styles in the selected area.|true, false| |[switchBackWhenReleased](properties_Animation.md#switch-back-when-released)|Displays the first picture all the time except when the user clicks the button. Displays the second picture until the mouse button is released.|true, false| |[switchContinuously](properties_Animation.md#switch-continuously-on-clicks)|Allows the user to hold down the mouse button to display the pictures continuously (i.e., as an animation).|true, false| |[switchWhenRollover](properties_Animation.md#switch-when-roll-over)|Modifies the contents of the picture button when the mouse cursor passes over it. The initial picture is displayed when the cursor leaves the button’s area.|true, false| diff --git a/docs/FormObjects/properties_Subform.md b/docs/FormObjects/properties_Subform.md index 11e76cc5a95eac..64fc7052b41632 100644 --- a/docs/FormObjects/properties_Subform.md +++ b/docs/FormObjects/properties_Subform.md @@ -115,12 +115,10 @@ When a list subform has this property enabled, the user can modify record data d --- ## List Form -You use this property to declare the list form to use in the subform. A list subform lets you enter, view, and modify data in other tables. +You use this property to declare the list form to use in the subform. A list subform lets you enter, view, and modify data in other tables. List subforms can be used for data entry in two ways: the user can enter data directly in the subform, or enter it in an [input form](#detail-form). In this configuration, the form used as the subform is referred to as the List form. The input form is referred to as the Detail form. -You can also allow the user to enter data in the List form. - #### JSON Grammar |Name|Data Type|Possible Values| diff --git a/docs/FormObjects/properties_Text.md b/docs/FormObjects/properties_Text.md index 0897138e728aff..c9cfec831da7dc 100644 --- a/docs/FormObjects/properties_Text.md +++ b/docs/FormObjects/properties_Text.md @@ -278,7 +278,7 @@ Horizontal location of text within the area that contains it. #### Objects Supported -[Group Box](groupBox.md) - [List Box](listbox_overview.md#overview) - [List Box Column](listbox_overview.md#list-box-columns) - [List Box Header](listbox_overview.md#list-box-headers) - [List Box Header](listbox_overview.md#list-box-footers) - [Text Area](text.md) +[Group Box](groupBox.md) - [List Box](listbox_overview.md#overview) - [List Box Column](listbox_overview.md#list-box-columns) - [List Box Header](listbox_overview.md#list-box-headers) - [List Box Footer](listbox_overview.md#list-box-footers) - [Text Area](text.md) --- @@ -330,25 +330,15 @@ Specifies an expression or a variable which will be evaluated for each row displ > Style settings made with this property are ignored if other style settings are already defined through expressions (*i.e.*, [Style Expression](#style-expression), [Font Color Expression](#font-color-expression), [Background Color Expression](#background-color-expression)). -The following example uses the *Color* project method. +**Example** -In the form method, write the following code: - -```4d -//form method -Case of - :(Form event=On Load) - Form.meta:=New object -End case -``` - - -In the *Color* method, write the following code: +In the *Color* project method, write the following code: ```4d //Color method //Sets font color for certain rows and the background color for a specific column: C_OBJECT($0) +Form.meta:=New object If(This.ID>5) //ID is an attribute of collection objects/entities Form.meta.stroke:="purple" Form.meta.cell:=New object("Column2";New object("fill";"black")) @@ -358,7 +348,29 @@ End if $0:=Form.meta ``` ->See also the [This](https://doc.4d.com/4Dv17R6/4D/17-R6/This.301-4310806.en.html) command. +**Best Practice:** For optimization reasons, it would be recommended in this case to create the `meta.cell` object once in the form method: + +```4d + //form method + Case of + :(Form event code=On Load) + Form.colStyle:=New object("Column2";New object("fill";"black")) + End case +``` + +Then, the *Color* method would contain: + +```4d + //Color method + ... + If(This.ID>5) + Form.meta.stroke:="purple" + Form.meta.cell:=Form.colStyle //reuse the same object for better performance + ... +``` + + +>See also the [This](https://doc.4d.com/4Dv18/4D/18/This.301-4504875.en.html) command. @@ -382,7 +394,7 @@ $0:=Form.meta --- ## Multi-style -This property enables the possibility of using specific styles in the selected area. When this option is checked, 4D interprets any \ HTML tags found in the area. +This property enables the possibility of using specific styles in the selected area. When this option is checked, 4D interprets any ` HTML` tags found in the area. By default, this option is not enabled. diff --git a/docs/FormObjects/properties_WebArea.md b/docs/FormObjects/properties_WebArea.md index 72f65ca272a11e..0a45bd52d1a49c 100644 --- a/docs/FormObjects/properties_WebArea.md +++ b/docs/FormObjects/properties_WebArea.md @@ -85,13 +85,13 @@ This option allows choosing between two rendering engines for the Web area, depe This means that you automatically benefit from the latest advances in Web rendering, through HTML5 or JavaScript. However, you may notice some rendering differences between Internet Explorer/Edge implementations and Web Kit ones. * **checked** - `JSON value: embedded`: In this case, 4D uses Blink engine from Google. Using the embedded Web engine means that Web area rendering and their functioning in your application are identical regardless of the platform used to run 4D (slight variations of pixels or differences related to network implementation may nevertheless be observed). When this option is chosen, you no longer benefit from automatic updates of the Web engine performed by the operating system; however, new versions of the engines are provided through 4D. - Note that the Blink engine has the following limitations: - * [WA SET PAGE CONTENT](https://doc.4d.com/4Dv17R6/4D/17-R6/WA-SET-PAGE-CONTENT.301-4310783.en.html): using this command requires that at least one page is already loaded in the area (through a call to [WA OPEN URL](https://doc.4d.com/4Dv17R6/4D/17-R6/WA-OPEN-URL.301-4310772.en.html) or an assignment to the URL variable associated to the area). - * Execution of Java applets, JavaScripts and plug-ins is always enabled and cannot be disabled in Web areas in Blink. The following selectors of the [WA SET PREFERENCE](https://doc.4d.com/4Dv17R6/4D/17-R6/WA-SET-PREFERENCE.301-4310780.en.html) and [WA GET PREFERENCE](https://doc.4d.com/4Dv17R6/4D/17-R6/WA-GET-PREFERENCE.301-4310763.en.html) commands are ignored: +Note that the Blink engine has the following limitations: + * [WA SET PAGE CONTENT](https://doc.4d.com/4Dv18/4D/18.4/WA-SET-PAGE-CONTENT.301-5232965.en.html): using this command requires that at least one page is already loaded in the area (through a call to [WA OPEN URL](https://doc.4d.com/4Dv18/4D/18.4/WA-OPEN-URL.301-5232954.en.html) or an assignment to the URL variable associated to the area). + * Execution of JavaScript is always enabled; execution of Java applets and plug-ins is always disabled. These settings cannot be modified in Blink. The following selectors of the [WA SET PREFERENCE](https://doc.4d.com/4Dv18/4D/18.4/WA-SET-PREFERENCE.301-5232962.en.html) and [WA GET PREFERENCE](https://doc.4d.com/4Dv18/4D/18.4/WA-GET-PREFERENCE.301-5232945.en.html) commands are ignored: * `WA enable Java applets` * `WA enable JavaScript` * `WA enable plugins` - * When URL drops are enabled by the `WA enable URL drop` selector of the [WA SET PREFERENCE](https://doc.4d.com/4Dv17R6/4D/17-R6/WA-SET-PREFERENCE.301-4310780.en.html) command, the first drop must be preceded by at least one call to [WA OPEN URL](https://doc.4d.com/4Dv17R6/4D/17-R6/WA-OPEN-URL.301-4310772.en.html) or one assignment to the URL variable associated to the area. + * When URL drops are enabled by the `WA enable URL drop` selector of the [WA SET PREFERENCE](https://doc.4d.com/4Dv18/4D/18.4/WA-SET-PREFERENCE.301-5232962.en.html) command, the first drop must be preceded by at least one call to [WA OPEN URL](https://doc.4d.com/4Dv18/4D/18.4/WA-OPEN-URL.301-5232954.en.html) or one assignment to the URL variable associated to the area. #### JSON Grammar diff --git a/docs/FormObjects/tabControl.md b/docs/FormObjects/tabControl.md index ca7d1f341ee7b8..55bfdd5b6dde8b 100644 --- a/docs/FormObjects/tabControl.md +++ b/docs/FormObjects/tabControl.md @@ -91,4 +91,4 @@ For example, if the user selects the 3rd tab, 4D will display the third page of ## Supported Properties -[Bold](properties_Text.md#bold) - [Bottom](properties_CoordinatesAndSizing.md#bottom) - [Choice List](properties_DataSource.md#choice-list-static-list) - [Class](properties_Object.md#css-class) - [Expression Type](properties_Object.md#expression-type) - [Font](properties_Text.md#font) - [Height](properties_CoordinatesAndSizing.md#height) - [Help Tip](properties_Help.md#help-tip) - [Horizontal Sizing](properties_ResizingOptions.md#horizontal-sizing) - [Italic](properties_Text.md#italic) - [Left](properties_CoordinatesAndSizing.md#left) - [Object Name](properties_Object.md#object-name) - [Pusher](properties_ResizingOptions.md#pusher) - [Right](properties_CoordinatesAndSizing.md#right) - [Standard action](properties_Action.md#standard-action) - [Tab Control Direction](properties_Appearance.md#tab-control-direction) - [Top](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [Underline](properties_Text.md#underline) - [Vertical Sizing](properties_ResizingOptions.md#vertical-sizing) - [Variable or Expression](properties_Object.md#variable-or-expression) - [Visibility](properties_Display.md#visibility) - [Width](properties_CoordinatesAndSizing.md#width) +[Bold](properties_Text.md#bold) - [Bottom](properties_CoordinatesAndSizing.md#bottom) - [Choice List](properties_DataSource.md#choice-list-static-list) - [Class](properties_Object.md#css-class) - [Expression Type](properties_Object.md#expression-type) - [Font](properties_Text.md#font) - [Font Size](properties_Text.md#font-size) - [Height](properties_CoordinatesAndSizing.md#height) - [Help Tip](properties_Help.md#help-tip) - [Horizontal Sizing](properties_ResizingOptions.md#horizontal-sizing) - [Italic](properties_Text.md#italic) - [Left](properties_CoordinatesAndSizing.md#left) - [Object Name](properties_Object.md#object-name) - [Right](properties_CoordinatesAndSizing.md#right) - [Standard action](properties_Action.md#standard-action) - [Tab Control Direction](properties_Appearance.md#tab-control-direction) - [Top](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [Underline](properties_Text.md#underline) - [Vertical Sizing](properties_ResizingOptions.md#vertical-sizing) - [Variable or Expression](properties_Object.md#variable-or-expression) - [Visibility](properties_Display.md#visibility) - [Width](properties_CoordinatesAndSizing.md#width) diff --git a/docs/GettingStarted/Installation.md b/docs/GettingStarted/Installation.md new file mode 100644 index 00000000000000..d6065194066157 --- /dev/null +++ b/docs/GettingStarted/Installation.md @@ -0,0 +1,183 @@ +--- +id: installation +title: Installation and activation +--- + +Welcome to 4D! You will find below all necessary information about how to install and register your 4D application. + + +## Required configuration + +Refer to the [product download page](https://us.4d.com/product-download) on the 4D web site for minimum Mac / Windows configuration for your 4D series. + +All the details are available on the [Resources page](https://us.4d.com/resources/feature-release) of the 4D Web site. + + +## Installation on disk + +4D products are installed from the 4D Web site: + +1. Using your browser, connect to the 4D Web site and go to the [Downloads](https://us.4d.com/product-download/Feature-Release) page. +2. Click on the download link that corresponds to your product and follow the instructions displayed on screen. + + +## Activation of a product + +Once installed on your disk, you must activate your 4D products in order to be able to use them. You also need to activate any additional licenses you obtain. + +No activation is required for the following uses: + +- 4D used in remote mode (connection to a 4D Server) +- 4D used in local mode with an interpreted database with no access to the Design environment. + +**Important:** You must have an Internet connection and an e-mail account in order to activate your products. + +### Activate 4D + +1. Launch the 4D application. +2. Select the **License Manager...** command from the **Help** menu. + +![](assets/en/getStart/helpMenu.png) + +The **License Manager** dialog box is displayed (Instant Activation page is selected by default). See the following section. + +> When you open/create a local interpreted application with 4D Developer Edition, an auto-activation mechanism is implemented. In this case, a dialog box informs you that you are going to be connected to our customer database and that your licenses will be activated (you will need to enter the password for your 4D account). + +### Activate 4D Server + +1. Launch the 4D Server application. +The dialog box for choosing the [activation mode](#activation-mode) appears. + +![](assets/en/getStart/helpMenu.png) + + +## 4D Activation mode + +4D offers three activation modes. We recommend **Instant Activation**. + +### Instant Activation + +Enter your user ID (email or 4D account) as well as your password. If you do not have an existing user account, you will need to create it at the following address: + +[https://account.4d.com/us/login.shtml](https://account.4d.com/us/login.shtml) + +![](assets/en/getStart/activ1.png) + +Then enter the license number of the product you want to activate. This number is provided by email or by mail after a product is purchased. + +![](assets/en/getStart/activ2.png) + + +### Deferred Activation + +If you are unable to use [instant activation](#instant-activation) because your computer does not have internet access, please proceed to deferred activation using the following steps. + +1. In the License Manager window, select the **Deferred Activation** tab. +2. Enter the License Number and your e-mail address, then click **Generate file** to create the ID file (*reg.txt*). + +![](assets/en/getStart/activ3.png) + +3. Save the *reg.txt* file to a USB drive and take it to a computer that has internet access. +4. On the machine with internet access, login to [https://activation.4d.com](https://activation.4d.com). +5. On the Web page, click on the **Choose File...** button and select the *reg.txt* file from steps 3 and 4; then click on the **Activate** button. +6. Download the serial file(s). + +![](assets/en/getStart/activ4.png) + +7. Save the *license4d* file(s) on a shared media and transfer them back to the 4D machine from step 1. +8. Now back on the machine with 4D, still on the **Deferred Activation** page, click **Next**; then click the **Load...** button and select a *license4d* file from the shared media from step 7. + +![](assets/en/getStart/activ5.png) + +With the license file loaded, click on **Next**. + +![](assets/en/getStart/activ6.png) + +9. Click on the **Add N°** button to add another license. Repeat these steps until all licenses from step 6 have been integrated. + +Your 4D application is now activated. + +### Emergency Activation + +This mode can be used for a special temporary activation of 4D (5 days maximum) without connecting to the 4D Web site. This activation can only be used one time. + + +## Adding licenses + +You can add new licenses, for example to extend the capacities of your application, at any time. + +Choose the **License Manager...** command from the **Help** menu of the 4D or 4D Server application, then click on the **Refresh** button: + +![](assets/en/getStart/licens1.png) + +This button connects you to our customer database and automatically activates any new or updated licenses related to the current license (the current license is displayed in **bold** in the "Active Licenses" list). You will just be prompted for your user account and password. + +- If you purchased additional expansions for a 4D Server, you do not need to enter any license number -- just click **Refresh**. +- At the first activation of a 4D Server, you just need to enter the server number and all the purchased expansions are automatically assigned. + +You can use the **Refresh** button in the following contexts: + +- When you have purchased an additional expansion and want to activate it, +- When you need to update an expired temporary number (Partners or evolutions). + + + +## 4D Online Store + +In 4D Store, you can order, upgrade, extend, and/or manage 4D products. You can reach the store at the following address: [https://store.4d.com/us/](https://store.4d.com/us/) (you will need to select your country). + +Click **Login** to sign in using your existing account or **New Account** to create a new one, then follow the on-screen instructions. + +### License Management + +After you log in, you can click on **License list** at the top right of the page: + +![](assets/en/getStart/licens2.png) + +Here you can manage your licenses by assigning them to projects. + +Select the appropriate license from the list then click **Link to a project... >**: + +![](assets/en/getStart/licens3.png) + +You can either select an existing project or create a new one: + +![](assets/en/getStart/licens4.png) + +![](assets/en/getStart/licens5.png) + +You can use projects to organize your licenses according to your needs: + +![](assets/en/getStart/licens6.png) + + +## Troubleshooting + +If the installation or activation process fails, please check the following table, which gives the most common causes of malfunctioning: + +|Symptoms|Possible causes|Solution(s)| +|---|---|---| +|Impossible to download product from 4D Internet site|Internet site unavailable, antivirus application, firewall|1- Try again later OR 2- Temporarily disable your antivirus application or your firewall.| +|Impossible to install product on disk (installation refused).|Insufficient user access rights|Open a session with access rights allowing you to install applications (administrator access)| +|Failure of on-line activation|Antivirus application, firewall, proxy|1- Temporarily disable your antivirus application or your firewall OR 2- Use deferred activation (not available with licenses for "R" versions)| + +If this information does not help you resolve your problem, please contact 4D or your local distributor. + + +## Contacts + +For any questions about the installation or activation of your product, please contact 4D, Inc. or your local distributor. + +For the US: + +- Web: [https://us.4d.com/4d-technical-support](https://us.4d.com/4d-technical-support) +- Telephone: 1-408-557-4600 + +For the UK: + +- Web: [https://uk.4d.com/4d-technical-support](https://uk.4d.com/4d-technical-support) +- Telephone: 01625 536178 + + +Find the 4D developer community on line here: [https://discuss.4d.com](https://discuss.4d.com). + diff --git a/docs/MSC/repair.md b/docs/MSC/repair.md index 59c907367e64ad..cc525e985ed396 100644 --- a/docs/MSC/repair.md +++ b/docs/MSC/repair.md @@ -4,7 +4,7 @@ title: Repair Page sidebar_label: Repair Page --- -This page is used to repair the data file when it has been damaged. Generally, you will only use these functions at the request of 4D, when anomalies have been detected while opening the database or following a [verification](verify.md). +This page is used to repair the data file when it has been damaged. Generally, you will only use these functions under the supervision of 4D technical teams, when anomalies have been detected while opening the application or following a [verification](verify.md). **Warning:** Each repair operation involves the duplication of the original file, which increases the size of the application folder. It is important to take this into account (especially in macOS where 4D applications appear as packages) so that the size of the application does not increase excessively. Manually removing the copies of the original file inside the package can be useful to minimize the package size. diff --git a/docs/Project/architecture.md b/docs/Project/architecture.md index 90b4563a7abe6c..a6e57efeef1c72 100644 --- a/docs/Project/architecture.md +++ b/docs/Project/architecture.md @@ -18,7 +18,7 @@ A 4D project is made of several folders and files, stored within a single parent - Trash - Resources - Settings - - userPreference.username + - userPreferences.username - WebFolder > If your project has been converted from a binary database, additional folders may be present. See "Converting databases to projects" on [doc.4d.com](https://doc.4d.com). @@ -57,7 +57,7 @@ Contents|Description|Format catalog.4DCatalog|Table and field definitions|XML folders.json|Explorer folder definitions|JSON menus.json|Menu definitions|JSON -settings.4DSettings|*Structure* database settings. If *user settings* are defined, they take priority over these settings. If *user settings for data* are defined, they take priority over user settings|XML +settings.4DSettings|*Structure* database settings. They are not taken into account if *[user settings](#settings-folder-1)* or *[user settings for data](#settings-folder)* are defined.

**Warning**: In compiled applications, structure settings are stored in the .4dz file (read-only). For deployment needs, it is necessary to use *user settings* or *user settings for data* to define custom settings.|XML tips.json|Defined tips|JSON lists.json|Defined lists|JSON filters.json|Defined filters|JSON @@ -194,11 +194,12 @@ Contents|Description|Format| directory.json|Description of 4D groups and users for the database, as well as their access rights|JSON| BuildApp.4DSettings|Build settings file, created automatically when using the application builder dialog box or the `BUILD APPLICATION` command|XML Backup.4DSettings|Database backup settings, used to set the [backup options](Backup/settings.md)) when each backup is launched. This file can also be used to read or set additional options, such as the amount of information stored in the *backup journal*. Keys concerning backup configuration are described in the *4D XML Keys Backup* manual.|XML| +BuildApp.4DSettings|Build settings file, created automatically when using the application builder dialog box or the `BUILD APPLICATION` command|XML ## userPreferences.*userName* folder -This folder contains files that memorize user configurations, e.g. break point positions. You can just ignore this folder. It contains for example: +This folder contains files that memorize user configurations, e.g. break point or window positions. You can just ignore this folder. It contains for example: Contents|Description|Format --------|-------|---- @@ -208,7 +209,7 @@ formWindowPositions.json|Current user window positions for forms|JSON workspace.json|List of opened windows; on macOS, order of tab windows|JSON debuggerCatches.json|Caught calls to commands|JSON recentTables.json|Ordered list of tables|JSON -preferencesv15.4DPreferences|User preferences|JSON +preferences.4DPreferences|Current data path and main window positions|XML ## Components folder diff --git a/docs/Project/overview.md b/docs/Project/overview.md index 22542f77d9a211..adda94a6de11b4 100644 --- a/docs/Project/overview.md +++ b/docs/Project/overview.md @@ -33,6 +33,6 @@ You create a 4D database project by: - creating a new, blank project -- see [Creating a 4D project](creating.md). - exporting an existing 4D "binary" development to a project -- see "Export from a 4D database" on [doc.4d.com](https://doc.4d.com). -Project development is done locally, using the 4D Developer application -- see [Developing a project](developing.md). Team development interactions are handled by the source control tool +Project development is done locally, using the 4D Developer application -- see [Developing a project](developing.md). Team development interactions are handled by the source control tool. 4D projects can be compiled and easily deployed as single-user or client-server applications containing compacted versions of your project -- see [Building a project package](building.md). diff --git a/docs/REST/$atomic_$atonce.md b/docs/REST/$atomic_$atonce.md index e308ea7ea866bd..ee55d73157c5eb 100644 --- a/docs/REST/$atomic_$atonce.md +++ b/docs/REST/$atomic_$atonce.md @@ -57,7 +57,7 @@ We get the following error in the second entity and therefore the first entity i }, "__ERROR": [ { - "message": "Cannot find entity with \"201\" key in the \"Employee\" datastore class", + "message": "Cannot find entity with \"201\" key in the \"Employee\" dataclass", "componentSignature": "dbmg", "errCode": 1542 } diff --git a/docs/REST/$attributes.md b/docs/REST/$attributes.md index b62c0aa1a4dd5c..134c8d27601e0c 100644 --- a/docs/REST/$attributes.md +++ b/docs/REST/$attributes.md @@ -29,7 +29,7 @@ You can apply `$attributes` to an entity (*e.g.*, People(1)) or an entity select ## Example with related entities -If we pass the following REST request for our Company datastore class (which has a relation attribute "employees"): +If we pass the following REST request for our Company dataclass (which has a relation attribute "employees"): `GET /rest/Company(1)/?$attributes=employees.lastname` @@ -75,7 +75,7 @@ If you want to get last name and job name attributes from employees: ## Example with related entity -If we pass the following REST request for our Employee datastore class (which has several relation attributes, including "employer"): +If we pass the following REST request for our Employee dataclass (which has several relation attributes, including "employer"): `GET /rest/Employee(1)?$attributes=employer.name` diff --git a/docs/REST/$catalog.md b/docs/REST/$catalog.md index dde445605f0d87..4ca1d0c88c4a1f 100644 --- a/docs/REST/$catalog.md +++ b/docs/REST/$catalog.md @@ -66,9 +66,9 @@ Returns information about all of your project's dataclasses and their attributes ### Description -Calling `$catalog/$all` allows you to receive detailed information about the attributes in each of the datastore classes in your project's active model. +Calling `$catalog/$all` allows you to receive detailed information about the attributes in each of the dataclasses in your project's active model. -For more information about what is returned for each datastore class and its attributes, use [`$catalog/{dataClass}`](#catalogdataClass). +For more information about what is returned for each dataclass and its attributes, use [`$catalog/{dataClass}`](#catalogdataClass). ### Example @@ -187,7 +187,7 @@ Returns information about a dataclass and its attributes ### Description -Calling `$catalog/{dataClass}` for a specific dataclass will return the following information about the dataclass and the attributes it contains. If you want to retrieve this information for all the datastore classes in your project's datastore, use [`$catalog/$all`](#catalogall). +Calling `$catalog/{dataClass}` for a specific dataclass will return the following information about the dataclass and the attributes it contains. If you want to retrieve this information for all the dataclasses in your project's datastore, use [`$catalog/$all`](#catalogall). The information you retrieve concerns the following: @@ -206,7 +206,7 @@ The following properties are returned for an exposed dataclass: |name| String| Name of the dataclass |collectionName |String |Name of an entity selection on the dataclass |tableNumber|Number |Table number in the 4D database -|scope| String| Scope for the dataclass (note that only datastore classes whose **Scope** is public are displayed) +|scope| String| Scope for the dataclass (note that only dataclasses whose **Scope** is public are displayed) |dataURI| String| A URI to the data in the dataclass @@ -221,7 +221,7 @@ Here are the properties for each exposed attribute that are returned: |fieldPos|Number|Position of the field in the database table).| |scope| String |Scope of the attribute (only those attributes whose scope is Public will appear).| |indexed |String| If any **Index Kind** was selected, this property will return true. Otherwise, this property does not appear.| -|type| String| Attribute type (bool, blob, byte, date, duration, image, long, long64, number, string, uuid, or word) or the datastore class for a N->1 relation attribute.| +|type| String| Attribute type (bool, blob, byte, date, duration, image, long, long64, number, string, uuid, or word) or the dataclass for a N->1 relation attribute.| |identifying|Boolean |This property returns True if the attribute is the primary key. Otherwise, this property does not appear.| |path |String |Name of the relation for a relatedEntity or relateEntities attribute.| foreignKey|String |For a relatedEntity attribute, name of the related attribute.| @@ -233,11 +233,11 @@ Defines the project methods asociated to the dataclass, if any. ### Primary Key -The key object returns the **name** of the attribute defined as the **Primary Key** for the datastore class. +The key object returns the **name** of the attribute defined as the **Primary Key** for the dataclass. ### Example -You can retrieve the information regarding a specific datastore class. +You can retrieve the information regarding a specific dataclass. `GET /rest/$catalog/Employee` diff --git a/docs/REST/$compute.md b/docs/REST/$compute.md index 4661165628c283..b2df9b43b5cb02 100644 --- a/docs/REST/$compute.md +++ b/docs/REST/$compute.md @@ -25,7 +25,7 @@ You can use any of the following keywords: |---|---| |$all| A JSON object that defines all the functions for the attribute (average, count, min, max, and sum for attributes of type Number and count, min, and max for attributes of type String| |average| Get the average on a numerical attribute| -|count| Get the total number in the collection or datastore class (in both cases you must specify an attribute)| +|count| Get the total number in the collection or dataclass (in both cases you must specify an attribute)| |min |Get the minimum value on a numerical attribute or the lowest value in an attribute of type String| |max| Get the maximum value on a numerical attribute or the highest value in an attribute of type String| |sum| Get the sum on a numerical attribute| @@ -75,6 +75,7 @@ If you want to just get one calculation on an attribute, you can write the follo `235000` + If you want to perform a calculation on an Object attribute, you can write the following: `GET /rest/Employee/objectAttribute.property1/?$compute=sum` diff --git a/docs/REST/$directory.md b/docs/REST/$directory.md index 06035f5458e41b..4ab7a16adfd887 100644 --- a/docs/REST/$directory.md +++ b/docs/REST/$directory.md @@ -35,7 +35,7 @@ $hKey{3}:="session-4D-length" $hValues{1}:="john" $hValues{2}:=Generate digest("123";4D digest) $hValues{3}:=120 -$httpStatus:=HTTP Request(HTTP POST method;"database.example.com:9000";$body_t;$response;$hKey;$hValues) +$httpStatus:=HTTP Request(HTTP POST method;"app.example.com:9000/rest/$directory/login";$body_t;$response;$hKey;$hValues) ``` **Result**: diff --git a/docs/REST/$entityset.md b/docs/REST/$entityset.md index 535f523ab85387..cb634699f5d7a2 100644 --- a/docs/REST/$entityset.md +++ b/docs/REST/$entityset.md @@ -49,7 +49,7 @@ Create another entity set based on previously created entity sets ### Description -After creating an entity set (entity set #1) by using `$method=entityset`, you can then create another entity set by using the `$entityset/{entitySetID}?$operator... &$otherCollection` syntax, the `$operator` property (whose values are shown below), and another entity set (entity set #2) defined by the `$otherCollection` property. The two entity sets must be in the same datastore class. +After creating an entity set (entity set #1) by using `$method=entityset`, you can then create another entity set by using the `$entityset/{entitySetID}?$operator... &$otherCollection` syntax, the `$operator` property (whose values are shown below), and another entity set (entity set #2) defined by the `$otherCollection` property. The two entity sets must be in the same dataclass. You can then create another entity set containing the results from this call by using the `$method=entityset` at the end of the REST request. diff --git a/docs/REST/$expand.md b/docs/REST/$expand.md index 2291245494604f..ea16237e309870 100644 --- a/docs/REST/$expand.md +++ b/docs/REST/$expand.md @@ -22,6 +22,6 @@ For more information about the image formats, refer to [`$imageformat`]($imagefo ## Saving a BLOB attribute to disk -If you want to save a BLOB stored in your datastore class, you can write the following by also passing "true" to $binary: +If you want to save a BLOB stored in your dataclass, you can write the following by also passing "true" to $binary: `GET /rest/Company(11)/blobAtt?$binary=true&$expand=blobAtt` \ No newline at end of file diff --git a/docs/REST/$filter.md b/docs/REST/$filter.md index 9a4ccedd3d49ab..a296bdb0cce888 100644 --- a/docs/REST/$filter.md +++ b/docs/REST/$filter.md @@ -27,7 +27,7 @@ A more compex filter is composed of the following elements, which joins two quer **{attribute} {comparator} {value} {AND/OR/EXCEPT} {attribute} {comparator} {value}** -For example: `$filter="firstName=john AND salary>20000"` where `firstName` and `salary` are attributes in the Employee datastore class. +For example: `$filter="firstName=john AND salary>20000"` where `firstName` and `salary` are attributes in the Employee dataclass. ### Using the params property @@ -35,7 +35,7 @@ You can also use 4D's params property. **{attribute} {comparator} {placeholder} {AND/OR/EXCEPT} {attribute} {comparator} {placeholder}&$params='["{value1}","{value2}"]"'** -For example: `$filter="firstName=:1 AND salary>:2"&$params='["john",20000]'` where firstName and salary are attributes in the Employee datastore class. +For example: `$filter="firstName=:1 AND salary>:2"&$params='["john",20000]'` where firstName and salary are attributes in the Employee dataclass. For more information regarding how to query data in 4D, refer to the [dataClass.query()](https://doc.4d.com/4Dv18/4D/18/dataClassquery.305-4505887.en.html) documentation. @@ -91,14 +91,14 @@ In the following example, we look for all employees whose last name begins with GET /rest/Employee?$filter="lastName begin j" ``` -In this example, we search the Employee datastore class for all employees whose salary is greater than 20,000 and who do not work for a company named Acme: +In this example, we search the Employee dataclass for all employees whose salary is greater than 20,000 and who do not work for a company named Acme: ``` GET /rest/Employee?$filter="salary>20000 AND employer.name!=acme"&$orderby="lastName,firstName" ``` -In this example, we search the Person datastore class for all the people whose number property in the anotherobj attribute of type Object is greater than 50: +In this example, we search the Person dataclass for all the people whose number property in the anotherobj attribute of type Object is greater than 50: ``` GET /rest/Person/?filter="anotherobj.mynum > 50" diff --git a/docs/REST/$info.md b/docs/REST/$info.md index c1770c6edc147c..e30988d3ef5ccd 100644 --- a/docs/REST/$info.md +++ b/docs/REST/$info.md @@ -24,7 +24,7 @@ For each entity selection currently stored in 4D Server's cache, the following i |Property| Type| Description| |---|---|---| |id|String| A UUID that references the entity set.| -|dataClass|String |Name of the datastore class.| +|dataClass|String |Name of the dataclass.| |selectionSize| Number| Number of entities in the entity selection.| |sorted|Boolean|Returns true if the set was sorted (using `$orderby`) or false if it's not sorted.| |refreshed|Date|When the entity set was created or the last time it was used.| diff --git a/docs/REST/$method.md b/docs/REST/$method.md index 447abf6fd15e2d..b8dd99436cf420 100644 --- a/docs/REST/$method.md +++ b/docs/REST/$method.md @@ -323,7 +323,7 @@ If, for example, the stamp is not correct, the following error is returned: "errCode": 1046 }, { - "message": "The entity# 1 in the \"Persons\" datastore class cannot be saved", + "message": "The entity# 1 in the \"Persons\" dataclass cannot be saved", "componentSignature": "dbmg", "errCode": 1517 } diff --git a/docs/REST/REST_requests.md b/docs/REST/REST_requests.md index c725999e4a85e0..970a8b3a5a362e 100644 --- a/docs/REST/REST_requests.md +++ b/docs/REST/REST_requests.md @@ -28,7 +28,7 @@ As with all URIs, the first parameter is delimited by a “?” and all subseque >You can place all values in quotes in case of ambiguity. For example, in our above example, we could have put the value for the last name in single quotes: "lastName!='Jones'". -The parameters allow you to manipulate data in dataclasses in your 4D project. Besides retrieving data using `GET` HTTP methods, you can also add, update, and delete entities in a datastore class using `POST` HTTP methods. +The parameters allow you to manipulate data in dataclasses in your 4D project. Besides retrieving data using `GET` HTTP methods, you can also add, update, and delete entities in a dataclass using `POST` HTTP methods. If you want the data to be returned in an array instead of JSON, use the [`$asArray`]($asArray.md) parameter. diff --git a/docs/REST/genInfo.md b/docs/REST/genInfo.md index 1e21f05f3d7dcd..3a44051e808791 100644 --- a/docs/REST/genInfo.md +++ b/docs/REST/genInfo.md @@ -10,7 +10,7 @@ You can get several information from the REST server: ## Catalog -Use the [`$catalog`]($catalog.md), [`$catalog/{dataClass}`]($catalog.md#catalogdataclass), or [`$catalog/$all`]($catalog.md#catalogall) parameters to get the list of [exposed datastore classes and their attributes](configuration.md#exposing-tables-and-fields). +Use the [`$catalog`]($catalog.md), [`$catalog/{dataClass}`]($catalog.md#catalogdataclass), or [`$catalog/$all`]($catalog.md#catalogall) parameters to get the list of [exposed dataclasses and their attributes](configuration.md#exposing-tables-and-fields). To get the collection of all exposed dataclasses along with their attributes: diff --git a/docs/REST/manData.md b/docs/REST/manData.md index 3ffb14c9874849..5ee9a72d58734a 100644 --- a/docs/REST/manData.md +++ b/docs/REST/manData.md @@ -18,9 +18,9 @@ To query data directly, you can do so using the [`$filter`]($filter.md) function With the REST API, you can perform all the manipulations to data as you can in 4D. -To add and modify entities, you can call [`$method=update`]($method.md#methodupdate). Before saving data, you can also validate it beforehand by calling [`$method=validate`]($method.md#methodvalidate). If you want to delete one or more entities, you can use [`$method=delete`]($method.md#methoddelete). +To add and modify entities, you can call [`$method=update`]($method.md#methodupdate). If you want to delete one or more entities, you can use [`$method=delete`]($method.md#methoddelete). -Besides retrieving one attribute in a dataclass using [{dataClass}({key})](%7BdataClass%7D_%7Bkey%7D.html), you can also write a method in your datastore class and call it to return an entity selection (or a collection) by using [{dataClass}/{method}](%7BdataClass%7D.html#dataclassmethod). +Besides retrieving a single entity in a dataclass using [{dataClass}({key})](%7BdataClass%7D_%7Bkey%7D.html), you can also write a method in your DataClass class and call it to return an entity selection (or a collection) by using [{dataClass}/{method}](%7BdataClass%7D.html#dataclassmethod). Before returning the collection, you can also sort it by using [`$orderby`]($orderby.md) one one or more attributes (even relation attributes). @@ -132,7 +132,7 @@ You can apply this technique to: #### Dataclass Example -The following requests returns only the first name and last name from the People datastore class (either the entire datastore class or a selection of entities based on the search defined in `$filter`). +The following requests returns only the first name and last name from the People dataclass (either the entire dataclass or a selection of entities based on the search defined in `$filter`). `GET /rest/People/firstName,lastName/` diff --git a/docs/REST/{dataClass}.md b/docs/REST/{dataClass}.md index aaa7d4d52ae319..c1aacb1a11fb96 100644 --- a/docs/REST/{dataClass}.md +++ b/docs/REST/{dataClass}.md @@ -32,8 +32,8 @@ Here is a description of the data returned: |Property| Type| Description| |---|---|---| -|__entityModel| String| Name of the datastore class.| -|__COUNT| Number |Number of entities in the datastore class.| +|__entityModel| String| Name of the dataclass.| +|__COUNT| Number |Number of entities in the dataclass.| |__SENT| Number| Number of entities sent by the REST request. This number can be the total number of entities if it is less than the value defined by `$top/$limit`.| |__FIRST| Number| Entity number that the selection starts at. Either 0 by default or the value defined by `$skip`.| |__ENTITIES |Collection| This collection of objects contains an object for each entity with all its attributes. All relational attributes are returned as objects with a URI to obtain information regarding the parent.| @@ -42,7 +42,7 @@ Each entity contains the following properties: |Property| Type| Description| |---|---|---| -|__KEY|String|Value of the primary key defined for the datastore class.| +|__KEY|String|Value of the primary key defined for the dataclass.| |__TIMESTAMP|Date|Timestamp of the last modification of the entity| |__STAMP|Number|Internal stamp that is needed when you modify any of the values in the entity when using `$method=update`.| @@ -54,7 +54,7 @@ If you want to specify which attributes you want to return, define them using th ### Example -Return all the data for a specific datastore class. +Return all the data for a specific dataclass. `GET /rest/Company` @@ -144,7 +144,7 @@ Returns the data for the specific entity defined by the dataclass's primary key, ### Description -By passing the dataclass and a key, you can retrieve all the public information for that entity. The key is the value in the attribute defined as the Primary Key for your datastore class. For more information about defining a primary key, refer to the **Modifying the Primary Key** section in the **Data Model Editor**. +By passing the dataclass and a key, you can retrieve all the public information for that entity. The key is the value in the attribute defined as the Primary Key for your dataclass. For more information about defining a primary key, refer to the **Modifying the Primary Key** section in the **Data Model Editor**. For more information about the data returned, refer to [{datastoreClass}](#datastoreclass). @@ -158,7 +158,7 @@ If you want to expand a relation attribute using `$expand`, you do so by specify ### Example -The following request returns all the public data in the Company datastore class whose key is 1. +The following request returns all the public data in the Company dataclass whose key is 1. `GET /rest/Company(1)` diff --git a/docs/Users/handling_users_groups.md b/docs/Users/handling_users_groups.md index 2b6c24a38315c5..d923319fcd7aa0 100644 --- a/docs/Users/handling_users_groups.md +++ b/docs/Users/handling_users_groups.md @@ -29,8 +29,8 @@ The Administrator cannot: Both the Designer and Administrator are available by default in all databases. In the [user management dialog box](#users-and-groups-editor), the icons of the Designer and Administrator are displayed in red and green respectively: -- Designer icon: ![](assets/en/Users/IconDesigner.png) -- Administrator icon: ![](assets/en/Users/IconAdmin.png) +- Designer icon: ![](assets/en/Users/iconDesigner.png) +- Administrator icon: ![](assets/en/Users/iconAdmin.png) You can rename the Designer and Administrator users. In the language, the Designer ID is always 1 and the Administrator ID is always 2. diff --git a/docs/assets/de/FormObjects/select-row.png b/docs/assets/de/FormObjects/select-row.png new file mode 100644 index 00000000000000..e6acb24a8527c6 Binary files /dev/null and b/docs/assets/de/FormObjects/select-row.png differ diff --git a/docs/assets/de/getStart/activ1.png b/docs/assets/de/getStart/activ1.png new file mode 100644 index 00000000000000..a6bc35ffc667a6 Binary files /dev/null and b/docs/assets/de/getStart/activ1.png differ diff --git a/docs/assets/de/getStart/activ2.png b/docs/assets/de/getStart/activ2.png new file mode 100644 index 00000000000000..0310c514e1b7f8 Binary files /dev/null and b/docs/assets/de/getStart/activ2.png differ diff --git a/docs/assets/de/getStart/activ3.png b/docs/assets/de/getStart/activ3.png new file mode 100644 index 00000000000000..b4d04cc3d226a5 Binary files /dev/null and b/docs/assets/de/getStart/activ3.png differ diff --git a/docs/assets/de/getStart/activ4.png b/docs/assets/de/getStart/activ4.png new file mode 100644 index 00000000000000..dccbc6ba72f569 Binary files /dev/null and b/docs/assets/de/getStart/activ4.png differ diff --git a/docs/assets/de/getStart/activ5.png b/docs/assets/de/getStart/activ5.png new file mode 100644 index 00000000000000..dd43a266fa8552 Binary files /dev/null and b/docs/assets/de/getStart/activ5.png differ diff --git a/docs/assets/de/getStart/activ6.png b/docs/assets/de/getStart/activ6.png new file mode 100644 index 00000000000000..3d6965822cab2a Binary files /dev/null and b/docs/assets/de/getStart/activ6.png differ diff --git a/docs/assets/de/getStart/helpMenu.png b/docs/assets/de/getStart/helpMenu.png new file mode 100644 index 00000000000000..65afe8beb35b7a Binary files /dev/null and b/docs/assets/de/getStart/helpMenu.png differ diff --git a/docs/assets/de/getStart/licens1.png b/docs/assets/de/getStart/licens1.png new file mode 100644 index 00000000000000..37a057c9815fbe Binary files /dev/null and b/docs/assets/de/getStart/licens1.png differ diff --git a/docs/assets/de/getStart/licens2.png b/docs/assets/de/getStart/licens2.png new file mode 100644 index 00000000000000..ff8a16e5f6bc8b Binary files /dev/null and b/docs/assets/de/getStart/licens2.png differ diff --git a/docs/assets/de/getStart/licens3.png b/docs/assets/de/getStart/licens3.png new file mode 100644 index 00000000000000..502ff00c922d2e Binary files /dev/null and b/docs/assets/de/getStart/licens3.png differ diff --git a/docs/assets/de/getStart/licens4.png b/docs/assets/de/getStart/licens4.png new file mode 100644 index 00000000000000..d8179e15ee5181 Binary files /dev/null and b/docs/assets/de/getStart/licens4.png differ diff --git a/docs/assets/de/getStart/licens5.png b/docs/assets/de/getStart/licens5.png new file mode 100644 index 00000000000000..de140b113704ab Binary files /dev/null and b/docs/assets/de/getStart/licens5.png differ diff --git a/docs/assets/de/getStart/licens6.png b/docs/assets/de/getStart/licens6.png new file mode 100644 index 00000000000000..b5df12550ce83a Binary files /dev/null and b/docs/assets/de/getStart/licens6.png differ diff --git a/docs/assets/de/getStart/server1.png b/docs/assets/de/getStart/server1.png new file mode 100644 index 00000000000000..f8ad3fa24a8fec Binary files /dev/null and b/docs/assets/de/getStart/server1.png differ diff --git a/docs/assets/en/FormObjects/select-row.png b/docs/assets/en/FormObjects/select-row.png new file mode 100644 index 00000000000000..e6acb24a8527c6 Binary files /dev/null and b/docs/assets/en/FormObjects/select-row.png differ diff --git a/docs/assets/en/getStart/activ1.png b/docs/assets/en/getStart/activ1.png new file mode 100644 index 00000000000000..a6bc35ffc667a6 Binary files /dev/null and b/docs/assets/en/getStart/activ1.png differ diff --git a/docs/assets/en/getStart/activ2.png b/docs/assets/en/getStart/activ2.png new file mode 100644 index 00000000000000..0310c514e1b7f8 Binary files /dev/null and b/docs/assets/en/getStart/activ2.png differ diff --git a/docs/assets/en/getStart/activ3.png b/docs/assets/en/getStart/activ3.png new file mode 100644 index 00000000000000..b4d04cc3d226a5 Binary files /dev/null and b/docs/assets/en/getStart/activ3.png differ diff --git a/docs/assets/en/getStart/activ4.png b/docs/assets/en/getStart/activ4.png new file mode 100644 index 00000000000000..dccbc6ba72f569 Binary files /dev/null and b/docs/assets/en/getStart/activ4.png differ diff --git a/docs/assets/en/getStart/activ5.png b/docs/assets/en/getStart/activ5.png new file mode 100644 index 00000000000000..dd43a266fa8552 Binary files /dev/null and b/docs/assets/en/getStart/activ5.png differ diff --git a/docs/assets/en/getStart/activ6.png b/docs/assets/en/getStart/activ6.png new file mode 100644 index 00000000000000..3d6965822cab2a Binary files /dev/null and b/docs/assets/en/getStart/activ6.png differ diff --git a/docs/assets/en/getStart/helpMenu.png b/docs/assets/en/getStart/helpMenu.png new file mode 100644 index 00000000000000..65afe8beb35b7a Binary files /dev/null and b/docs/assets/en/getStart/helpMenu.png differ diff --git a/docs/assets/en/getStart/licens1.png b/docs/assets/en/getStart/licens1.png new file mode 100644 index 00000000000000..37a057c9815fbe Binary files /dev/null and b/docs/assets/en/getStart/licens1.png differ diff --git a/docs/assets/en/getStart/licens2.png b/docs/assets/en/getStart/licens2.png new file mode 100644 index 00000000000000..ff8a16e5f6bc8b Binary files /dev/null and b/docs/assets/en/getStart/licens2.png differ diff --git a/docs/assets/en/getStart/licens3.png b/docs/assets/en/getStart/licens3.png new file mode 100644 index 00000000000000..502ff00c922d2e Binary files /dev/null and b/docs/assets/en/getStart/licens3.png differ diff --git a/docs/assets/en/getStart/licens4.png b/docs/assets/en/getStart/licens4.png new file mode 100644 index 00000000000000..d8179e15ee5181 Binary files /dev/null and b/docs/assets/en/getStart/licens4.png differ diff --git a/docs/assets/en/getStart/licens5.png b/docs/assets/en/getStart/licens5.png new file mode 100644 index 00000000000000..de140b113704ab Binary files /dev/null and b/docs/assets/en/getStart/licens5.png differ diff --git a/docs/assets/en/getStart/licens6.png b/docs/assets/en/getStart/licens6.png new file mode 100644 index 00000000000000..b5df12550ce83a Binary files /dev/null and b/docs/assets/en/getStart/licens6.png differ diff --git a/docs/assets/en/getStart/server1.png b/docs/assets/en/getStart/server1.png new file mode 100644 index 00000000000000..f8ad3fa24a8fec Binary files /dev/null and b/docs/assets/en/getStart/server1.png differ diff --git a/docs/assets/es/FormObjects/select-row.png b/docs/assets/es/FormObjects/select-row.png new file mode 100644 index 00000000000000..e6acb24a8527c6 Binary files /dev/null and b/docs/assets/es/FormObjects/select-row.png differ diff --git a/docs/assets/es/getStart/activ1.png b/docs/assets/es/getStart/activ1.png new file mode 100644 index 00000000000000..a6bc35ffc667a6 Binary files /dev/null and b/docs/assets/es/getStart/activ1.png differ diff --git a/docs/assets/es/getStart/activ2.png b/docs/assets/es/getStart/activ2.png new file mode 100644 index 00000000000000..0310c514e1b7f8 Binary files /dev/null and b/docs/assets/es/getStart/activ2.png differ diff --git a/docs/assets/es/getStart/activ3.png b/docs/assets/es/getStart/activ3.png new file mode 100644 index 00000000000000..b4d04cc3d226a5 Binary files /dev/null and b/docs/assets/es/getStart/activ3.png differ diff --git a/docs/assets/es/getStart/activ4.png b/docs/assets/es/getStart/activ4.png new file mode 100644 index 00000000000000..dccbc6ba72f569 Binary files /dev/null and b/docs/assets/es/getStart/activ4.png differ diff --git a/docs/assets/es/getStart/activ5.png b/docs/assets/es/getStart/activ5.png new file mode 100644 index 00000000000000..dd43a266fa8552 Binary files /dev/null and b/docs/assets/es/getStart/activ5.png differ diff --git a/docs/assets/es/getStart/activ6.png b/docs/assets/es/getStart/activ6.png new file mode 100644 index 00000000000000..3d6965822cab2a Binary files /dev/null and b/docs/assets/es/getStart/activ6.png differ diff --git a/docs/assets/es/getStart/helpMenu.png b/docs/assets/es/getStart/helpMenu.png new file mode 100644 index 00000000000000..65afe8beb35b7a Binary files /dev/null and b/docs/assets/es/getStart/helpMenu.png differ diff --git a/docs/assets/es/getStart/licens1.png b/docs/assets/es/getStart/licens1.png new file mode 100644 index 00000000000000..37a057c9815fbe Binary files /dev/null and b/docs/assets/es/getStart/licens1.png differ diff --git a/docs/assets/es/getStart/licens2.png b/docs/assets/es/getStart/licens2.png new file mode 100644 index 00000000000000..ff8a16e5f6bc8b Binary files /dev/null and b/docs/assets/es/getStart/licens2.png differ diff --git a/docs/assets/es/getStart/licens3.png b/docs/assets/es/getStart/licens3.png new file mode 100644 index 00000000000000..502ff00c922d2e Binary files /dev/null and b/docs/assets/es/getStart/licens3.png differ diff --git a/docs/assets/es/getStart/licens4.png b/docs/assets/es/getStart/licens4.png new file mode 100644 index 00000000000000..d8179e15ee5181 Binary files /dev/null and b/docs/assets/es/getStart/licens4.png differ diff --git a/docs/assets/es/getStart/licens5.png b/docs/assets/es/getStart/licens5.png new file mode 100644 index 00000000000000..de140b113704ab Binary files /dev/null and b/docs/assets/es/getStart/licens5.png differ diff --git a/docs/assets/es/getStart/licens6.png b/docs/assets/es/getStart/licens6.png new file mode 100644 index 00000000000000..b5df12550ce83a Binary files /dev/null and b/docs/assets/es/getStart/licens6.png differ diff --git a/docs/assets/es/getStart/server1.png b/docs/assets/es/getStart/server1.png new file mode 100644 index 00000000000000..f8ad3fa24a8fec Binary files /dev/null and b/docs/assets/es/getStart/server1.png differ diff --git a/docs/assets/fr/FormObjects/select-row.png b/docs/assets/fr/FormObjects/select-row.png new file mode 100644 index 00000000000000..e6acb24a8527c6 Binary files /dev/null and b/docs/assets/fr/FormObjects/select-row.png differ diff --git a/docs/assets/fr/getStart/activ1.png b/docs/assets/fr/getStart/activ1.png new file mode 100644 index 00000000000000..a6bc35ffc667a6 Binary files /dev/null and b/docs/assets/fr/getStart/activ1.png differ diff --git a/docs/assets/fr/getStart/activ2.png b/docs/assets/fr/getStart/activ2.png new file mode 100644 index 00000000000000..0310c514e1b7f8 Binary files /dev/null and b/docs/assets/fr/getStart/activ2.png differ diff --git a/docs/assets/fr/getStart/activ3.png b/docs/assets/fr/getStart/activ3.png new file mode 100644 index 00000000000000..b4d04cc3d226a5 Binary files /dev/null and b/docs/assets/fr/getStart/activ3.png differ diff --git a/docs/assets/fr/getStart/activ4.png b/docs/assets/fr/getStart/activ4.png new file mode 100644 index 00000000000000..dccbc6ba72f569 Binary files /dev/null and b/docs/assets/fr/getStart/activ4.png differ diff --git a/docs/assets/fr/getStart/activ5.png b/docs/assets/fr/getStart/activ5.png new file mode 100644 index 00000000000000..dd43a266fa8552 Binary files /dev/null and b/docs/assets/fr/getStart/activ5.png differ diff --git a/docs/assets/fr/getStart/activ6.png b/docs/assets/fr/getStart/activ6.png new file mode 100644 index 00000000000000..3d6965822cab2a Binary files /dev/null and b/docs/assets/fr/getStart/activ6.png differ diff --git a/docs/assets/fr/getStart/helpMenu.png b/docs/assets/fr/getStart/helpMenu.png new file mode 100644 index 00000000000000..65afe8beb35b7a Binary files /dev/null and b/docs/assets/fr/getStart/helpMenu.png differ diff --git a/docs/assets/fr/getStart/licens1.png b/docs/assets/fr/getStart/licens1.png new file mode 100644 index 00000000000000..37a057c9815fbe Binary files /dev/null and b/docs/assets/fr/getStart/licens1.png differ diff --git a/docs/assets/fr/getStart/licens2.png b/docs/assets/fr/getStart/licens2.png new file mode 100644 index 00000000000000..ff8a16e5f6bc8b Binary files /dev/null and b/docs/assets/fr/getStart/licens2.png differ diff --git a/docs/assets/fr/getStart/licens3.png b/docs/assets/fr/getStart/licens3.png new file mode 100644 index 00000000000000..502ff00c922d2e Binary files /dev/null and b/docs/assets/fr/getStart/licens3.png differ diff --git a/docs/assets/fr/getStart/licens4.png b/docs/assets/fr/getStart/licens4.png new file mode 100644 index 00000000000000..d8179e15ee5181 Binary files /dev/null and b/docs/assets/fr/getStart/licens4.png differ diff --git a/docs/assets/fr/getStart/licens5.png b/docs/assets/fr/getStart/licens5.png new file mode 100644 index 00000000000000..de140b113704ab Binary files /dev/null and b/docs/assets/fr/getStart/licens5.png differ diff --git a/docs/assets/fr/getStart/licens6.png b/docs/assets/fr/getStart/licens6.png new file mode 100644 index 00000000000000..b5df12550ce83a Binary files /dev/null and b/docs/assets/fr/getStart/licens6.png differ diff --git a/docs/assets/fr/getStart/server1.png b/docs/assets/fr/getStart/server1.png new file mode 100644 index 00000000000000..f8ad3fa24a8fec Binary files /dev/null and b/docs/assets/fr/getStart/server1.png differ diff --git a/docs/assets/ja/FormObjects/select-row.png b/docs/assets/ja/FormObjects/select-row.png new file mode 100644 index 00000000000000..e6acb24a8527c6 Binary files /dev/null and b/docs/assets/ja/FormObjects/select-row.png differ diff --git a/docs/assets/ja/getStart/activ1.png b/docs/assets/ja/getStart/activ1.png new file mode 100644 index 00000000000000..a6bc35ffc667a6 Binary files /dev/null and b/docs/assets/ja/getStart/activ1.png differ diff --git a/docs/assets/ja/getStart/activ2.png b/docs/assets/ja/getStart/activ2.png new file mode 100644 index 00000000000000..0310c514e1b7f8 Binary files /dev/null and b/docs/assets/ja/getStart/activ2.png differ diff --git a/docs/assets/ja/getStart/activ3.png b/docs/assets/ja/getStart/activ3.png new file mode 100644 index 00000000000000..b4d04cc3d226a5 Binary files /dev/null and b/docs/assets/ja/getStart/activ3.png differ diff --git a/docs/assets/ja/getStart/activ4.png b/docs/assets/ja/getStart/activ4.png new file mode 100644 index 00000000000000..dccbc6ba72f569 Binary files /dev/null and b/docs/assets/ja/getStart/activ4.png differ diff --git a/docs/assets/ja/getStart/activ5.png b/docs/assets/ja/getStart/activ5.png new file mode 100644 index 00000000000000..dd43a266fa8552 Binary files /dev/null and b/docs/assets/ja/getStart/activ5.png differ diff --git a/docs/assets/ja/getStart/activ6.png b/docs/assets/ja/getStart/activ6.png new file mode 100644 index 00000000000000..3d6965822cab2a Binary files /dev/null and b/docs/assets/ja/getStart/activ6.png differ diff --git a/docs/assets/ja/getStart/helpMenu.png b/docs/assets/ja/getStart/helpMenu.png new file mode 100644 index 00000000000000..65afe8beb35b7a Binary files /dev/null and b/docs/assets/ja/getStart/helpMenu.png differ diff --git a/docs/assets/ja/getStart/licens1.png b/docs/assets/ja/getStart/licens1.png new file mode 100644 index 00000000000000..37a057c9815fbe Binary files /dev/null and b/docs/assets/ja/getStart/licens1.png differ diff --git a/docs/assets/ja/getStart/licens2.png b/docs/assets/ja/getStart/licens2.png new file mode 100644 index 00000000000000..ff8a16e5f6bc8b Binary files /dev/null and b/docs/assets/ja/getStart/licens2.png differ diff --git a/docs/assets/ja/getStart/licens3.png b/docs/assets/ja/getStart/licens3.png new file mode 100644 index 00000000000000..502ff00c922d2e Binary files /dev/null and b/docs/assets/ja/getStart/licens3.png differ diff --git a/docs/assets/ja/getStart/licens4.png b/docs/assets/ja/getStart/licens4.png new file mode 100644 index 00000000000000..d8179e15ee5181 Binary files /dev/null and b/docs/assets/ja/getStart/licens4.png differ diff --git a/docs/assets/ja/getStart/licens5.png b/docs/assets/ja/getStart/licens5.png new file mode 100644 index 00000000000000..de140b113704ab Binary files /dev/null and b/docs/assets/ja/getStart/licens5.png differ diff --git a/docs/assets/ja/getStart/licens6.png b/docs/assets/ja/getStart/licens6.png new file mode 100644 index 00000000000000..b5df12550ce83a Binary files /dev/null and b/docs/assets/ja/getStart/licens6.png differ diff --git a/docs/assets/ja/getStart/server1.png b/docs/assets/ja/getStart/server1.png new file mode 100644 index 00000000000000..f8ad3fa24a8fec Binary files /dev/null and b/docs/assets/ja/getStart/server1.png differ diff --git a/docs/assets/pt/FormObjects/select-row.png b/docs/assets/pt/FormObjects/select-row.png new file mode 100644 index 00000000000000..e6acb24a8527c6 Binary files /dev/null and b/docs/assets/pt/FormObjects/select-row.png differ diff --git a/docs/assets/pt/getStart/activ1.png b/docs/assets/pt/getStart/activ1.png new file mode 100644 index 00000000000000..a6bc35ffc667a6 Binary files /dev/null and b/docs/assets/pt/getStart/activ1.png differ diff --git a/docs/assets/pt/getStart/activ2.png b/docs/assets/pt/getStart/activ2.png new file mode 100644 index 00000000000000..0310c514e1b7f8 Binary files /dev/null and b/docs/assets/pt/getStart/activ2.png differ diff --git a/docs/assets/pt/getStart/activ3.png b/docs/assets/pt/getStart/activ3.png new file mode 100644 index 00000000000000..b4d04cc3d226a5 Binary files /dev/null and b/docs/assets/pt/getStart/activ3.png differ diff --git a/docs/assets/pt/getStart/activ4.png b/docs/assets/pt/getStart/activ4.png new file mode 100644 index 00000000000000..dccbc6ba72f569 Binary files /dev/null and b/docs/assets/pt/getStart/activ4.png differ diff --git a/docs/assets/pt/getStart/activ5.png b/docs/assets/pt/getStart/activ5.png new file mode 100644 index 00000000000000..dd43a266fa8552 Binary files /dev/null and b/docs/assets/pt/getStart/activ5.png differ diff --git a/docs/assets/pt/getStart/activ6.png b/docs/assets/pt/getStart/activ6.png new file mode 100644 index 00000000000000..3d6965822cab2a Binary files /dev/null and b/docs/assets/pt/getStart/activ6.png differ diff --git a/docs/assets/pt/getStart/helpMenu.png b/docs/assets/pt/getStart/helpMenu.png new file mode 100644 index 00000000000000..65afe8beb35b7a Binary files /dev/null and b/docs/assets/pt/getStart/helpMenu.png differ diff --git a/docs/assets/pt/getStart/licens1.png b/docs/assets/pt/getStart/licens1.png new file mode 100644 index 00000000000000..37a057c9815fbe Binary files /dev/null and b/docs/assets/pt/getStart/licens1.png differ diff --git a/docs/assets/pt/getStart/licens2.png b/docs/assets/pt/getStart/licens2.png new file mode 100644 index 00000000000000..ff8a16e5f6bc8b Binary files /dev/null and b/docs/assets/pt/getStart/licens2.png differ diff --git a/docs/assets/pt/getStart/licens3.png b/docs/assets/pt/getStart/licens3.png new file mode 100644 index 00000000000000..502ff00c922d2e Binary files /dev/null and b/docs/assets/pt/getStart/licens3.png differ diff --git a/docs/assets/pt/getStart/licens4.png b/docs/assets/pt/getStart/licens4.png new file mode 100644 index 00000000000000..d8179e15ee5181 Binary files /dev/null and b/docs/assets/pt/getStart/licens4.png differ diff --git a/docs/assets/pt/getStart/licens5.png b/docs/assets/pt/getStart/licens5.png new file mode 100644 index 00000000000000..de140b113704ab Binary files /dev/null and b/docs/assets/pt/getStart/licens5.png differ diff --git a/docs/assets/pt/getStart/licens6.png b/docs/assets/pt/getStart/licens6.png new file mode 100644 index 00000000000000..b5df12550ce83a Binary files /dev/null and b/docs/assets/pt/getStart/licens6.png differ diff --git a/docs/assets/pt/getStart/server1.png b/docs/assets/pt/getStart/server1.png new file mode 100644 index 00000000000000..f8ad3fa24a8fec Binary files /dev/null and b/docs/assets/pt/getStart/server1.png differ diff --git a/website/i18n/de.json b/website/i18n/de.json index 8a3b482466c6a0..f650fa8ec0df6e 100644 --- a/website/i18n/de.json +++ b/website/i18n/de.json @@ -6,13 +6,13 @@ "tagline": "Documentation for 4D Developers", "docs": { "Backup/backup": { - "title": "Backup" + "title": "Cópia de segurança" }, "Backup/log": { "title": "Log file (.journal)" }, "Backup/overview": { - "title": "Overview" + "title": "Überblick" }, "Backup/restore": { "title": "Restore" @@ -57,7 +57,7 @@ "title": "Numerisch (Zahl, Lange Ganzzahl, Ganzzahl)" }, "Concepts/object": { - "title": "Objects" + "title": "Objekte" }, "Concepts/picture": { "title": "Bild" @@ -75,7 +75,7 @@ "title": "Variant" }, "Concepts/error-handling": { - "title": "Error handling" + "title": "Fehlerverwaltung" }, "Concepts/control-flow": { "title": "Ablaufsteuerung Überblick" @@ -84,23 +84,23 @@ "title": "Namensregeln" }, "Concepts/interpreted-compiled": { - "title": "Interpreted and Compiled modes" + "title": "Interpretierter und kompilierter Modus" }, "Concepts/methods": { "title": "Methoden" }, "Concepts/parameters": { - "title": "Parameters" + "title": "Parameter" }, "Concepts/plug-ins": { - "title": "Plug-ins" + "title": "Plug-Ins" }, "Concepts/quick-tour": { "title": "Schnelle Tour", "sidebar_label": "Schnelle Tour" }, "Concepts/shared": { - "title": "Shared objects and collections" + "title": "Shared Objects und Shared Collections" }, "Concepts/variables": { "title": "Variablen" @@ -112,7 +112,7 @@ "title": "Object libraries" }, "FormEditor/pictures": { - "title": "Pictures" + "title": "Bilder" }, "FormObjects/buttonOverview": { "title": "Button" @@ -202,13 +202,13 @@ "title": "List Box" }, "FormObjects/propertiesObject": { - "title": "Objects" + "title": "Objekte" }, "FormObjects/propertiesPicture": { "title": "Bild" }, "FormObjects/propertiesPlugIns": { - "title": "Plug-ins" + "title": "Plug-Ins" }, "FormObjects/propertiesPrint": { "title": "Print" @@ -267,15 +267,18 @@ "FormObjects/text": { "title": "Text" }, - "FormObjects/viewProAreaOverview": { + "FormObjects/viewProArea_overview": { "title": "4D View Pro area" }, "FormObjects/webAreaOverview": { "title": "Web Area" }, - "FormObjects/writeProAreaOverview": { + "FormObjects/writeProArea_overview": { "title": "4D Write Pro area" }, + "GettingStarted/installation": { + "title": "Installation and activation" + }, "Menus/bars": { "title": "Menu bar features" }, @@ -283,7 +286,7 @@ "title": "Creating menus and menu bars" }, "Menus/overview": { - "title": "Overview" + "title": "Überblick" }, "Menus/properties": { "title": "Menu item properties" @@ -312,8 +315,8 @@ "sidebar_label": "Seite Information" }, "MSC/overview": { - "title": "Overview", - "sidebar_label": "Overview" + "title": "Überblick", + "sidebar_label": "Überblick" }, "MSC/repair": { "title": "Seite Reparieren", @@ -344,7 +347,7 @@ "title": "Developing a project" }, "Project/overview": { - "title": "Overview" + "title": "Überblick" }, "REST/{dataClass}": { "title": "{dataClass}" @@ -443,16 +446,18 @@ "title": "Managing 4D users and groups" }, "Users/overview": { - "title": "Overview" + "title": "Überblick" } }, "links": { - "v18 R3 BETA": "v18 R3 BETA", - "v18 R2": "v18 R2", + "v19 R3 BETA": "v19 R3 BETA", + "v19 R2": "v19 R2", + "v19": "v19", "v18": "v18" }, "categories": { - "4D Language Concepts": "4D Language Concepts", + "Getting Started": "Getting Started", + "4D Language Concepts": "Konzepte der 4D Programmiersprache", "Project Databases": "Project Databases", "Form Editor": "Form Editor", "Form Objects": "Form Objects", @@ -465,6 +470,7 @@ } }, "pages-strings": { + "Installation and activation|in index page Getting started": "Installation and activation", "Language Concepts|in index page Getting started": "Language Concepts", "Project databases|in index page Getting started": "Project databases", "Form Editor|no description given": "Form Editor", @@ -476,7 +482,9 @@ "REST Server|no description given": "REST Server", "Maintenance and Security Center|no description given": "Maintenance and Security Center", "Backup and Restore|no description given": "Backup and Restore", + "Language Reference (4D Doc Center)|no description given": "Programmiersprache (4D Doc Center)", "Users and Groups|no description given": "Users and Groups", + "https://doc.4d.com/4Dv18/4D/18.4/4D-Language-Reference.100-5232397.en.html|no description given": "https://doc.4d.com/4Dv18/4D/18.4/4D-Language-Reference.100-5232397.en.html", "Getting started|no description given": "Getting started", "Developing a Desktop application|no description given": "Developing a Desktop application", "Developing a Web application|no description given": "Developing a Web application", diff --git a/website/i18n/en.json b/website/i18n/en.json index 60f38bafe9c389..2af00c403c353f 100644 --- a/website/i18n/en.json +++ b/website/i18n/en.json @@ -267,15 +267,18 @@ "FormObjects/text": { "title": "Text" }, - "FormObjects/viewProAreaOverview": { + "FormObjects/viewProArea_overview": { "title": "4D View Pro area" }, "FormObjects/webAreaOverview": { "title": "Web Area" }, - "FormObjects/writeProAreaOverview": { + "FormObjects/writeProArea_overview": { "title": "4D Write Pro area" }, + "GettingStarted/installation": { + "title": "Installation and activation" + }, "Menus/bars": { "title": "Menu bar features" }, @@ -447,11 +450,13 @@ } }, "links": { - "v18 R3 BETA": "v18 R3 BETA", - "v18 R2": "v18 R2", + "v19 R3 BETA": "v19 R3 BETA", + "v19 R2": "v19 R2", + "v19": "v19", "v18": "v18" }, "categories": { + "Getting Started": "Getting Started", "4D Language Concepts": "4D Language Concepts", "Project Databases": "Project Databases", "Form Editor": "Form Editor", @@ -465,6 +470,7 @@ } }, "pages-strings": { + "Installation and activation|in index page Getting started": "Installation and activation", "Language Concepts|in index page Getting started": "Language Concepts", "Project databases|in index page Getting started": "Project databases", "Form Editor|no description given": "Form Editor", @@ -476,7 +482,9 @@ "REST Server|no description given": "REST Server", "Maintenance and Security Center|no description given": "Maintenance and Security Center", "Backup and Restore|no description given": "Backup and Restore", + "Language Reference (4D Doc Center)|no description given": "Language Reference (4D Doc Center)", "Users and Groups|no description given": "Users and Groups", + "https://doc.4d.com/4Dv18/4D/18.4/4D-Language-Reference.100-5232397.en.html|no description given": "https://doc.4d.com/4Dv18/4D/18.4/4D-Language-Reference.100-5232397.en.html", "Getting started|no description given": "Getting started", "Developing a Desktop application|no description given": "Developing a Desktop application", "Developing a Web application|no description given": "Developing a Web application", diff --git a/website/i18n/es.json b/website/i18n/es.json index 60f38bafe9c389..c9667a1b055f30 100644 --- a/website/i18n/es.json +++ b/website/i18n/es.json @@ -1,350 +1,353 @@ { - "_comment": "This file is auto-generated by write-translations.js", + "_comment": "Este archivo es generado automáticamente por write-translation.js", "localized-strings": { - "next": "Next", - "previous": "Previous", - "tagline": "Documentation for 4D Developers", + "next": "Siguiente", + "previous": "Anterior", + "tagline": "Documentación para desarrolladores 4D", "docs": { "Backup/backup": { - "title": "Backup" + "title": "Copia de seguridad" }, "Backup/log": { - "title": "Log file (.journal)" + "title": "Archivo de historial (.journal)" }, "Backup/overview": { - "title": "Overview" + "title": "Generalidades" }, "Backup/restore": { - "title": "Restore" + "title": "Restaurar" }, "Backup/settings": { - "title": "Backup Settings" + "title": "Parámetros de la copia de seguridad" }, "Concepts/about": { - "title": "About the 4D Language" + "title": "Acerca del lenguaje 4D" }, "Concepts/arrays": { "title": "Arrays" }, "Concepts/branching": { - "title": "Branching structures" + "title": "Estructuras condicionales" }, "Concepts/looping": { - "title": "Looping structures" + "title": "Estructuras repetitivas (bucles)" }, "Concepts/components": { - "title": "Components" + "title": "Componentes" }, "Concepts/data-types": { - "title": "Data types overview" + "title": "Tipos de datos" }, "Concepts/blob": { "title": "BLOB" }, "Concepts/boolean": { - "title": "Boolean" + "title": "Booleano" }, "Concepts/collection": { "title": "Collection" }, "Concepts/date": { - "title": "Date" + "title": "Fecha" }, "Concepts/null-undefined": { - "title": "Null and Undefined" + "title": "Null e indefinido" }, "Concepts/number": { - "title": "Number (Real, Longint, Integer)" + "title": "Número (Real, Entero largo, Entero)" }, "Concepts/object": { - "title": "Objects" + "title": "Objetos" }, "Concepts/picture": { - "title": "Picture" + "title": "Imagen" }, "Concepts/pointer": { - "title": "Pointer" + "title": "Puntero" }, "Concepts/string": { - "title": "String" + "title": "Cadena" }, "Concepts/time": { - "title": "Time" + "title": "Hora" }, "Concepts/variant": { "title": "Variant" }, "Concepts/error-handling": { - "title": "Error handling" + "title": "Gestión de errores" }, "Concepts/control-flow": { - "title": "Control flow overview" + "title": "Condiciones y bucles" }, "Concepts/identifiers": { - "title": "Identifiers" + "title": "Identificadores" }, "Concepts/interpreted-compiled": { - "title": "Interpreted and Compiled modes" + "title": "Modos interpretado y compilado" }, "Concepts/methods": { - "title": "Methods" + "title": "Métodos" }, "Concepts/parameters": { - "title": "Parameters" + "title": "Parámetros" }, "Concepts/plug-ins": { "title": "Plug-ins" }, "Concepts/quick-tour": { - "title": "A Quick Tour", - "sidebar_label": "A Quick Tour" + "title": "Un recorrido rápido", + "sidebar_label": "Un recorrido rápido" }, "Concepts/shared": { - "title": "Shared objects and collections" + "title": "Objetos y colecciones compartidos" }, "Concepts/variables": { "title": "Variables" }, "FormEditor/stylesheets": { - "title": "Style sheets" + "title": "Hojas de estilo" }, "FormEditor/objectLibrary": { - "title": "Object libraries" + "title": "Librerías de objetos" }, "FormEditor/pictures": { - "title": "Pictures" + "title": "Imágenes" }, "FormObjects/buttonOverview": { - "title": "Button" + "title": "Botón" }, "FormObjects/buttonGridOverview": { - "title": "Button Grid" + "title": "Rejilla de botones" }, "FormObjects/checkboxOverview": { - "title": "Check Box" + "title": "Casilla a seleccionar" }, "FormObjects/comboBoxOverview": { "title": "Combo Box" }, "FormObjects/dropdownListOverview": { - "title": "Drop-down List" + "title": "Lista desplegable" }, "FormObjects/formObjectsOverview": { - "title": "About 4D Form Objects" + "title": "Acerca de los objetos formularios 4D" }, "FormObjects/groupBox": { - "title": "Group Box" + "title": "Área de grupo" }, "FormObjects/inputOverview": { - "title": "Input" + "title": "Entrada" }, "FormObjects/listOverview": { - "title": "Hierarchical List" + "title": "Lista jerárquica" }, "FormObjects/listboxOverview": { "title": "List Box" }, "FormObjects/pictureButtonOverview": { - "title": "Picture Button" + "title": "Botón Imagen" }, "FormObjects/picturePopupMenuOverview": { - "title": "Picture Pop-up Menu" + "title": "Menú pop-up imagen" }, "FormObjects/pluginAreaOverview": { - "title": "Plug-in Area" + "title": "Área de plug-in" }, "FormObjects/progressIndicator": { - "title": "Progress Indicator" + "title": "Indicador de progreso" }, "FormObjects/propertiesAction": { - "title": "Action" + "title": "Acción" }, "FormObjects/propertiesAnimation": { - "title": "Animation" + "title": "Animación" }, "FormObjects/propertiesAppearance": { - "title": "Appearance" + "title": "Apariencia" }, "FormObjects/propertiesBackgroundAndBorder": { - "title": "Background and Border" + "title": "Fondo y borde" }, "FormObjects/propertiesCoordinatesAndSizing": { - "title": "Coordinates & Sizing" + "title": "Coordenadas y dimensiones" }, "FormObjects/propertiesCrop": { - "title": "Crop" + "title": "Corte" }, "FormObjects/propertiesDataSource": { - "title": "Data Source" + "title": "Fuente de datos" }, "FormObjects/propertiesDisplay": { - "title": "Display" + "title": "Visualización" }, "FormObjects/propertiesEntry": { - "title": "Entry" + "title": "Entrada" }, "FormObjects/propertiesFooters": { - "title": "Footers" + "title": "Pies" }, "FormObjects/propertiesGridlines": { - "title": "Gridlines" + "title": "Rejillas" }, "FormObjects/propertiesHeaders": { - "title": "Headers" + "title": "Encabezados" }, "FormObjects/propertiesHelp": { - "title": "Help" + "title": "Ayuda" }, "FormObjects/propertiesHierarchy": { - "title": "Hierarchy" + "title": "Jerarquía" }, "FormObjects/propertiesListBox": { "title": "List Box" }, "FormObjects/propertiesObject": { - "title": "Objects" + "title": "Objetos" }, "FormObjects/propertiesPicture": { - "title": "Picture" + "title": "Imagen" }, "FormObjects/propertiesPlugIns": { "title": "Plug-ins" }, "FormObjects/propertiesPrint": { - "title": "Print" + "title": "Imprimir" }, "FormObjects/propertiesRangeOfValues": { - "title": "Range of Values" + "title": "Rango de valores" }, "FormObjects/propertiesReference": { - "title": "JSON property list" + "title": "Lista de propiedades JSON" }, "FormObjects/propertiesResizingOptions": { - "title": "Resizing Options" + "title": "Opciones de redimensionamiento" }, "FormObjects/propertiesScale": { - "title": "Scale" + "title": "Escala" }, "FormObjects/propertiesSubform": { - "title": "Subform" + "title": "Subformulario" }, "FormObjects/propertiesText": { - "title": "Text" + "title": "Texto" }, "FormObjects/propertiesTextAndPicture": { - "title": "Text and Picture" + "title": "Texto e Imagen" }, "FormObjects/propertiesWebArea": { - "title": "Web Area" + "title": "Área Web" }, "FormObjects/radiobuttonOverview": { - "title": "Radio Button" + "title": "Botón radio" }, "FormObjects/ruler": { - "title": "Ruler" + "title": "Regla" }, "FormObjects/shapesOverview": { - "title": "Shapes" + "title": "Formas" }, "FormObjects/spinner": { "title": "Spinner" }, "FormObjects/splitters": { - "title": "Splitter" + "title": "Separador" }, "FormObjects/staticPicture": { - "title": "Static picture" + "title": "Imagen estática" }, "FormObjects/stepper": { "title": "Stepper" }, "FormObjects/subformOverview": { - "title": "Subform" + "title": "Subformulario" }, "FormObjects/tabControl": { - "title": "Tab Controls" + "title": "Pestañas" }, "FormObjects/text": { - "title": "Text" + "title": "Texto" }, - "FormObjects/viewProAreaOverview": { - "title": "4D View Pro area" + "FormObjects/viewProArea_overview": { + "title": "Área 4D View Pro" }, "FormObjects/webAreaOverview": { - "title": "Web Area" + "title": "Área Web" }, - "FormObjects/writeProAreaOverview": { - "title": "4D Write Pro area" + "FormObjects/writeProArea_overview": { + "title": "Área 4D Write Pro" + }, + "GettingStarted/installation": { + "title": "Instalación y activación" }, "Menus/bars": { - "title": "Menu bar features" + "title": "Barras de menús" }, "Menus/creating": { - "title": "Creating menus and menu bars" + "title": "Creación de menús y barras de menús" }, "Menus/overview": { - "title": "Overview" + "title": "Generalidades" }, "Menus/properties": { - "title": "Menu item properties" + "title": "Propiedades de los menús" }, "Menus/sdi": { - "title": "SDI mode on Windows" + "title": "Mode SDI bajo Windows" }, "MSC/analysis": { - "title": "Activity analysis Page", - "sidebar_label": "Activity analysis Page" + "title": "Página Análisis de actividades", + "sidebar_label": "Página Análisis de actividades" }, "MSC/backup": { - "title": "Backup Page", - "sidebar_label": "Backup Page" + "title": "Página de respaldo", + "sidebar_label": "Página de respaldo" }, "MSC/compact": { - "title": "Compact Page", - "sidebar_label": "Compact Page" + "title": "Página compactado", + "sidebar_label": "Página compactado" }, "MSC/encrypt": { - "title": "Encrypt Page", - "sidebar_label": "Encrypt Page" + "title": "Página de cifrado", + "sidebar_label": "Página de cifrado" }, "MSC/information": { - "title": "Information Page", - "sidebar_label": "Information Page" + "title": "Página de información", + "sidebar_label": "Página de información" }, "MSC/overview": { - "title": "Overview", - "sidebar_label": "Overview" + "title": "Generalidades", + "sidebar_label": "Generalidades" }, "MSC/repair": { - "title": "Repair Page", - "sidebar_label": "Repair Page" + "title": "Página Reparación", + "sidebar_label": "Página Reparación" }, "MSC/restore": { - "title": "Restore Page", - "sidebar_label": "Restore Page" + "title": "Página Restauración", + "sidebar_label": "Página Restauración" }, "MSC/rollback": { - "title": "Rollback Page", - "sidebar_label": "Rollback Page" + "title": "Página Retroceso", + "sidebar_label": "Página Retroceso" }, "MSC/verify": { - "title": "Verify Page", - "sidebar_label": "Verify Page" + "title": "Página Verificación", + "sidebar_label": "Página Verificación" }, "Project/architecture": { - "title": "Architecture of a 4D project" + "title": "Arquitectura de un proyecto 4D" }, "Project/building": { - "title": "Building a project package" + "title": "Generar un paquete proyecto" }, "Project/creating": { - "title": "Creating a 4D project" + "title": "Crear un proyecto 4D" }, "Project/developing": { - "title": "Developing a project" + "title": "Desarrollar un proyecto" }, "Project/overview": { - "title": "Overview" + "title": "Generalidades" }, "REST/{dataClass}": { "title": "{dataClass}" @@ -422,68 +425,73 @@ "title": "$version" }, "REST/authUsers": { - "title": "Users and sessions" + "title": "Usuarios y sesiones" }, "REST/configuration": { - "title": "Server Configuration" + "title": "Configuración del servidor" }, "REST/genInfo": { - "title": "Getting Server Information" + "title": "Obtener información del servidor" }, "REST/gettingStarted": { - "title": "Getting Started" + "title": "Comencemos" }, "REST/manData": { - "title": "Manipulating Data" + "title": "Manipulación de datos" }, "REST/REST_requests": { - "title": "About REST Requests" + "title": "Acerca de las peticiones REST" }, "Users/editing": { - "title": "Managing 4D users and groups" + "title": "Gestión de usuarios y grupos 4D" }, "Users/overview": { - "title": "Overview" + "title": "Generalidades" } }, "links": { - "v18 R3 BETA": "v18 R3 BETA", - "v18 R2": "v18 R2", + "v19 R3 BETA": "v19 R3 BETA", + "v19 R2": "v19 R2", + "v19": "v19", "v18": "v18" }, "categories": { - "4D Language Concepts": "4D Language Concepts", - "Project Databases": "Project Databases", - "Form Editor": "Form Editor", - "Form Objects": "Form Objects", - "Form Object Properties": "Form Object Properties", - "Menus": "Menus", - "MSC": "MSC", - "Backup and Restore": "Backup and Restore", - "Users and Groups": "Users and Groups", - "REST Server": "REST Server" + "Getting Started": "Comencemos", + "4D Language Concepts": "Conceptos del lenguaje 4D", + "Project Databases": "Bases proyecto", + "Form Editor": "Editor de formularios", + "Form Objects": "Objetos formularios", + "Form Object Properties": "Propiedades de los objetos formulario", + "Menus": "Menús", + "MSC": "CSM", + "Backup and Restore": "Copia de seguridad y restauración", + "Users and Groups": "Usuarios y grupos", + "REST Server": "Servidor REST" } }, "pages-strings": { - "Language Concepts|in index page Getting started": "Language Concepts", - "Project databases|in index page Getting started": "Project databases", - "Form Editor|no description given": "Form Editor", - "Form Events|no description given": "Form Events", - "Form Objects|no description given": "Form Objects", - "Form Object Properties|no description given": "Form Object Properties", - "Menus|no description given": "Menus", - "Web Server|no description given": "Web Server", - "REST Server|no description given": "REST Server", - "Maintenance and Security Center|no description given": "Maintenance and Security Center", - "Backup and Restore|no description given": "Backup and Restore", - "Users and Groups|no description given": "Users and Groups", - "Getting started|no description given": "Getting started", - "Developing a Desktop application|no description given": "Developing a Desktop application", - "Developing a Web application|no description given": "Developing a Web application", - "Developing a Mobile application|no description given": "Developing a Mobile application", - "Administration|no description given": "Administration", - "Help Translate|recruit community translators for your project": "Help Translate", - "Edit this Doc|recruitment message asking to edit the doc source": "Edit", - "Translate this Doc|recruitment message asking to translate the docs": "Translate" + "Installation and activation|in index page Getting started": "Instalación y activación", + "Language Concepts|in index page Getting started": "Conceptos del lenguaje", + "Project databases|in index page Getting started": "Bases proyecto", + "Form Editor|no description given": "Editor de formularios", + "Form Events|no description given": "Eventos formulario", + "Form Objects|no description given": "Objetos formularios", + "Form Object Properties|no description given": "Propiedades de los objetos formulario", + "Menus|no description given": "Menús", + "Web Server|no description given": "Servidor Web", + "REST Server|no description given": "Servidor REST", + "Maintenance and Security Center|no description given": "Centro de mantenimiento y seguridad", + "Backup and Restore|no description given": "Copia de seguridad y restauración", + "Language Reference (4D Doc Center)|no description given": "Lenguaje (4D Doc Center)", + "Users and Groups|no description given": "Usuarios y grupos", + "https://doc.4d.com/4Dv18/4D/18.4/4D-Language-Reference.100-5232397.en.html|no description given": "https://doc.4d.com/4Dv18/4D/18.4/4D-Language-Reference.100-5232397.en.html", + "Getting started|no description given": "Comencemos", + "Developing a Desktop application|no description given": "Desarrollar una aplicación de escritorio", + "Developing a Web application|no description given": "Desarrollar una aplicación Web", + "Developing a Mobile application|no description given": "Desarrollar una aplicación móvil", + "Administration|no description given": "Administración", + "Help Translate|recruit community translators for your project": "Ayúdenos a traducir", + "Edit this Doc|recruitment message asking to edit the doc source": "Editar", + "Translate this Doc|recruitment message asking to translate the docs": "Traducir" } } diff --git a/website/i18n/fr.json b/website/i18n/fr.json index e111cdd88a3814..48606d2737eb97 100644 --- a/website/i18n/fr.json +++ b/website/i18n/fr.json @@ -139,7 +139,7 @@ "title": "Input" }, "FormObjects/listOverview": { - "title": "Hierarchical List" + "title": "Liste hiérarchique" }, "FormObjects/listboxOverview": { "title": "List Box" @@ -166,7 +166,7 @@ "title": "Apparence" }, "FormObjects/propertiesBackgroundAndBorder": { - "title": "Background and Border" + "title": "Fond et bordure" }, "FormObjects/propertiesCoordinatesAndSizing": { "title": "Coordonnées et dimensions" @@ -178,7 +178,7 @@ "title": "Source de données" }, "FormObjects/propertiesDisplay": { - "title": "Display" + "title": "Affichage" }, "FormObjects/propertiesEntry": { "title": "Saisie" @@ -217,7 +217,7 @@ "title": "Plage de valeurs" }, "FormObjects/propertiesReference": { - "title": "JSON property list" + "title": "Liste de propriétés JSON" }, "FormObjects/propertiesResizingOptions": { "title": "Options de redimensionnement" @@ -226,10 +226,10 @@ "title": "Echelle" }, "FormObjects/propertiesSubform": { - "title": "Subform" + "title": "Sous-formulaire" }, "FormObjects/propertiesText": { - "title": "Texte" + "title": "Text" }, "FormObjects/propertiesTextAndPicture": { "title": "Texte et Image" @@ -259,22 +259,25 @@ "title": "Stepper" }, "FormObjects/subformOverview": { - "title": "Subform" + "title": "Sous-formulaire" }, "FormObjects/tabControl": { "title": "Onglets" }, "FormObjects/text": { - "title": "Texte" + "title": "Text" }, - "FormObjects/viewProAreaOverview": { - "title": "4D View Pro area" + "FormObjects/viewProArea_overview": { + "title": "Zone 4D View Pro" }, "FormObjects/webAreaOverview": { "title": "Zone Web" }, - "FormObjects/writeProAreaOverview": { - "title": "4D Write Pro area" + "FormObjects/writeProArea_overview": { + "title": "Zone 4D Write Pro" + }, + "GettingStarted/installation": { + "title": "Installation et activation" }, "Menus/bars": { "title": "Barres de menus" @@ -422,7 +425,7 @@ "title": "$version" }, "REST/authUsers": { - "title": "Users and sessions" + "title": "Sessions et utilisateurs" }, "REST/configuration": { "title": "Configuration du serveur" @@ -447,11 +450,13 @@ } }, "links": { - "v18 R3 BETA": "v18 R3 BETA", - "v18 R2": "v18 R2", + "v19 R3 BETA": "v19 R3 BETA", + "v19 R2": "v19 R2", + "v19": "v19", "v18": "v18" }, "categories": { + "Getting Started": "Prise en main", "4D Language Concepts": "Concepts du langage 4D", "Project Databases": "Bases projet", "Form Editor": "Éditeur de formulaire", @@ -465,6 +470,7 @@ } }, "pages-strings": { + "Installation and activation|in index page Getting started": "Installation et activation", "Language Concepts|in index page Getting started": "Concepts du langage", "Project databases|in index page Getting started": "Bases projets", "Form Editor|no description given": "Éditeur de formulaire", @@ -476,7 +482,9 @@ "REST Server|no description given": "Serveur REST", "Maintenance and Security Center|no description given": "Centre de Sécurité et de Maintenance", "Backup and Restore|no description given": "Sauvegarde et restitution", + "Language Reference (4D Doc Center)|no description given": "Langage (4D Doc Center)", "Users and Groups|no description given": "Groupes et utilisateurs", + "https://doc.4d.com/4Dv18/4D/18.4/4D-Language-Reference.100-5232397.en.html|no description given": "https://doc.4d.com/4Dv18/4D/18.4/4D-Language-Reference.100-5232397.fe.html", "Getting started|no description given": "Prise en main", "Developing a Desktop application|no description given": "Développer une application Desktop", "Developing a Web application|no description given": "Développer une application web", diff --git a/website/i18n/ja.json b/website/i18n/ja.json index 54b05c9487740a..243a68145e2f9e 100644 --- a/website/i18n/ja.json +++ b/website/i18n/ja.json @@ -6,19 +6,19 @@ "tagline": " 4D 開発リファレンス", "docs": { "Backup/backup": { - "title": "Backup" + "title": "バックアップ" }, "Backup/log": { - "title": "Log file (.journal)" + "title": "ログファイル (.journal)" }, "Backup/overview": { "title": "概要" }, "Backup/restore": { - "title": "Restore" + "title": "復元" }, "Backup/settings": { - "title": "Backup Settings" + "title": "バックアップ設定" }, "Concepts/about": { "title": "4D ランゲージについて" @@ -57,7 +57,7 @@ "title": "数値 (実数、倍長整数、整数)" }, "Concepts/object": { - "title": "Objects" + "title": "オブジェクト" }, "Concepts/picture": { "title": "ピクチャー" @@ -145,64 +145,64 @@ "title": "リストボックス" }, "FormObjects/pictureButtonOverview": { - "title": "Picture Button" + "title": "ピクチャーボタン" }, "FormObjects/picturePopupMenuOverview": { - "title": "Picture Pop-up Menu" + "title": "ピクチャーポップアップメニュー" }, "FormObjects/pluginAreaOverview": { - "title": "Plug-in Area" + "title": "プラグインエリア" }, "FormObjects/progressIndicator": { - "title": "Progress Indicator" + "title": "進捗インジケーター" }, "FormObjects/propertiesAction": { - "title": "動作" + "title": "アクション" }, "FormObjects/propertiesAnimation": { - "title": "Animation" + "title": "アニメーション" }, "FormObjects/propertiesAppearance": { "title": "アピアランス" }, "FormObjects/propertiesBackgroundAndBorder": { - "title": "Background and Border" + "title": "背景色と境界線" }, "FormObjects/propertiesCoordinatesAndSizing": { - "title": "Coordinates & Sizing" + "title": "座標とサイズ" }, "FormObjects/propertiesCrop": { - "title": "Crop" + "title": "行列数" }, "FormObjects/propertiesDataSource": { "title": "データソース" }, "FormObjects/propertiesDisplay": { - "title": "Display" + "title": "表示" }, "FormObjects/propertiesEntry": { - "title": "Entry" + "title": "入力" }, "FormObjects/propertiesFooters": { - "title": "Footers" + "title": "フッター" }, "FormObjects/propertiesGridlines": { - "title": "Gridlines" + "title": "グリッド線" }, "FormObjects/propertiesHeaders": { - "title": "Headers" + "title": "ヘッダー" }, "FormObjects/propertiesHelp": { "title": "ヘルプ" }, "FormObjects/propertiesHierarchy": { - "title": "Hierarchy" + "title": "階層" }, "FormObjects/propertiesListBox": { "title": "リストボックス" }, "FormObjects/propertiesObject": { - "title": "Objects" + "title": "オブジェクト" }, "FormObjects/propertiesPicture": { "title": "ピクチャー" @@ -211,22 +211,22 @@ "title": "プラグイン" }, "FormObjects/propertiesPrint": { - "title": "Print" + "title": "印刷" }, "FormObjects/propertiesRangeOfValues": { - "title": "Range of Values" + "title": "値の範囲" }, "FormObjects/propertiesReference": { - "title": "JSON property list" + "title": "JSON プロパティリスト" }, "FormObjects/propertiesResizingOptions": { - "title": "Resizing Options" + "title": "リサイズオプション" }, "FormObjects/propertiesScale": { - "title": "Scale" + "title": "スケール" }, "FormObjects/propertiesSubform": { - "title": "Subform" + "title": "サブフォーム" }, "FormObjects/propertiesText": { "title": "テキスト" @@ -235,101 +235,104 @@ "title": "テキスト、ピクチャー" }, "FormObjects/propertiesWebArea": { - "title": "Web Area" + "title": "Webエリア" }, "FormObjects/radiobuttonOverview": { - "title": "Radio Button" + "title": "ラジオボタン" }, "FormObjects/ruler": { - "title": "Ruler" + "title": "ルーラー" }, "FormObjects/shapesOverview": { - "title": "Shapes" + "title": "図形" }, "FormObjects/spinner": { - "title": "Spinner" + "title": "スピナー" }, "FormObjects/splitters": { - "title": "Splitter" + "title": "スプリッター" }, "FormObjects/staticPicture": { - "title": "Static picture" + "title": "スタティックピクチャー" }, "FormObjects/stepper": { - "title": "Stepper" + "title": "ステッパー" }, "FormObjects/subformOverview": { - "title": "Subform" + "title": "サブフォーム" }, "FormObjects/tabControl": { - "title": "Tab Controls" + "title": "タブコントロール" }, "FormObjects/text": { "title": "テキスト" }, - "FormObjects/viewProAreaOverview": { - "title": "4D View Pro area" + "FormObjects/viewProArea_overview": { + "title": "4D View Pro エリア" }, "FormObjects/webAreaOverview": { - "title": "Web Area" + "title": "Webエリア" + }, + "FormObjects/writeProArea_overview": { + "title": "4D Write Pro エリア" }, - "FormObjects/writeProAreaOverview": { - "title": "4D Write Pro area" + "GettingStarted/installation": { + "title": "インストールとアクティベーション" }, "Menus/bars": { - "title": "Menu bar features" + "title": "メニューバーの管理" }, "Menus/creating": { - "title": "Creating menus and menu bars" + "title": "メニューとメニューバーの作成" }, "Menus/overview": { "title": "概要" }, "Menus/properties": { - "title": "Menu item properties" + "title": "メニュープロパティ" }, "Menus/sdi": { - "title": "SDI mode on Windows" + "title": "Windows での SDIモード" }, "MSC/analysis": { - "title": "Activity analysis Page", - "sidebar_label": "Activity analysis Page" + "title": "ログ解析ページ", + "sidebar_label": "ログ解析ページ" }, "MSC/backup": { - "title": "Backup Page", - "sidebar_label": "Backup Page" + "title": "バックアップページ", + "sidebar_label": "バックアップページ" }, "MSC/compact": { - "title": "Compact Page", - "sidebar_label": "Compact Page" + "title": "圧縮ページ", + "sidebar_label": "圧縮ページ" }, "MSC/encrypt": { - "title": "Encrypt Page", - "sidebar_label": "Encrypt Page" + "title": "暗号化ページ", + "sidebar_label": "暗号化ページ" }, "MSC/information": { - "title": "Information Page", - "sidebar_label": "Information Page" + "title": "情報ページ", + "sidebar_label": "情報ページ" }, "MSC/overview": { "title": "概要", "sidebar_label": "概要" }, "MSC/repair": { - "title": "Repair Page", - "sidebar_label": "Repair Page" + "title": "修復ページ", + "sidebar_label": "修復ページ" }, "MSC/restore": { - "title": "Restore Page", - "sidebar_label": "Restore Page" + "title": "復元ページ", + "sidebar_label": "復元ページ" }, "MSC/rollback": { - "title": "Rollback Page", - "sidebar_label": "Rollback Page" + "title": "ロールバックページ", + "sidebar_label": "ロールバックページ" }, "MSC/verify": { - "title": "Verify Page", - "sidebar_label": "Verify Page" + "title": "検査ページ", + "sidebar_label": "検査ページ" }, "Project/architecture": { "title": "4D プロジェクトのアーキテクチャー" @@ -422,66 +425,71 @@ "title": "$version" }, "REST/authUsers": { - "title": "Users and sessions" + "title": "ユーザーとセッション" }, "REST/configuration": { - "title": "Server Configuration" + "title": "サーバー設定" }, "REST/genInfo": { - "title": "Getting Server Information" + "title": "サーバー情報の取得" }, "REST/gettingStarted": { "title": "はじめに" }, "REST/manData": { - "title": "Manipulating Data" + "title": "データ操作" }, "REST/REST_requests": { - "title": "About REST Requests" + "title": "RESTリクエストについて" }, "Users/editing": { - "title": "Managing 4D users and groups" + "title": "4Dユーザー&グループの管理" }, "Users/overview": { "title": "概要" } }, "links": { - "v18 R3 BETA": "v18 R3 BETA", - "v18 R2": "v18 R2", + "v19 R3 BETA": "v19 R3 BETA", + "v19 R2": "v19 R2", + "v19": "v19", "v18": "v18" }, "categories": { + "Getting Started": "はじめに", "4D Language Concepts": "ランゲージのコンセプト", "Project Databases": "プロジェクトデータベース", "Form Editor": "フォームエディター", "Form Objects": "フォームオブジェクト", - "Form Object Properties": "Form Object Properties", - "Menus": "Menus", + "Form Object Properties": "フォームオブジェクトプロパティ", + "Menus": "メニュー", "MSC": "MSC", - "Backup and Restore": "Backup and Restore", - "Users and Groups": "Users and Groups", - "REST Server": "REST Server" + "Backup and Restore": "バックアップと復元", + "Users and Groups": "ユーザー&グループ", + "REST Server": "REST サーバー" } }, "pages-strings": { - "Language Concepts|in index page Getting started": "Language Concepts", - "Project databases|in index page Getting started": "Project databases", + "Installation and activation|in index page Getting started": "インストールとアクティベーション", + "Language Concepts|in index page Getting started": "ランゲージのコンセプト", + "Project databases|in index page Getting started": "プロジェクトデータベース", "Form Editor|no description given": "フォームエディター", - "Form Events|no description given": "Form Events", + "Form Events|no description given": "フォームイベント", "Form Objects|no description given": "フォームオブジェクト", - "Form Object Properties|no description given": "Form Object Properties", - "Menus|no description given": "Menus", - "Web Server|no description given": "Web Server", - "REST Server|no description given": "REST Server", - "Maintenance and Security Center|no description given": "Maintenance & Security Center", - "Backup and Restore|no description given": "Backup and Restore", - "Users and Groups|no description given": "Users and Groups", + "Form Object Properties|no description given": "フォームオブジェクトプロパティ", + "Menus|no description given": "メニュー", + "Web Server|no description given": "Web サーバー", + "REST Server|no description given": "REST サーバー", + "Maintenance and Security Center|no description given": "メンテナンス&セキュリティセンター", + "Backup and Restore|no description given": "バックアップと復元", + "Language Reference (4D Doc Center)|no description given": "ランゲージリファレンス (4D Doc Center)", + "Users and Groups|no description given": "ユーザー&グループ", + "https://doc.4d.com/4Dv18/4D/18.4/4D-Language-Reference.100-5232397.en.html|no description given": "https://doc.4d.com/4Dv18/4D/18.4/4D-Language-Reference.100-5232397.ja.html", "Getting started|no description given": "はじめに", "Developing a Desktop application|no description given": "デスクトップアプリの開発", "Developing a Web application|no description given": "Web アプリの開発", "Developing a Mobile application|no description given": "モバイルアプリの開発", - "Administration|no description given": "データベース管理", + "Administration|no description given": "管理", "Help Translate|recruit community translators for your project": "翻訳を手伝う", "Edit this Doc|recruitment message asking to edit the doc source": "編集", "Translate this Doc|recruitment message asking to translate the docs": "翻訳" diff --git a/website/i18n/pt.json b/website/i18n/pt.json index 60f38bafe9c389..279601dbfa9d99 100644 --- a/website/i18n/pt.json +++ b/website/i18n/pt.json @@ -1,124 +1,124 @@ { - "_comment": "This file is auto-generated by write-translations.js", + "_comment": "Este arquivo é gerado automaticamente por write-translations.js", "localized-strings": { - "next": "Next", - "previous": "Previous", - "tagline": "Documentation for 4D Developers", + "next": "Próximo", + "previous": "Anterior", + "tagline": "Documentação para Desenvolvedores 4D", "docs": { "Backup/backup": { "title": "Backup" }, "Backup/log": { - "title": "Log file (.journal)" + "title": "Arquivo de Log (.journal)" }, "Backup/overview": { - "title": "Overview" + "title": "Visão Geral" }, "Backup/restore": { - "title": "Restore" + "title": "Restaurar" }, "Backup/settings": { - "title": "Backup Settings" + "title": "Configurações de Cópia de segurança" }, "Concepts/about": { - "title": "About the 4D Language" + "title": "Sobre a linguagem 4D" }, "Concepts/arrays": { "title": "Arrays" }, "Concepts/branching": { - "title": "Branching structures" + "title": "Estruturas condicionais" }, "Concepts/looping": { - "title": "Looping structures" + "title": "Estruturas de loop" }, "Concepts/components": { - "title": "Components" + "title": "Componentes" }, "Concepts/data-types": { - "title": "Data types overview" + "title": "Tipos de dados" }, "Concepts/blob": { "title": "BLOB" }, "Concepts/boolean": { - "title": "Boolean" + "title": "Booleano" }, "Concepts/collection": { "title": "Collection" }, "Concepts/date": { - "title": "Date" + "title": "Data" }, "Concepts/null-undefined": { - "title": "Null and Undefined" + "title": "Null e indefinido" }, "Concepts/number": { "title": "Number (Real, Longint, Integer)" }, "Concepts/object": { - "title": "Objects" + "title": "Objetos" }, "Concepts/picture": { - "title": "Picture" + "title": "Imagem" }, "Concepts/pointer": { - "title": "Pointer" + "title": "Ponteiro" }, "Concepts/string": { "title": "String" }, "Concepts/time": { - "title": "Time" + "title": "Hora" }, "Concepts/variant": { "title": "Variant" }, "Concepts/error-handling": { - "title": "Error handling" + "title": "Gestão de erros" }, "Concepts/control-flow": { - "title": "Control flow overview" + "title": "Condições e loops" }, "Concepts/identifiers": { - "title": "Identifiers" + "title": "Identificadores" }, "Concepts/interpreted-compiled": { - "title": "Interpreted and Compiled modes" + "title": "Modos interpretado e compilado" }, "Concepts/methods": { - "title": "Methods" + "title": "Métodos" }, "Concepts/parameters": { - "title": "Parameters" + "title": "Parâmetros" }, "Concepts/plug-ins": { "title": "Plug-ins" }, "Concepts/quick-tour": { - "title": "A Quick Tour", - "sidebar_label": "A Quick Tour" + "title": "Visão Rápida", + "sidebar_label": "Visão Rápida" }, "Concepts/shared": { - "title": "Shared objects and collections" + "title": "Objetos e coleções compartilhados" }, "Concepts/variables": { - "title": "Variables" + "title": "Variáveis" }, "FormEditor/stylesheets": { - "title": "Style sheets" + "title": "Folhas de estilo" }, "FormEditor/objectLibrary": { - "title": "Object libraries" + "title": "Bibliotecas de objetos" }, "FormEditor/pictures": { - "title": "Pictures" + "title": "Imagens" }, "FormObjects/buttonOverview": { - "title": "Button" + "title": "Botão" }, "FormObjects/buttonGridOverview": { - "title": "Button Grid" + "title": "Grade de botões" }, "FormObjects/checkboxOverview": { "title": "Check Box" @@ -127,16 +127,16 @@ "title": "Combo Box" }, "FormObjects/dropdownListOverview": { - "title": "Drop-down List" + "title": "Lista suspensa ou drop down" }, "FormObjects/formObjectsOverview": { - "title": "About 4D Form Objects" + "title": "Sobre os objetos formulários 4D" }, "FormObjects/groupBox": { - "title": "Group Box" + "title": "Área de grupo" }, "FormObjects/inputOverview": { - "title": "Input" + "title": "Entrada" }, "FormObjects/listOverview": { "title": "Hierarchical List" @@ -157,13 +157,13 @@ "title": "Progress Indicator" }, "FormObjects/propertiesAction": { - "title": "Action" + "title": "Ação" }, "FormObjects/propertiesAnimation": { - "title": "Animation" + "title": "Animação" }, "FormObjects/propertiesAppearance": { - "title": "Appearance" + "title": "Aparência" }, "FormObjects/propertiesBackgroundAndBorder": { "title": "Background and Border" @@ -175,13 +175,13 @@ "title": "Crop" }, "FormObjects/propertiesDataSource": { - "title": "Data Source" + "title": "Fonte de dados" }, "FormObjects/propertiesDisplay": { - "title": "Display" + "title": "Visualização" }, "FormObjects/propertiesEntry": { - "title": "Entry" + "title": "Entrada" }, "FormObjects/propertiesFooters": { "title": "Footers" @@ -190,10 +190,10 @@ "title": "Gridlines" }, "FormObjects/propertiesHeaders": { - "title": "Headers" + "title": "Cabeçalhos" }, "FormObjects/propertiesHelp": { - "title": "Help" + "title": "Ajuda" }, "FormObjects/propertiesHierarchy": { "title": "Hierarchy" @@ -202,16 +202,16 @@ "title": "List Box" }, "FormObjects/propertiesObject": { - "title": "Objects" + "title": "Objetos" }, "FormObjects/propertiesPicture": { - "title": "Picture" + "title": "Imagem" }, "FormObjects/propertiesPlugIns": { "title": "Plug-ins" }, "FormObjects/propertiesPrint": { - "title": "Print" + "title": "Imprimir" }, "FormObjects/propertiesRangeOfValues": { "title": "Range of Values" @@ -223,19 +223,19 @@ "title": "Resizing Options" }, "FormObjects/propertiesScale": { - "title": "Scale" + "title": "Escala" }, "FormObjects/propertiesSubform": { "title": "Subform" }, "FormObjects/propertiesText": { - "title": "Text" + "title": "Texto" }, "FormObjects/propertiesTextAndPicture": { "title": "Text and Picture" }, "FormObjects/propertiesWebArea": { - "title": "Web Area" + "title": "Área Web" }, "FormObjects/radiobuttonOverview": { "title": "Radio Button" @@ -244,13 +244,13 @@ "title": "Ruler" }, "FormObjects/shapesOverview": { - "title": "Shapes" + "title": "Formas" }, "FormObjects/spinner": { "title": "Spinner" }, "FormObjects/splitters": { - "title": "Splitter" + "title": "Separador" }, "FormObjects/staticPicture": { "title": "Static picture" @@ -265,86 +265,89 @@ "title": "Tab Controls" }, "FormObjects/text": { - "title": "Text" + "title": "Texto" }, - "FormObjects/viewProAreaOverview": { - "title": "4D View Pro area" + "FormObjects/viewProArea_overview": { + "title": "Área 4D View Pro" }, "FormObjects/webAreaOverview": { - "title": "Web Area" + "title": "Área Web" }, - "FormObjects/writeProAreaOverview": { + "FormObjects/writeProArea_overview": { "title": "4D Write Pro area" }, + "GettingStarted/installation": { + "title": "Instalação e ativação" + }, "Menus/bars": { - "title": "Menu bar features" + "title": "Barras de menus" }, "Menus/creating": { - "title": "Creating menus and menu bars" + "title": "Criação de menus e barras de menus" }, "Menus/overview": { - "title": "Overview" + "title": "Visão Geral" }, "Menus/properties": { - "title": "Menu item properties" + "title": "Propriedades dos menus" }, "Menus/sdi": { - "title": "SDI mode on Windows" + "title": "Modo SDI em Windows" }, "MSC/analysis": { - "title": "Activity analysis Page", - "sidebar_label": "Activity analysis Page" + "title": "Página análise de atividades", + "sidebar_label": "Página análise de atividades" }, "MSC/backup": { - "title": "Backup Page", - "sidebar_label": "Backup Page" + "title": "Página de Backup", + "sidebar_label": "Página de Backup" }, "MSC/compact": { - "title": "Compact Page", - "sidebar_label": "Compact Page" + "title": "Página compactado", + "sidebar_label": "Página compactado" }, "MSC/encrypt": { - "title": "Encrypt Page", - "sidebar_label": "Encrypt Page" + "title": "Página de criptografia", + "sidebar_label": "Página de criptografia" }, "MSC/information": { - "title": "Information Page", - "sidebar_label": "Information Page" + "title": "Página de informação", + "sidebar_label": "Página de informação" }, "MSC/overview": { - "title": "Overview", - "sidebar_label": "Overview" + "title": "Visão Geral", + "sidebar_label": "Visão Geral" }, "MSC/repair": { - "title": "Repair Page", - "sidebar_label": "Repair Page" + "title": "Página de reparação", + "sidebar_label": "Página de reparação" }, "MSC/restore": { - "title": "Restore Page", - "sidebar_label": "Restore Page" + "title": "Página de reparação", + "sidebar_label": "Página de reparação" }, "MSC/rollback": { - "title": "Rollback Page", - "sidebar_label": "Rollback Page" + "title": "Página Retrocesso", + "sidebar_label": "Página Retrocesso" }, "MSC/verify": { - "title": "Verify Page", - "sidebar_label": "Verify Page" + "title": "Página Verificação", + "sidebar_label": "Página Verificação" }, "Project/architecture": { - "title": "Architecture of a 4D project" + "title": "Arquitetura de um projeto 4D" }, "Project/building": { - "title": "Building a project package" + "title": "Construir um pacote de projeto" }, "Project/creating": { - "title": "Creating a 4D project" + "title": "Criar um projeto 4D" }, "Project/developing": { - "title": "Developing a project" + "title": "Desenvolver um projeto" }, "Project/overview": { - "title": "Overview" + "title": "Visão Geral" }, "REST/{dataClass}": { "title": "{dataClass}" @@ -428,45 +431,48 @@ "title": "Server Configuration" }, "REST/genInfo": { - "title": "Getting Server Information" + "title": "Obter informação do servidor" }, "REST/gettingStarted": { - "title": "Getting Started" + "title": "Começando" }, "REST/manData": { - "title": "Manipulating Data" + "title": "Manipulação de dados" }, "REST/REST_requests": { - "title": "About REST Requests" + "title": "Sobre petições REST" }, "Users/editing": { - "title": "Managing 4D users and groups" + "title": "Gestão de usuários e grupos 4D" }, "Users/overview": { - "title": "Overview" + "title": "Visão Geral" } }, "links": { - "v18 R3 BETA": "v18 R3 BETA", - "v18 R2": "v18 R2", + "v19 R3 BETA": "v19 R3 BETA", + "v19 R2": "v19 R2", + "v19": "v19", "v18": "v18" }, "categories": { + "Getting Started": "Começando", "4D Language Concepts": "4D Language Concepts", - "Project Databases": "Project Databases", + "Project Databases": "Bancos de dados Projeto", "Form Editor": "Form Editor", "Form Objects": "Form Objects", "Form Object Properties": "Form Object Properties", "Menus": "Menus", - "MSC": "MSC", + "MSC": "CSM", "Backup and Restore": "Backup and Restore", - "Users and Groups": "Users and Groups", + "Users and Groups": "Usuários e grupos", "REST Server": "REST Server" } }, "pages-strings": { + "Installation and activation|in index page Getting started": "Instalação e ativação", "Language Concepts|in index page Getting started": "Language Concepts", - "Project databases|in index page Getting started": "Project databases", + "Project databases|in index page Getting started": "Bancos de dados projeto", "Form Editor|no description given": "Form Editor", "Form Events|no description given": "Form Events", "Form Objects|no description given": "Form Objects", @@ -476,14 +482,16 @@ "REST Server|no description given": "REST Server", "Maintenance and Security Center|no description given": "Maintenance and Security Center", "Backup and Restore|no description given": "Backup and Restore", - "Users and Groups|no description given": "Users and Groups", + "Language Reference (4D Doc Center)|no description given": "Language Reference (4D Doc Center)", + "Users and Groups|no description given": "Usuários e grupos", + "https://doc.4d.com/4Dv18/4D/18.4/4D-Language-Reference.100-5232397.en.html|no description given": "https://doc.4d.com/4Dv18/4D/18.4/4D-Language-Reference.100-5232397.en.html", "Getting started|no description given": "Getting started", - "Developing a Desktop application|no description given": "Developing a Desktop application", - "Developing a Web application|no description given": "Developing a Web application", - "Developing a Mobile application|no description given": "Developing a Mobile application", + "Developing a Desktop application|no description given": "Desenvolver uma aplicação Desktop", + "Developing a Web application|no description given": "Desenvolver uma aplicação Web", + "Developing a Mobile application|no description given": "Desenvolver uma aplicação Móvel", "Administration|no description given": "Administration", "Help Translate|recruit community translators for your project": "Help Translate", - "Edit this Doc|recruitment message asking to edit the doc source": "Edit", - "Translate this Doc|recruitment message asking to translate the docs": "Translate" + "Edit this Doc|recruitment message asking to edit the doc source": "Editar", + "Translate this Doc|recruitment message asking to translate the docs": "Traduzir" } } diff --git a/website/pages/en/index.js b/website/pages/en/index.js index fba57846e1699f..66e69f4fb27a93 100644 --- a/website/pages/en/index.js +++ b/website/pages/en/index.js @@ -37,6 +37,7 @@ class Index extends React.Component { const {config: siteConfig, language = 'en'} = this.props; const pinnedUsersToShowcase = siteConfig.users.filter(user => user.pinned); var subContents={ + installation: Installation and activation, languageConcepts: Language Concepts, projectDatabases: Project databases, formEditor: Form Editor, @@ -48,11 +49,13 @@ class Index extends React.Component { restServer: REST Server, msc: Maintenance and Security Center, backup: Backup and Restore, - users: Users and Groups + langRef: Language Reference (4D Doc Center), + users: Users and Groups, + langUrl: https://doc.4d.com/4Dv18/4D/18.4/4D-Language-Reference.100-5232397.en.html }; - - + + return (

@@ -62,7 +65,10 @@ class Index extends React.Component { align="left" contents={[ { - content: `[${subContents.languageConcepts}](${siteConfig.baseUrl}${this.props.language}/Concepts/about.html)
[${subContents.projectDatabases}](${siteConfig.baseUrl}${this.props.language}/Project/overview.html)`, + content: `[${subContents.installation}](${siteConfig.baseUrl}${this.props.language}/GettingStarted/installation.html)
+ [${subContents.languageConcepts}](${siteConfig.baseUrl}${this.props.language}/Concepts/about.html)
+ [${subContents.langRef}](${subContents.langUrl})
+ [${subContents.projectDatabases}](${siteConfig.baseUrl}${this.props.language}/Project/overview.html)`, image: `${siteConfig.baseUrl}img/illu_GettingStarted.png`, imageAlign: 'top', imageAlt: 'Get started', diff --git a/website/sidebars.json b/website/sidebars.json index fbae586517c4b8..331932b78c255e 100644 --- a/website/sidebars.json +++ b/website/sidebars.json @@ -1,8 +1,8 @@ { "docs": { - "4D Language Concepts": [ - "Concepts/about", - "Concepts/quick-tour", + "Getting Started":["GettingStarted/installation"], + "4D Language Concepts": + ["Concepts/about","Concepts/quick-tour", { "type": "subcategory", "label": "Data Types", diff --git a/website/siteConfig.js b/website/siteConfig.js index e64bf7a0673458..0418c99093973e 100644 --- a/website/siteConfig.js +++ b/website/siteConfig.js @@ -46,9 +46,10 @@ const siteConfig = { //{doc: 'Concepts/about', label: 'Docs'}, //{doc: 'REST/gettingStarted', label: 'REST'}, - {href: 'https://developer.4d.com/docs', label:'v18 R3 BETA'}, - {href: 'https://developer.4d.com/docs/Rx', label:'v18 R2'}, - {href: 'https://developer.4d.com/docs/18', label:'v18'}, + {href: 'https://developer.4d.com/docs', label:'v19 R6 BETA', version :'19R6'}, + {href: 'https://developer.4d.com/docs/Rx', label:'v19 R5', version :'19R5'}, + {href: 'https://developer.4d.com/docs/19', label:'v19', version :'19'}, + {href: 'https://developer.4d.com/docs/18', label:'v18', version :'18'}, //{href: 'http://kb.4d.com/', label: 'knowledgebase'}, //{page: 'help', label: 'Help'}, //{blog: false, label: 'Blog'}, @@ -58,9 +59,13 @@ const siteConfig = { users, algolia: { - apiKey: '2f94e2c8270ac2b1db0c23691592fb10', + //apiKey: '2f94e2c8270ac2b1db0c23691592fb10', + apiKey: '5f22ebbb9382abafeadc3e86ca47d4af', + appId: 'OJ04C0M3CU', indexName: '4d', - algoliaOptions: {}, // Optional, if provided by Algolia + algoliaOptions: { + facetFilters: ['language:LANGUAGE', 'version:VERSION'], + }, lineheight: '30px' }, @@ -83,7 +88,7 @@ const siteConfig = { }, - editUrl: 'https://github.com/4D/docs/edit/develop/docs/', + editUrl: 'https://github.com/4D/docs/edit/18/docs/', /* custom fonts for website */ /*fonts: { @@ -113,9 +118,10 @@ const siteConfig = { }, // Add custom scripts here that would be placed in -Today is:
+今日は:
``` #### 例題 2 -The 4D project method `calcSum` receives parameters (`$1...$n`) and returns their sum in `$0`: +`calcSum` という 4Dプロジェクトメソッドがあり、そのメソッドが (``$1...$n) という引数を受け取り、その合計を `$0` に返すという場合について考えます。 -4D code of `calcSum` method: +`calcSum` メソッドの 4Dコードです: ```4d - C_REAL(${1}) // receives n REAL type parameters - C_REAL($0) // returns a Real + C_REAL(${1}) // n個の実数型引数を受け取ります + C_REAL($0) // 実数の値を返します C_LONGINT($i;$n) $n:=Count parameters For($i;1;$n) @@ -114,22 +109,24 @@ The 4D project method `calcSum` receives parameters (`$1...$n`) and returns thei End for ``` -The JavaScript code run in the Web area is: +Webエリア内で実行される JavaScript コードです: ```js $4d.calcSum(33, 45, 75, 102.5, 7, function(dollarZero) { - var result = dollarZero // result is 262.5 + var result = dollarZero // 結果は 262.5 です }); ``` -## Standard actions -Four specific standard actions are available for managing Web areas automatically: `Open Back URL`, `Open Next URL`, `Refresh Current URL` and `Stop Loading URL`. These actions can be associated with buttons or menu commands and allow quick implementation of basic Web interfaces. These actions are described in [Standard actions](https://doc.4d.com/4Dv17R6/4D/17-R6/Standard-actions.300-4354791.en.html). +## 標準アクション -## Form events +Webエリアを自動で管理するために、4つの特別な自動アクション (`openBackURL`、`openForwardURL`、`refreshCurrentURL`、そして `stopLoadingURL`) を使用できます。 ボタンやメニューコマンドにこれらのアクションを割り当てることで、基本の Webインターフェースを素早く実装できます。 これらのアクションについては [標準アクション](https://doc.4d.com/4Dv18/4D/18/Standard-actions.300-4575620.ja.html) で説明しています。 -Specific form events are intended for programmed management of Web areas, more particularly concerning the activation of links: + +## フォームイベント + +特定のフォームイベントは、Webエリアをプログラミングで管理するこを目的としています。すなわち、リンクの起動に関連しています: - `On Begin URL Loading` - `On URL Resource Loading` @@ -139,66 +136,70 @@ Specific form events are intended for programmed management of Web areas, more p - `On Open External Link` - `On Window Opening Denied` -In addition, Web areas support the following generic form events: +更に、Webエリアは以下の汎用フォームイベントをサポートしています: - `On Load` - `On Unload` - `On Getting Focus` - `On Losing Focus` -## Web area rules - -### User interface - -When the form is executed, standard browser interface functions are available to the user in the Web area, which permit interaction with other form areas: -- **Edit menu commands**: When the Web area has the focus, the **Edit** menu commands can be used to carry out actions such as copy, paste, select all, etc., according to the selection. -- **Context menu**: It is possible to use the standard [context menu](properties_Entry.md#context-menu) of the system with the Web area. Display of the context menu can be controlled using the `WA SET PREFERENCE` command. -- **Drag and drop**: The user can drag and drop text, pictures and documents within the Web area or between a Web area and the 4D form objects, according to the 4D object properties. For security reasons, changing the contents of a Web area by means of dragging and dropping a file or URL is not allowed by default. In this case, the mouse cursor displays a "forbidden" icon ![](assets/en/FormObjects/forbidden.png). You have to use the `WA SET PREFERENCE` command to explicitly allow the dropping of URLs or files in the area. +## Webエリアのルール -### Subforms +### ユーザーインターフェース -For reasons related to window redrawing mechanisms, the insertion of a Web area into a subform is subject to the following constraints: +フォームが実行されると、他のフォームエリアとの対話を可能にする、標準のブラウザーインタフェース機能が Web エリア内で利用可能になります。 -- The subform must not be able to scroll -- The limits of the Web area must not exceed the size of the subform +- **編集メニューコマンド**: Webエリアにフォーカスがあるとき、**編集** メニューコマンドを使用してコピーやペースト、すべてを選択などのアクションを選択に応じて実行できます。 +- **コンテキストメニュー**: Webエリアで、システム標準の [コンテキストメニュー](properties_Entry.md#コンテキストメニュー) を使用できます。 コンテキストメニューの表示は、`WA SET PREFERENCE` コマンドを使用することで管理可能です。 +- **ドラッグ&ドロップ**: 4D のオブジェクトプロパティに基づき、ユーザーは Webエリア内で、または Webエリアと 4Dフォームオブジェクト間で、テキストやピクチャー、ドキュメントをドラッグ&ドロップできます。 セキュリティ上の理由から、ファイルまたは URL のドラッグ&ドロップによって Webエリアのコンテンツを変更することは、デフォルトで禁止されています。 この場合、マウスカーソルは "禁止" アイコン ![](assets/en/FormObjects/forbidden.png) を表示します。 エリアへのファイルや URL のドロップを許可するには、`WA SET PREFERENCE` コマンドを使用して明示的にドロップを許可する必要があります。 -> Superimposing a Web area on top of or beneath other form objects is not supported. +### サブフォーム +ウィンドウの再描画機構に関わる理由から、サブフォームに Webエリアを挿入する場合には以下の制約がつきます: -### Web Area and Web server conflict (Windows) +- サブフォームをスクロール可能にしてはいけません。 +- Webエリアのサイズがサブフォームのサイズを超えてはいけません。 -Under Windows, it is not recommended to access, via a Web area, the Web server of the 4D application containing the area because this configuration could lead to a conflict that freezes the application. Of course, a remote 4D can access the Web server of 4D Server, but not its own Web server. +> 他のフォームオブジェクトの上や下に Webエリアを重ねることはサポートされていません。 -### Web plugins and Java applets -The use of Web plugins and Java applets is not recommended in Web areas because they may lead to instability in the operation of 4D, particularly at the event management level. +### Webエリアと Webサーバーのコンフリクト (Windows) +Windows においては、Webエリアから、同じ 4Dアプリケーションで起動中の Webサーバーへのアクセスはお勧めできません。これをおこなうとコンフリクトが発生し、アプリケーションがフリーズすることがあります。 もちろん、リモートの 4D から 4D Server の Webサーバーにアクセスすることはできます。自身の Webサーバーにアクセスできないということです。 -### Insertion of protocol (macOS) +### Webプラグインと Javaアプレット +Webエリアにおける Webプラグインおよび Javaアプレットの使用は推奨されていません。これらは、とくにイベント管理レベルにおいて 4D の動作を不安定にさせる可能性があります。 -The URLs handled by programming in Web areas under macOS must begin with the protocol. For example, you need to pass the string "http://www.mysite.com" and not just "www.mysite.com". +### プロトコルの挿入 (macOS) +macOS 上の Webエリアで、プログラムにより処理される URL は、プロトコルで開始されていなければなりません。 つまり、"www.mysite.com" ではな、"http://www.mysite.com" 文字列を渡さなければならないということです。 -## Access to Web inspector -You can view and use a Web inspector within Web areas of your forms. The Web inspector is a debugger which is provided by the embedded Web engine. It allows to parse the code and the flow of information of the Web pages. +## Webインスペクターへのアクセス +フォームのWeb エリア内において、Webインスペクターを見たり使用したりすることができます。 Webインスペクターは、埋め込みWebエンジンによって提供されているデバッガーです。 Webページの情報の、コードとフローを解析します。 -### Displaying the Web inspector +### Webインスペクターの表示 +Webエリア内に Webインスペクターを表示するには、次の条件を満たしていなければなりません: -The following conditions must be met in order to view the Web inspector in a Web area: - -- You must [select the embedded Web rendering engine](properties_WebArea.md#use-embedded-web-rendering-engine) for the area (the Web inspector is only available with this configuration). -- You must enable the [context menu](properties_Entry.md#context-menu) for the area (this menu is used to call the inspector) -- You must expressly enable the use of the inspector in the area by means of the following statement: +- エリアに対して [埋め込みWebレンダリングエンジン](properties_WebArea.md#埋め込みwebレンダリングエンジンを使用) が選択されている (Webインスペクターはこの設定でのみ利用可能です)。 +- エリアに対して [コンテキストメニュー](properties_Entry.md#コンテキストメニュー) が有効化されている (インスペクターを呼び出すのにこのメニューを使用します)。 +- インスペクターの使用が、以下の宣言を用いて明示的に有効化されている: ```4d WA SET PREFERENCE(*;"WA";WA enable Web inspector;True) ``` -### Using the Web inspector +### Webインスペクターの使用 +上記のとおり設定を完了すると、エリア内のコンテキストメニュー内に **要素を調査** という新しいオプションが追加されているはずです: この項目を選択すると、Webインスペクターウィンドウが表示されます。 + +> この Webインスペクターは、埋め込みWebレンダリングエンジンに含まれています。 このデバッガーの機能の詳細に関しては、Webレンダリングエンジンにより提供されているドキュメントを参照してください。 + -When you have done the settings as described above, you then have new options such as **Inspect Element** in the context menu of the area. When you select this option, the Web inspector window is displayed. -> The Web inspector is included in the embedded Web rendering engine. For a detailed description of the features of this debugger, refer to the documentation provided by the Web rendering engine. ## プロパティ一覧 -[Border Line Style](properties_BackgroundAndBorder.md#border-line-style) - [Bottom](properties_CoordinatesAndSizing.md#bottom) - [Class](properties_Object.md#css-class) - [Context Menu](properties_Entry.md#context-menu) - [Height](properties_CoordinatesAndSizing.md#height) - [Horizontal Sizing](properties_ResizingOptions.md#horizontal-sizing) - [Left](properties_CoordinatesAndSizing.md#left) - [Method](properties_Action.md#method) - [Object Name](properties_Object.md#object-name) - [Progression](properties_WebArea.md#progression) - [Right](properties_CoordinatesAndSizing.md#right) - [Top](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [URL](properties_WebArea.md#url) - [Use embedded Web rendering engine](properties_WebArea.md#use-embedded-web-rendering-engine) - [Variable or Expression](properties_Object.md#variable-or-expression) - [Vertical Sizing](properties_ResizingOptions.md#vertical-sizing) - [Visibilty](properties_Display.md#visibility) - [Width](properties_CoordinatesAndSizing.md#width) \ No newline at end of file +[タイプ](properties_Object.md#タイプ) - [オブジェクト名](properties_Object.md#オブジェクト名) - [変数あるいは式](properties_Object.md#変数あるいは式) - [CSSクラス](properties_Object.md#cssクラス) - [左](properties_CoordinatesAndSizing.md#左) - [上](properties_CoordinatesAndSizing.md#上) - [右](properties_CoordinatesAndSizing.md#右) - [下](properties_CoordinatesAndSizing.md#下) - [幅](properties_CoordinatesAndSizing.md#幅) - [高さ](properties_CoordinatesAndSizing.md#高さ) - [横方向サイズ変更](properties_ResizingOptions.md#横方向サイズ変更) - [縦方向サイズ変更](properties_ResizingOptions.md#縦方向サイズ変更) - [コンテキストメニュー](properties_Entry.md#コンテキストメニュー) - [表示状態](properties_Display.md#表示状態) - [境界線スタイル](properties_BackgroundAndBorder.md#境界線スタイル) - [メソッド](properties_Action.md#メソッド) - [進捗状況変数](properties_WebArea.md#進捗状況変数) - [URL](properties_WebArea.md#url) - [埋め込みWebレンダリングエンジンを使用](properties_WebArea.md#埋め込みwebレンダリングエンジンを使用) + + + + + diff --git a/website/translated_docs/ja/FormObjects/writeProArea_overview.md b/website/translated_docs/ja/FormObjects/writeProArea_overview.md index 887b47c6f56ab4..bfb9fd96fbcf1f 100644 --- a/website/translated_docs/ja/FormObjects/writeProArea_overview.md +++ b/website/translated_docs/ja/FormObjects/writeProArea_overview.md @@ -1,16 +1,19 @@ --- id: writeProAreaOverview -title: 4D Write Pro area +title: 4D Write Pro エリア --- -4D Write Pro offers 4D users an advanced word-processing tool, fully integrated with your 4D database. Using 4D Write Pro, you can write pre-formatted emails and/or letters containing images, a scanned signature, formatted text and placeholders for dynamic variables. You can also create invoices or reports dynamically, including formatted text and images. +4D Write Pro は、4Dユーザーに対して、4Dデータベースに完全に統合した高度なワードプロセスツールを提供します。 4D Write Proを使用すれば、プリフォーマットされた Eメールや文章に画像、スキャン済みの署名、フォーマットされたテキストやダイナミック変数用のプレースホルダーなどを含めることができます。 また、請求書やレポートを動的に作成し、フォーマット済みのテキストや画像を含めることができます。 + ![](assets/en/FormObjects/writePro2.png) -## Using 4D Write Pro areas -4D Write Pro areas are documented in the [4D Write Pro Reference](https://doc.4d.com/4Dv17R6/4D/17-R6/4D-Write-Pro.100-4433851.fe.html) manual. +## 4D Write Pro エリアの使用 + +4D Write Pro についての詳細は [4D Write Pro リファレンス](https://doc.4d.com/4Dv18/4D/18/4D-Write-Pro-Reference.100-4522983.ja.html) マニュアルを参照ください。 ## プロパティ一覧 -[Auto Spellcheck](properties_Entry.md#auto-spellcheck) - [Border Line Style](properties_BackgroundAndBorder.md#border-line-style) - [Bottom](properties_CoordinatesAndSizing.md#bottom) - [Class](properties_Object.md#css-class) - [Context Menu](properties_Entry.md#context-menu) - [Enterable](properties_Entry.md#enterable) - [Focusable](properties_Entry.md#focusable) - [Height](properties_CoordinatesAndSizing.md#height) - [Hide focus rectangle](properties_Appearance.md#hide-focus-rectangle) - [Horizontal Scroll Bar](properties_Appearance.md#horizontal-scroll-bar) - [Horizontal Sizing](properties_ResizingOptions.md#horizontal-sizing) - [Keyboard Layout](properties_Entry.md#keyboard-layout) - [Left](properties_CoordinatesAndSizing.md#left) - [Method](properties_Action.md#method) - [Object Name](properties_Object.md#object-name) - [Print Variable Frame](properties_Print.md#print-frame) - [Resolution](properties_Appearance.md#resolution) - [Right](properties_CoordinatesAndSizing.md#right) - [Selection always visible](properties_Entry.md#selection-always-visible) - [Show background](properties_Appearance.md#show-background) - [Show footers](properties_Appearance.md#show-footers) - [Show Formula Bar](properties_Appearance.md#show-formula-bar) - [Show headers](properties_Appearance.md#show-headers) - [Show hidden characters](properties_Appearance.md#show-hidden-characters) - [Show horizontal ruler](properties_Appearance.md#show-horizontal-ruler) - [Show HTML WYSIWYG](properties_Appearance.md#show-html-wysiwyg) - [Show page frame](properties_Appearance.md#show-page-frame) - [Show references](properties_Appearance.md#show-references) - [Show vertical ruler](properties_Appearance.md#show-vertical-ruler) - [Type](properties_Object.md#type) - [User Interface](properties_Appearance.md#user-interface) - [Vertical Sizing](properties_ResizingOptions.md#vertical-sizing) - [Vertical Scroll Bar](properties_Appearance.md#vertical-scroll-bar) - [View mode](properties_Appearance.md#view-mode) - [Visibility](properties_Display.md#visibility) - [Width](properties_CoordinatesAndSizing.md#width) - [Zoom](properties_Appearance.md#zoom) \ No newline at end of file +[タイプ](properties_Object.md#タイプ) - [オブジェクト名](properties_Object.md#オブジェクト名) - [CSSクラス](properties_Object.md#cssクラス) - [左](properties_CoordinatesAndSizing.md#左) - [右](properties_CoordinatesAndSizing.md#右) - [下](properties_CoordinatesAndSizing.md#下) - [幅](properties_CoordinatesAndSizing.md#幅) - [高さ](properties_CoordinatesAndSizing.md#高さ) - [横方向サイズ変更](properties_ResizingOptions.md#横方向サイズ変更) - [縦方向サイズ変更](properties_ResizingOptions.md#縦方向サイズ変更) - [入力可](properties_Entry.md#入力可) - [フォーカス可](properties_Entry.md#フォーカス可) - [キーボードレイアウト](properties_Entry.md#キーボードレイアウト) - [自動スペルチェック](properties_Entry.md#自動スペルチェック) - [コンテキストメニュー](properties_Entry.md#コンテキストメニュー) - [選択を常に表示](properties_Entry.md#選択を常に表示) - [表示状態](properties_Display.md#表示状態) - [フォーカスの四角を隠す](properties_Appearance.md#フォーカスの四角を隠す) - [横スクロールバー](properties_Appearance.md#横スクロールバー) - [縦スクロールバー](properties_Appearance.md#縦スクロールバー) - [ユーザーインターフェース](properties_Appearance.md#ユーザーインターフェース) - [解像度](properties_Appearance.md#解像度) - [フォーミュラバーを表示](properties_Appearance.md#フォーミュラバーを表示) - [拡大](properties_Appearance.md#拡大) - [ビューモード](properties_Appearance.md#ビューモード) - [ページフレームを表示](properties_Appearance.md#ページフレームを表示) - [参照を表示](properties_Appearance.md#参照を表示) - [ヘッダーを表示](properties_Appearance.md#ヘッダーを表示) - [フッターを表示](properties_Appearance.md#フッターを表示) - [背景を表示](properties_Appearance.md#背景を表示) - [非表示文字を表示](properties_Appearance.md#非表示文字を表示) - [HTML WYSIWYG 表示](properties_Appearance.md#html-wysiwyg-表示) - [水平ルーラーを表示](properties_Appearance.md#水平ルーラーを表示) - [垂直ルーラーを表示](properties_Appearance.md#垂直ルーラーを表示) - [境界線スタイル](properties_BackgroundAndBorder.md#境界線スタイル) - [印刷時可変](properties_Print.md#印刷時可変) - [メソッド](properties_Action.md#メソッド) + diff --git a/website/translated_docs/ja/GettingStarted/Installation.md b/website/translated_docs/ja/GettingStarted/Installation.md new file mode 100644 index 00000000000000..e6497c1b9fca33 --- /dev/null +++ b/website/translated_docs/ja/GettingStarted/Installation.md @@ -0,0 +1,180 @@ +--- +id: installation +title: インストールとアクティベーション +--- + +4D へようこそ! このページでは、4D 製品のインストールとアクティベーションについて必要な情報をまとめています。 + + +## 最低動作環境 + +4D 製品の macOS / Windows における最小動作環境については、4D Webサイトの [製品ダウンロード](https://jp.4d.com/product-download) ページを参照してください。 + +追加の情報は 4D Webサイトの [リソースページ](https://jp.4d.com/resources/) にてご確認いただけます。 + + +## ディスクへのインストール + +4D 製品のインストーラーは 4D の Web サイトから入手していただけます: + +1. 4D Web サイトに接続し、[製品ダウンロード](https://jp.4d.com/product-download) ページを開きます。 +2. 必要な製品バージョンのダウンロードリンクをクリックして、インストーラーをダウンロードします。インストールにあたっては、画面に表示される指示に従ってください。 + + +## 製品のアクティベーション + +ディスクへのインストール終了後、4D 製品を利用するためにはアクティベーションをおこないます。 また、追加のライセンスを入手した際にもアクティベーションをおこなう必要があります。 + +以下の利用モードの場合には、アクティベーションは必要はありません: + +- リモートモードで利用される 4D (4D Serverへの接続) +- インタープリターモードのデータベースを開く場合で、デザインモードへはアクセスしないローカルモードの4D + +**重要:** 製品のアクティベーションには、インターネットへの接続および電子メールアカウントが必要です。 + +### 4D のアクティベーション + +1. 4D アプリケーションを起動します。 +2. **ヘルプ** メニューから **ライセンスマネージャー...** を選択します。 + +![](assets/en/getStart/helpMenu.png) + +**ライセンスマネージャー** ダイアログボックスが表示されます (デフォルトではオンラインアクティベーションのページが選択されています)。 次のアクティベーションモードの章を参照してください。 + +> アクティベーションされていない 4D Developer Edition を使って、インタープリターモードのローカルデータベースを開く、または新規作成すると、自動アクティベーション機構が作動します。 ダイアログボックスが表示され、お使いの 4D が私たちのカスタマーデータベースに接続し、ライセンスをアクティベーションすることを知らせます (ご利用の 4Dアカウントのパスワードを入力する必要があります)。 + +### 4D Server のアクティベーション + +1. 4D Server アプリケーションを起動します。 アクティベーションモードを選択するダイアログボックスが表示されます。 + +![](assets/en/getStart/helpMenu.png) + + +## アクティベーションモード + +4D は 3つのアクティベーションモードを用意しています。 推奨されるのは **オンラインアクティベーション** です。 + +### オンラインアクティベーション + +ユーザーID (メールアドレスまたは 4Dアカウント) とパスワードを入力します。 既存のユーザーアカウントが無い場合、まず以下のアドレスから作成する必要があります: + +[https://account.4d.com/ja/login.shtml](https://account.4d.com/ja/login.shtml) + +![](assets/en/getStart/activ1.png) + +その後、アクティベーションする製品のプロダクト番号を入力します。 このプロダクト番号は製品購入後にメールまたは郵送で提供されています。 + +![](assets/en/getStart/activ2.png) + + +### オフラインアクティベーション + +コンピューターからインターネットへのアクセスがないために [オンラインアクティベーション](#オンラインアクティベーション) が出来ない場合、以下の手順を踏んでオフラインアクティベーションへと進んで下さい。 + +1. **ヘルプ** メニューから "ライセンスマネージャー" を開き、**オフラインアクティベーション** タブを選択します。 +2. ライセンス番号とメールアドレスを入力し、**ファイルを生成** をクリックして IDファイル (*reg.txt*) を作成します。 + +![](assets/en/getStart/activ3.png) + +3. 生成された *reg.txt* ファイルを USBドライブへと保存し、インターネット環境があるコンピューターへと移動させます。 +4. インターネット環境のあるマシンから、[https://store.4d.com/jp/activation.shtml](https://store.4d.com/jp/activation.shtml) にログインします。 +5. Web ページ上にて、**ファイルを選択...** ボタンをクリックし、手順3と4で生成した *reg.txt* ファイルを選択し、**Activate** ボタンをクリックします。 +6. シリアルファイルをダウンロードします。 + +![](assets/en/getStart/activ4.png) + +7. *license4d* ファイルを、何らかの共有メディアに保存し、手順1で使用している4Dマシンへと移動させます。 +8. **"オフラインアクティベーション"** 画面のままになっている、4D をインストールしたマシン上にて、画面上の **次へ** をクリックし、次に **読み込み...** ボタンをクリックして、手順7の共有メディアにある *license4d* ファイルを選択します。 + +![](assets/en/getStart/activ5.png) + +ライセンスファイルが読み込まれた状態で、**次へ** をクリックします。 + +![](assets/en/getStart/activ6.png) + +9. 他のライセンスを追加するためには **番号追加** ボタンをクリックします。 これらの手順を、手順6のライセンスがすべて追加されるまで繰り返します。 + +これで、お使いの4Dアプリケーションのアクティベーションが完了しました。 + +### 緊急アクティベーション + +このモードは、特別に一時的な4Dのアクティベーションをおこなうために使用します。このアクティベーションを行うと、4Dインターネットサイトに接続せずに、最大5日間4Dを利用できます。 このアクティベーションは一回のみ使用することができます。 + + +## ライセンスの追加 + +アプリケーションの拡張ライセンスは、いつでも追加することができます。 + +4D または 4D Server アプリケーションの **ヘルプ** メニューから **ライセンスマネージャー...** を選択し、**更新** ボタンをクリックしてください: + +![](assets/en/getStart/licens1.png) + +このボタンを押すと 4D カスタマーデータベースに接続し、利用中のライセンスに紐付いている新しい、あるいは更新されたライセンスの自動アクティベーションがおこなわれます (利用中のライセンスは "有効なライセンス" 一覧内で **太字** で表示されているものです)。 その際、4D アカウントとパスワードの入力が必要です。 + +- 4D Server に追加のエクスパンションを購入した場合、ライセンス番号は一切入力する必要がありません。**更新** ボタンをクリックすれば、すべて完了します。 +- 4D Server の初回アクティベーション時のみ、サーバーのライセンス番号を入力すれば、購入した他のエクスパンションもすべて自動的に有効化されます。 + +**更新** ボタンは、以下のような場合に使用します: + +- 追加のエクスパンションを購入したとき、またはそれをアクティベートしたいとき。 +- パートナーなどの失効した有限ライセンスを更新するとき。 + + + +## 4D オンラインストア + +4D ストアでは、4D製品の注文、アップグレード、延長、管理等をおこなうことができます。 ストアは以下のアドレスからアクセス可能です: [https://store.4d.com/jp/](https://store.4d.com/jp/) + +既存アカウントで **ログイン** するか、または **新規アカウント** を作成し、画面上の指示に従ってください。

**注:** パスワードを忘れてしまった場合、"パスワードをお忘れの方" をクリックして下さい (ログイン画面右側のヘルプメニューにあります)。数分後に指定されたアドレスへ、パスワードリセット用の自動メールが送信されます。 + +### ライセンス管理 + +ログイン後、ページ右側のマイ・ライセンスメニューから **ライセンスの一覧** をクリックします: + +![](assets/en/getStart/licens2.png) + +ここでは、ライセンスをプロジェクト単位でグループ化して管理することができます。 + +一覧から任意のライセンスを選択し、**プロジェクトにリンク... >** をクリックします: + +![](assets/en/getStart/licens3.png) + +既存プロジェクトを選択、または新規プロジェクトを作成します: + +![](assets/en/getStart/licens4.png) + +![](assets/en/getStart/licens5.png) + +プロジェクトを利用することで、必要に応じてライセンスを整理することができます: + +![](assets/en/getStart/licens6.png) + + +## トラブルシューティング + +インストールやアクティベーションに失敗する場合は以下の表を参照してください。ほとんどの問題はこれらのケースに当てはまります: + +| 症状 | 考えられる原因 | 解決法 | +| ----------------------------------- | ------------------------------------ | ---------------------------------------------------------------------------------------------------------------------- | +| 4D社のサイトからインストーラーをダウンロードできません。 | サイトがダウンしている、またはアンチウィルスやファイアウォールなどの影響 | 1- 時間を空けて再度試してください
または
2- 一時的にアンチウィルスソフトやファイアウォールを無効にしてください。 | +| ディスクに製品をインストールできません (インストールが拒否される)。 | アプリケーションのインストール権限がない | アプリケーションをインストールする権限を持ったセッションを開いてください (管理者アクセス)。 | +| オンラインアクティベーションに失敗します。 | アンチウィルス、ファイアーウォール、プロキシ | 1- 一時的にアンチウィルスソフトやファイアウォールを無効にしてください
または
2- オフラインアクティベーションを試してください。(ただし "R" バージョン用のライセンスでは利用不可) | + +この情報で問題が解決しない場合は、お問い合わせください。 + + +## 連絡先 + +お買い求めいただきました製品のインストールやアクティベーションに関するご質問はフォーディー・ジャパン社、またはお住まいの地域の代理店までお寄せください。 + +日本にお住まいの方: + +- Web: [https://jp.4d.com/technical-support](https://jp.4d.com/technical-support) +- Tel: 03-4400-1789 + +- +- + + +4Dデベロッパーのオンラインコミュニティは以下のWeb サイトで見つけることができます: [https://discuss.4d.com](https://discuss.4d.com) + diff --git a/website/translated_docs/ja/MSC/analysis.md b/website/translated_docs/ja/MSC/analysis.md index 1eb448b41b4981..19ca96f11c58b0 100644 --- a/website/translated_docs/ja/MSC/analysis.md +++ b/website/translated_docs/ja/MSC/analysis.md @@ -1,42 +1,40 @@ --- id: analysis -title: Activity analysis Page -sidebar_label: Activity analysis Page +title: ログ解析ページ +sidebar_label: ログ解析ページ --- -The Activity analysis page allows viewing the contents of the current log file. This function is useful for parsing the use of a database or detecting the operation(s) that caused errors or malfunctions. In the case of a database in client-server mode, it allows verifying operations performed by each client machine. - -> It is also possible to rollback the operations carried out on the data of the database. For more information, refer to [Rollback page](rollback.md). +ログ解析ページを使用して、カレントログファイルに記録された内容を見ることができます。 この機能はデータベース利用状況の解析、エラーや不具合の原因となった処理を探すなどの場合に役立ちます。 クライアント/サーバーモードの場合、各クライアントマシンごとの操作を検証することもできます。 +> データベースのデータに対しておこなわれた操作をロールバックさせることもできます。 詳細は [ロールバック](rollback.md) ページを参照してください。 ![](assets/en/MSC/MSC_analysis.png) -Every operation recorded in the log file appears as a row. The columns provide various information on the operation. You can reorganize the columns as desired by clicking on their headers. - -This information allows you to identify the source and context of each operation: - -- **Operation**: Sequence number of operation in the log file. -- **Action**: Type of operation performed on the data. This column can contain one of the following operations: - - - Opening of Data File: Opening of a data file. - - Closing of Data File: Closing of an open data file. - - Creation of a Context: Creation of a process that specifies an execution context. - - Closing of a Context: Closing of process. - - Addition: Creation and storage of a record. - - Adding a BLOB: Storage of a BLOB in a BLOB field. - - Deletion: Deletion of a record. - - Modification: Modification of a record. - - Start of Transaction: Transaction started. - - Validation of Transaction: Transaction validated. - - Cancellation of Transaction: Transaction cancelled. -- **Table**: Table to which the added/deleted/modified record or BLOB belongs. - -- **Primary Key/BLOB**: contents of the primary key for each record (when the primary key consists of several fields, the values are separated by semi-colons) or sequence number of the BLOB involved in the operation. -- **Process**: Internal number of process in which the operation was carried out. This internal number corresponds to the context of the operation. -- **Size**: Size (in bytes) of data processed by the operation. -- **Date and Hour**: Date and hour when the operation was performed. -- **User**: Name of the user that performed the operation. In client-server mode, the name of the client-side machine is displayed; in single-user mode, the ID of the user is displayed. If the 4D passwords are not enabled, this column is blank. -- **Values**: Values of fields for the record in the case of addition or modification. The values are separated by “;”. Only values represented in alphanumeric form are displayed. - ***Note:** If the database is encrypted and no valid data key corresponding to the open log file has been provided, encrypted values are not displayed in this column.* -- **Records**: Record number. - -Click on **Analyze** to update the contents of the current log file of the selected database (named by default dataname.journal). The Browse button can be used to select and open another log file for the database. The **Export...** button can be used to export the contents of the file as text. \ No newline at end of file +ログファイルに記録された操作は行として表示されます。 各操作の様々な情報が列に表示されます。 ヘッダーをドラッグすることによって列の並び順を変えることもできます。 + +この情報を使用して各操作のソースとコンテキストを識別できます: + +- **操作**: ログファイル中での一連の操作番号 +- **アクション**: データに対しておこなわれた操作のタイプ。 この列には以下の操作のいずれかが記録されます: + - データファイルを開く: データファイルを開いた + - データファイルを閉じる: 開いたデータファイルを閉じた + - コンテキストの作成する: 実行コンテキストを指定するプロセスを作成した + - コンテキストを閉じる: プロセスを閉じた + - 追加: レコードを作成、格納した + - BLOB を追加: BLOBフィールドに BLOB を格納した + - 削除: レコードを削除した + - 更新: レコードを更新した + - トランザクションの開始: トランザクションを開始した + - トランザクションの受け入れ: トランザクションを受け入れた + - トランザクションのキャンセル: トランザクションをキャンセルした + +- **テーブル**: 追加/削除/更新されたレコードまたは BLOB の所属テーブル +- **プライマリーキー/BLOB**: 各レコードのプライマリーキーのコンテンツ (プライマリーキーが複数のフィールドから構成されているときには、値はセミコロンで区切られています)、またはオペレーションに関連した BLOB のシーケンス番号 +- **プロセス**: 処理が実行された内部プロセス番号。 この内部番号は処理のコンテキストに対応します。 +- **サイズ**: 操作により処理されたデータのサイズ (バイト単位) +- **日付と時刻**: 処理が実行された日付と時刻 +- **ユーザー**: 処理を実行したユーザー名。 クライアント/サーバーモードではクライアントマシン名が表示されます。 シングルユーザーモードではユーザーの ID が表示されます。 4Dパスワードが有効にされていない場合、この列にはなにも記録されません。 +- **値**: レコードの追加や更新の場合、フィールドの値。 値はセミコロン “;” で区切られます。 文字形式に表現できる値のみを表示します。 + ***注**: データベースが暗号化されており、開かれたログファイルに対応する有効なデータキーが提供されていない場合、暗号化された値はこのカラムには表示されません。* +- **レコード**: レコード番号 + +選択したデータベースのカレントログファイル (デフォルトで "データファイル名.journal" というファイル名) の内容を更新するには **解析** をクリックします。 **ブラウズ**ボタンをクリックすると、データベースの他のログファイルを選択できます。 **書き出し...** ボタンを使用してファイルの内容をテキストとして書き出せます。 diff --git a/website/translated_docs/ja/MSC/backup.md b/website/translated_docs/ja/MSC/backup.md index 908bbd3f3460c6..87153558f0db0c 100644 --- a/website/translated_docs/ja/MSC/backup.md +++ b/website/translated_docs/ja/MSC/backup.md @@ -1,19 +1,19 @@ --- id: backup -title: Backup Page -sidebar_label: Backup Page +title: バックアップページ +sidebar_label: バックアップページ --- -You can use the Backup page to view some backup parameters of the database and to launch a manual backup: +MSC のバックアップページは、データベースのバックアップ設定を表示し、手動のバックアップ処理を開始するのに使用します: ![](assets/en/MSC/msc_Backup.png) -This page consists of the following three areas: +このページは以下の 3つのエリアで構成されています: -- **Backup File Destination**: displays information about the location of the database backup file. It also indicates the free/used space on the backup disk. -- **Last Backup Information**: provides the date and time of the last backup (automatic or manual) carried out on the database. -- **Contents of the backup file**: lists the files and folders included in the backup file. +- **バックアップファイルの保存先**: データベースのバックアップファイルの場所に関する情報を表示します。 また、ここはバックアップディスクの空き/使用スペースも表示します。 +- **前回のバックアップの情報**: データベースで最近おこなわれた (自動または手動の) バックアップの日付および時刻を提供します。 +- **バックアップファイルの内容**: バックアップファイルに含まれるファイルおよびフォルダーをリストアップします。 -The **Backup** button is used to launch a manual backup. +**バックアップ** ボタンは、手動のバックアップを開始するのに使用します。 -This page cannot be used to modify the backup parameters. To do this, you must click on the **Database properties...** button. \ No newline at end of file +このページでバックアップパラメーターを変更することはできません。 これをおこなうには **データベースプロパティ...** ボタンをクリックします。 diff --git a/website/translated_docs/ja/MSC/compact.md b/website/translated_docs/ja/MSC/compact.md index 59829d1cda474e..3167445fb036db 100644 --- a/website/translated_docs/ja/MSC/compact.md +++ b/website/translated_docs/ja/MSC/compact.md @@ -1,76 +1,71 @@ --- id: compact -title: Compact Page -sidebar_label: Compact Page +title: 圧縮ページ +sidebar_label: 圧縮ページ --- -You use this page to access the data file compacting functions. +このページは、データファイルの圧縮機能にアクセスするときに使用します。 -## Why compact your files? +## ファイルを圧縮する理由 -Compacting files meets two types of needs: +ファイルの圧縮は以下のニーズに応えるためにおこないます: -- **Reducing size and optimization of files**: Files may contain unused spaces (“holes”). In fact, when you delete records, the space that they occupied previously in the file becomes empty. 4D reuses these empty spaces whenever possible, but since data size is variable, successive deletions or modifications will inevitably generate unusable space for the program. The same goes when a large quantity of data has just been deleted: the empty spaces remain unassigned in the file. The ratio between the size of the data file and the space actually used for the data is the occupation rate of the data. A rate that is too low can lead, in addition to a waste of space, to the deterioration of database performance. Compacting can be used to reorganize and optimize storage of the data in order to remove the “holes”. The “Information” area summarizes the data concerning the fragmentation of the file and suggests operations to be carried out. The [Data](information.md#data) tab on the “Information” page of the MSC indicates the fragmentation of the current data file. +- **ファイルのサイズの削減と最適化**: ファイルには使っていないスペースがあるかもしれません。 実際、レコードを削除すると、それらがファイル上で占有していたスペースが空になります。 4D はできる限りこういったスペースを再利用しますが、データのサイズは可変なため、連続的に削除や変更をおこなうと、必然的にプログラムにとって使用不可のスペースが作り出されます。 大量のデータが削除された直後についても同じことが言えます: 空のスペースはそのままファイルに残ります。 データファイルのサイズと、実際にデータに使われているスペースの比率をデータの使用率と呼びます。 使用率が低すぎると、スペースが無駄なだけではなく、データベースパフォーマンスの低下につながります。 圧縮は空きスペースを取り除き、データのストレージを再編成、最適化するためにおこないます。 "情報" エリアには、フラグメンテーションに関するデータが要約され、必要な操作が表示されます。 MSC の情報ページの [データ](information.md#データ) タブには、カレントデータファイルのフラグメンテーション情報が表示されます。 -- **Complete updating of data** by applying the current formatting set in the structure file. This is useful when data from the same table were stored in different formats, for example after a change in the database structure. +- **完全なデータ更新**: ストラクチャーファイルの現設定を全データに適用します。 同じテーブルのデータが異なる形式で保存されている場合 (たとえばデータベースストラクチャーに変更を加えたとき) に便利です。 +> 圧縮はメンテナンスモードでのみ可能です。 標準モードでこの操作を実行しようとすると、警告ダイアログボックスが表示され、データベースを終了してメンテナンスモードで再起動することを知らせます。 ただし、データベースが開いていないデータファイルを圧縮することは可能です ([レコードとインデックスを圧縮](#レコードとインデックスを圧縮) 参照)。 -> Compacting is only available in maintenance mode. If you attempt to carry out this operation in standard mode, a warning dialog box will inform you that the database will be closed and restarted in maintenance mode. You can compact a data file that is not opened by the database (see [Compact records and indexes](#compact-records-and-indexes) below). +## 通常モード -## Standard compacting - -To directly begin the compacting of the data file, click on the compacting button in the MSC window. +データの圧縮を開始するには、MSC ウィンドウの圧縮ボタンをクリックします。 ![](assets/en/MSC/MSC_compact.png) +> 圧縮はオリジナルファイルのコピーを伴うため、ファイルが格納されているディスクに十分な空きスペースがない場合、ボタンは使用不可になります。 -> Since compacting involves the duplication of the original file, the button is disabled when there is not adequate space available on the disk containing the file. - -This operation compacts the main file as well as any index files. 4D copies the original files and puts them in a folder named **Replaced Files (Compacting)**, which is created next to the original file. If you have carried out several compacting operations, a new folder is created each time. It will be named “Replaced Files (Compacting)_1”, “Replaced Files (Compacting)_2”, and so on. You can modify the folder where the original files are saved using the advanced mode. +この操作は、メインファイルの他、インデックスファイルもすべて圧縮します。 4D はオリジナルファイルをコピーし、オリジナルファイルの隣に作成された **Replaced Files (Compacting)** フォルダーにそれらを置きます。 圧縮操作を複数回実行すると、毎回新しいフォルダーが作成されます。 フォルダー名は、"Replaced Files (Compacting)_1", "Replaced Files (Compacting)_2" のようになります。 元のファイルのコピー先は、特殊モードを使って変更できます。 -When the operation is completed, the compacted files automatically replace the original files. The database is immediately operational without any further manipulation. +操作が完了すると、圧縮ファイルは自動的にオリジナルファイルと置き換えられます。 データベースは即座に操作可能になります。 +> データベースが暗号化されている場合、復号化と暗号化のステップが圧縮過程に含まれるため、カレントデータの暗号化キーが必要になります。 有効なデータキーが未提供の場合には、パスフレーズまたはデータキーを要求するダイアログボックスが表示されます。 -> When the database is encrypted, compacting includes decryption and encryption steps and thus, requires the current data encryption key. If no valid data key has already been provided, a dialog box requesting the passphrase or the data key is displayed. +**警告**: 圧縮操作は毎回オリジナルファイルのコピーを伴うため、アプリケーションフォルダーのサイズが大きくなります。 アプリケーションのサイズが過剰に増加しな いよう、これを考慮することが大切です (とくに、4Dアプリケーションがパッケージとして表示される macOS の場合)。 パッケージのサイズを小さく保つには、パッケージ内オリジナルファイルのコピーを手動で削除することも役立ちます。 -**Warning:** Each compacting operation involves the duplication of the original file which increases the size of the application folder. It is important to take this into account (especially under macOS where 4D applications appear as packages) so that the size of the application does not increase excessively. Manually removing the copies of the original file inside the package can be useful in order to keep the package size down. +## ログファイルを開く -## Open log file +圧縮が完了すると、4D はデータベースの Logs フォルダーにログファイルを生成します。 このファイルを使用すると実行されたオペレーションをすべて閲覧することができます。 このファイルは XML形式で作成され、*DatabaseName_Compact_Log_yyyy-mm-dd hh-mm-ss.xml* というファイル名がつけられます。 -After compacting is completed, 4D generates a log file in the Logs folder of the database. This file allows you to view all the operations carried out. It is created in XML format and named: *DatabaseName**_Compact_Log_yyyy-mm-dd hh-mm-ss.xml*" where: +- *DatabaseName* は拡張子を除いたプロジェクトファイルの名前です (例: "Invoices" 等) +- *yyyy-mm-dd hh-mm-ss* はファイルのタイムスタンプです。これはローカルのシステム時間でメンテナンスオペレーションが開始された時刻に基づいています (例: "2019-02-11 15-20-45")。 -- *DatabaseName* is the name of the project file without any extension, for example "Invoices", -- *yyyy-mm-dd hh-mm-ss* is the timestamp of the file, based upon the local system time when the maintenance operation was started, for example "2019-02-11 15-20-45". +**ログファイルを開く** ボタンをクリックすると、4Dはマシンのデフォルトブラウザーを使用して直近のログファイルを開きます。 -When you click on the **Open log file** button, 4D displays the most recent log file in the default browser of the machine. ## 詳細モード -The Compact page contains an **Advanced>** button, which can be used to access an options page for compacting data file. - -### Compact records and indexes - -The **Compact records and indexes** area displays the pathname of the current data file as well as a **[...]** button that can be used to specify another data file. When you click on this button, a standard Open document dialog box is displayed so that you can designate the data file to be compacted. You must select a data file that is compatible with the open structure file. Once this dialog box has been validated, the pathname of the file to be compacted is indicated in the window. - -The second **[...]** button can be used to specify another location for the original files to be saved before the compacting operation. This option can be used more particularly when compacting voluminous files while using different disks. +圧縮ページには、データファイル圧縮のオプションページにアクセスするための **特殊 >** ボタンがあります。 -### Force updating of the records +### レコードとインデックスを圧縮 -When this option is checked, 4D rewrites every record for each table during the compacting operation, according to its description in the structure. If this option is not checked, 4D just reorganizes the data storage on disk. This option is useful in the following cases: +**レコードとインデックスを圧縮** には、カレントデータファイルのパス名と、他のデータファイルを指定するのに使用する **[...]** ボタンが表示されます。 このボタンをクリックすると標準のファイルを開くダイアログが表示され、圧縮するデータファイルを選択することができます。 開かれているストラクチャーファイルと互換性のあるデータファイルを選択しなければなりません。 このダイアログボックスを受け入れると、圧縮するファイルのパス名が更新されます。 -- When field types are changed in the application structure after data were entered. For example, you may have changed a Longint field to a Real type. 4D even allows changes between two very different types (with risks of data loss), for instance a Real field can be changed to Text and vice versa. In this case, 4D does not convert data already entered retroactively; data is converted only when records are loaded and then saved. This option forces all data to be converted. +2つめの **[...]** ボタンを使用して、圧縮処理前に元ファイルをコピーする保存先を変更できます。 とくに大きなデータファイルを圧縮する際、コピー先を別のディスクに変更するためにこのオプションを使用します。 -- When an external storage option for Text, Picture or BLOB data has been changed after data were entered. This can happen when databases are converted from a version prior to v13. As is the case with the retyping described above, 4D does not convert data already entered retroactively. To do this, you can force records to be updated in order to apply the new storage mode to records that have already been entered. +### レコードの強制更新 -- When tables or fields were deleted. In this case, compacting with updating of records recovers the space of these removed data and thus reduces file size. +このオプションが選択されていると、4D は現在のストラクチャー定義に基づき、圧縮処理中に各テーブルのすべてのレコードを再保存します。 このオプションが選択されていないと、4D は単にディスク上のデータの並びを再構成するだけです。 このオプションは以下のケースで有用です: -> All the indexes are updated when this option is selected. +- アプリケーションストラクチャーのフィールド型がデータ入力後に変更された場合、 たとえば倍長整数型を実数型に変更したようなケースです。 4D では (データを失うリスクがあるにしても) まったく異なる型に変更することさえ可能です。たとえば、実数型をテキスト型にすることができます。 この場合、4Dは既に入力されたデータを遡及的に変換することはしません。データはレコードがロードされ保存される際に変換されます。 このオプションを使用すればデータの変換を強制できます。 -### Compact address table +- データが入力された後にテキスト、ピクチャー、または BLOB の外部保存オプションが変更された場合。 これはとくに v13以前からデータベースを変換した場合に発生します。 前述の型変更と同様、4Dはすでに入力されたデータを遡及的に変換しません。 入力済みデータに対して新しい保存設定を適用するために、このオプションを選択して圧縮をおこないます。 -(option only active when preceding option is checked) +- テーブルやフィールドが削除された場合。 この場合、レコードの再保存をおこないながら圧縮することで、削除された領域を圧縮することができ、ファイルサイズを減らすことができます。 +> このオプションが選択されていると、すべてのインデックスが更新されます。 -This option completely rebuilds the address table for the records during compacting. This optimizes the size of the address table and is mainly used for databases where large volumes of data were created and then deleted. In other cases, optimization is not a decisive factor. +### アドレステーブル圧縮 +(レコードの強制更新を選択した場合にのみ選択可能) -Note that this option substantially slows compacting and invalidates any sets saved using the `SAVE SET` command. Moreover, we strongly recommend deleting saved sets in this case because their use can lead to selections of incorrect data. +このオプションを使用すると圧縮の際、レコードのアドレステーブルを完全に再構築します。 これによりアドレステーブルのサイズが最適化されます。このオプションは主に大量のデータを作成し、そして削除したような場合に使用します。 そうでない場合、最適化に明白な意味はありません。 -> - Compacting takes records of tables that have been put into the Trash into account. If there are a large number of records in the Trash, this can be an additional factor that may slow down the operation. -> - Using this option makes the address table, and thus the database, incompatible with the current journal file (if there is one). It will be saved automatically and a new journal file will have to be created the next time the database is launched. -> - You can decide if the address table needs to be compacted by comparing the total number of records and the address table size in the [Information](information.md) page of the MSC. \ No newline at end of file +このオプションを使用した場合、圧縮処理に時間がかかるようになり、さらに `SAVE SET` コマンドを使用して保存したセットなど、レコード番号に依存するものが無効になる点に留意してください。 そのため、この場合には保存したセットはすべて削除するよう強く推奨します。そうでなければ不正なデータセットを使用することになります。 +> - 圧縮は、ゴミ箱に入れられたテーブルのレコードも対象とします。 ゴミ箱に大量のレコードがある場合、処理が遅くなる原因となります。 +> - このオプションを使用すると、アドレステーブルは (それに伴ってデータベースそのものも) カレントログファイルとの互換性を失います。 ログファイルは自動で保存され、次回データベースを起動した際に新しいログファイルが作成されなければなりません。 +> - アドレステーブルの圧縮が必要かどうかは、総レコード数と MSC の [情報](information.md) ページ内にあるアドレステーブルサイズを比較することで判断することができます。 diff --git a/website/translated_docs/ja/MSC/encrypt.md b/website/translated_docs/ja/MSC/encrypt.md index 667758649a8ec0..a7e62f2a2b7081 100644 --- a/website/translated_docs/ja/MSC/encrypt.md +++ b/website/translated_docs/ja/MSC/encrypt.md @@ -1,103 +1,96 @@ --- id: encrypt -title: Encrypt Page -sidebar_label: Encrypt Page +title: 暗号化ページ +sidebar_label: 暗号化ページ --- -You can use this page to encrypt or *decrypt* (i.e. remove encryption from) the data file, according to the **Encryptable** attribute status defined for each table in the database. For detailed information about data encryption in 4D, please refer to the "Encrypting data" section. +このページを使用して、データベースの各テーブルに対して定義された **暗号化可能** 属性に基づいて、データファイルを暗号化または *復号化* (つまりデータから暗号化を解除) することができます。 4D のデータ暗号化についての詳細な情報に関しては、[データの暗号化](https://doc.4d.com/4Dv18/4D/18/Encrypting-data.300-4575694.ja.html) の章を参照してください。 -A new folder is created each time you perform an encryption/decryption operation. It is named "Replaced Files (Encrypting) *yyyy-mm-dd hh-mm-ss*> or "Replaced Files (Decrypting) *yyyy-mm-dd hh-mm-ss*". +暗号化/復号化操作をおこなうたびに、新しいフォルダーが作成されます。 そのフォルダーは "Replaced Files (Encrypting) *yyyy-mm-dd hh-mm-ss*" あるいは "Replaced Files (Decrypting) *yyyy-mm-dd hh-mm-ss*" と名前が付けられます。 +> 暗号化は [メンテナンスモード](overview.md#メンテナンスモードでの表示) でのみ利用可能です。 標準モードでこの操作を実行しようとすると、警告ダイアログが表示され、データベースを終了してメンテナンスモードで再起動することを知らせます。 -> Encryption is only available in [maintenance mode](overview.md#display-in-maintenance-mode). If you attempt to carry out this operation in standard mode, a warning dialog will inform you that the database will be closed and restarted in maintenance mode +**警告:** +- データベースの暗号化は時間がかかる操作です。 実行中は (ユーザーによって割り込み可能な) 進捗インジケーターが表示されます。 また、データベースの暗号化操作には必ず圧縮のステップが含まれるという点に注意してください。 +- 暗号化操作をおこなうたびに、その操作はデータファイルのコピーを作成し、その結果アプリケーションファイルのサイズは増大します。 アプリケーションのサイズが過剰に増加しな いよう、これを考慮することが大切です (とくに、4Dアプリケーションがパッケージとして表示される macOS の場合)。 パッケージのサイズを小さく保つには、パッケージ内オリジナルファイルのコピーを手動で削除/移動することも役立ちます。 -**Warning:** +## データを初めて暗号化する場合 +MSC でデータファイルを初めて暗号化する場合、以下のような手順を踏む必要があります: -- Encrypting a database is a lengthy operation. It displays a progress indicator (which could be interrupted by the user). Note also that a database encryption operation always includes a compacting step. -- Each encryption operation produces a copy of the data file, which increases the size of the application folder. It is important to take this into account (especially in macOS where 4D applications appear as packages) so that the size of the application does not increase excessively. Manually moving or removing the copies of the original file inside the package can be useful in order to minimize the package size. +1. ストラクチャーエディターにおいて、データを暗号化したいテーブルに対して **暗号化可能** 属性にチェックを入れます。 詳細は "テーブルプロパティ" の章を参照してください。 +2. MSC の暗号化ページを開きます。 どのテーブルにも **暗号化可能** 属性を付けないでページを開こうとした場合、ページに以下のメッセージが表示されます:
![](assets/en/MSC/MSC_encrypt1.png)
そうでない場合には、以下のメッセージが表示されます:
![](assets/en/MSC/MSC_encrypt2.png)
このメッセージは、少なくとも 1つのテーブルに対して **暗号化可能** 属性のステータスが変更されていて、データファイルがまだ暗号化されていないことを意味します。 **注**: すでに暗号化されているデータファイル、または復号化されたデータファイルに対して、**暗号化可能** 属性のステータスが変更された場合にも同じメッセージが表示されます (以下参照)。 +3. 暗号化ピクチャーボタンをクリックします。 + ![](assets/en/MSC/MSC_encrypt3.png) + データファイル用のパスフレーズを入力するように聞かれます: + ![](assets/en/MSC/MSC_encrypt4.png) + パスフレーズはデータ暗号化キーを生成するのに使用されます。 パスフレーズはパスワードの強化版のようなもので、大量の文字を含めることができます。 たとえば、"We all came out to Montreux" あるいは "My 1st Great Passphrase!!" のようなパスフレーズを入力することが可能です。 パスフレーズの安全性は、セキュリティレベルインジケーターによって確認できます:![](assets/en/MSC/MSC_encrypt5.png) (濃い緑色がもっとも安全なレベルであることを示します)。 +4. Enter を押して安全なパスフレーズの入力を確定します。 -## Encrypting data for the first time +暗号化プロセスがスタートします。 MSC が標準モードで開かれていた場合、データベースはメンテナンスモードで再起動されます。 -Encrypting your data for the first time using the MSC requires the following steps: +4D では暗号化キーを保存することができます (以下の [暗号化キーを保存する](#暗号化キーを保存する) の段落を参照してください)。 暗号化キーの保存は、このタイミングか、あるいは後でおこなうこともできます。 また暗号化ログファイルを開くこともできます。 -1. In the Structure editor, check the **Encryptable** attribute for each table whose data you want to encrypt. See the "Table properties" section. -2. Open the Encrypt page of the MSC. If you open the page without setting any tables as **Encryptable**, the following message is displayed in the page: ![](assets/en/MSC/MSC_encrypt1.png) Otherwise, the following message is displayed: ![](assets/en/MSC/MSC_encrypt2.png) This means that the **Encryptable** status for at least one table has been modified and the data file still has not been encrypted. **Note: **The same message is displayed when the **Encryptable** status has been modified in an already encrypted data file or after the data file has been decrypted (see below). -3. Click on the Encrypt picture button. - ![](assets/en/MSC/MSC_encrypt3.png) - You will be prompted to enter a passphrase for your data file: ![](assets/en/MSC/MSC_encrypt4.png) The passphrase is used to generate the data encryption key. A passphrase is a more secure version of a password and can contain a large number of characters. For example, you could enter a passphrases such as "We all came out to Montreux" or "My 1st Great Passphrase!!" The security level indicator can help you evaluate the strength of your passphrase: ![](assets/en/MSC/MSC_encrypt5.png) (deep green is the highest level) -4. Enter to confirm your secured passphrase. +暗号化プロセスが正常に完了した場合、暗号化ページは [暗号化メンテナンスオペレーション](#暗号化メンテナンスオペレーション) ボタンを表示します。 -The encrypting process is then launched. If the MSC was opened in standard mode, the database is reopened in maintenance mode. +**警告**: 暗号化操作の最中、4D は新しい、空のデータファイルを作成したうえで、元のデータファイルからデータを注入します。 "暗号化可能" テーブルに属しているレコードは暗号化後にコピーされ、他のレコードは単にコピーされるだけです (圧縮オペレーションも実行されます)。 操作が正常に完了した場合、もとのデータファイルは "Replaced Files (Encrypting)" フォルダーへ移動されます。 暗号化されたデータファイルを配布する場合、暗号化されていないデーファイルをデータベースフォルダーからすべて移動/削除しておくようにしてください。 -4D offers to save the encryption key (see [Saving the encryption key](#saving-the-encryption-key) below). You can do it at this moment or later. You can also open the encryption log file. +## 暗号化メンテナンスオペレーション +データベースが暗号化されているとき (上記参照)、暗号化ページでは、標準のシナリオに対応した様々の暗号化メンテナンスオペレーションを提供します。 ![](assets/en/MSC/MSC_encrypt6.png) -If the encryption process is successful, the Encrypt page displays Encryption maintenance operations buttons. -**Warning:** During the encryption operation, 4D creates a new, empty data file and fills it with data from the original data file. Records belonging to "encryptable" tables are encrypted then copied, other records are only copied (a compacting operation is also executed). If the operation is successful, the original data file is moved to a "Replaced Files (Encrypting)" folder. If you intend to deliver an encrypted data file, make sure to move/remove any unencrypted data file from the database folder beforehand. +### カレントの暗号化キーを入力する +セキュリティ上の理由から、すべての暗号化メンテナンスオペレーションはカレントのデータ暗号化キーの入力を要求します。 -## Encryption maintenance operations +- データ暗号化キーが既に 4Dキーチェーン (1) に読み込まれている場合、そのキーは 4D によって自動的に再利用されます。 +- データ暗号化キーが見つからない場合、それを入力する必要があります。 以下のようなダイアログが表示されます: ![](assets/en/MSC/MSC_encrypt7.png) -When a database is encrypted (see above), the Encrypt page provides several encryption maintenance operations, corresponding to standard scenarios. ![](assets/en/MSC/MSC_encrypt6.png) +この段階では 2つの選択肢があります: +- カレントのパスフレーズ (2) を入力し、**OK** をクリックする。 OR +- USBキーなどのデバイスを接続して、**デバイスをスキャン** ボタンをクリックする。 -### Providing the current data encryption key +(1) 4Dキーチェーンは、アプリケーションのセッション中に入力されたすべての有効なデータ暗号化キーを保管します。 +(2) カレントのパスフレーズとは、カレントのデータ暗号化キーを生成するのに使用されたパスフレーズです。 -For security reasons, all encryption maintenance operations require that the current data encryption key be provided. +いずれの場合においても、有効なパスフレーズ/暗号化キーが提供されると、4D は (まだメンテナンスモードではなかった場合は) メンテナンスモードで再起動し、選択されたオペレーションを実行します。 -- If the data encryption key is already loaded in the 4D keychain(1), it is automatically reused by 4D. -- If the data encryption key is not found, you must provide it. The following dialog is displayed: ![](assets/en/MSC/MSC_encrypt7.png) +### カレントの暗号化キーでデータを再暗号化する -At this step, you have two options: +この操作は、データを格納している 1つ以上のテーブルにおいて **暗号化可能** 属性が変更された場合に有用です。 この場合、データの整合性を保つために、4D はアプリケーション内のそのテーブルのレコードへの書き込みアクセスを禁止します。 有効な暗号化ステータスを得るために、データの再暗号化が必要になります。 -- enter the current passphrase(2) and click **OK**. OR -- connect a device such as a USB key and click the **Scan devices** button. +1. **カレントの暗号化キーでデータを再暗号化** をクリックします。 +2. カレントのデータ暗号化キーを入力します。 -(1) The 4D keychain stores all valid data encrpytion keys entered during the application session. -(2) The current passphrase is the passphrase used to generate the current encryption key. +データファイルはカレントのデータ暗号化キーで正常に再暗号化され、確認メッセージが表示されます: ![](assets/en/MSC/MSC_encrypt8.png) -In all cases, if valid information is provided, 4D restarts in maintenance mode (if not already the case) and executes the operation. +### パスフレーズを変更してデータを再暗号化する +この操作は、カレントの暗号化データキーを変更したい場合に有用です。 たとえば、セキュリティ上のルール (3ヶ月ごとにパスプレーズを変更する必要があるなど) を遵守するために変更をおこないたいケースが考えられます。 -### Re-encrypt data with the current encryption key +1. **パスフレーズを変更してデータを再暗号化する** をクリックします。 +2. カレントのデータ暗号化キーを入力します。 +3. 新しいパスフレーズを入力します (セキュリティのため、2度入力します): ![](assets/en/MSC/MSC_encrypt9.png) データファイルは新しいキーで暗号化され、確認メッセージが表示されます: ![](assets/en/MSC/MSC_encrypt8.png) -This operation is useful when the **Encryptable** attribute has been modified for one or more tables containing data. In this case, to prevent inconsistencies in the data file, 4D disallows any write access to the records of the tables in the application. Re-encrypting data is then necessary to restore a valid encryption status. +### 全データを復号化 +この操作は、データファイルからすべての暗号化を取り除きます。 データを暗号化しておきたくない場合、以下の手順に従ってください: -1. Click on **Re-encrypt data with the current encryption key**. -2. Enter the current data encryption key. +1. **全データを復号化** をクリックします。 +2. カレントのデータ暗号化キーを入力します ([カレントの暗号化キーを入力する](#カレントの暗号化キーを入力する) 参照)。 -The data file is properly re-encrypted with the current key and a confirmation message is displayed: ![](assets/en/MSC/MSC_encrypt8.png) +データは完全に復号化され、確認メッセージが表示されます: ![](assets/en/MSC/MSC_encrypt10.png) +> データファイルが復号化されると、テーブルの暗号化ステータスは暗号化可能属性と合致しなくなります。 ステータスを合致させるためには、データベースのストラクチャーレベルにおいてすべての **暗号化可能** 属性を選択解除しなければなりません。 -### Change your passphrase and re-encrypt data +## 暗号化キーを保存する -This operation is useful when you need to change the current encryption data key. For example, you may need to do so to comply with security rules (such as requiring changing the passphrase every three months). +4D ではデータ暗号化キーを専用ファイルに保存しておくことができます。 このファイルを USBキーなどの外部デバイスに保存しておくと、暗号化されたデータベースを使うのが簡単になります。なぜならユーザーは暗号化されたデータにアクセスするには、データベースを開く前にデバイスを接続してキーを提供すればよいからです。 -1. Click on **Change your passphrase and re-encrypt data**. -2. Enter the current data encryption key. -3. Enter the new passphrase (for added security, you are prompted to enter it twice): ![](assets/en/MSC/MSC_encrypt9.png) The data file is encrypted with the new key and the confirmation message is displayed. ![](assets/en/MSC/MSC_encrypt8.png) +新しいパスフレーズが提供されるたびに暗号化キーを保存することができます: -### Decrypt all data +- データベースが最初に暗号化されたとき +- データベースが新しいパスフレーズで再暗号化されたとき -This operation removes all encryption from the data file. If you no longer want to have your data encrypted: - -1. Click on **Decrypt all data**. -2. Enter the current data encryption key (see Providing the current data encryption key). - -The data file is fully decrypted and a confirmation message is displayed: ![](assets/en/MSC/MSC_encrypt10.png) - -> Once the data file is decrypted, the encryption status of tables do not match their Encryptable attributes. To restore a matching status, you must deselect all **Encryptable** attributes at the database structure level. - -## Saving the encryption key - -4D allows you to save the data encryption key in a dedicated file. Storing this file on an external device such a USB key will facilitate the use of an encrypted database, since the user would only need to connect the device to provide the key before opening the database in order to access encrypted data. - -You can save the encryption key each time a new passphrase has been provided: - -- when the database is encrypted for the first time, -- when the database is re-encrypted with a new passphrase. - -Successive encryption keys can be stored on the same device. +連続した暗号化キーを同じデバイスに保存することが可能です。 ## ログファイル +暗号化オペレーションが完了すると、4D はデータベースの Logsフォルダー内にファイルを生成します。 このファイルは XML形式で作成され、"*DatabaseName_Encrypt_Log_yyyy-mm-dd hh-mm-ss.xml*" または "*DatabaseName_Decrypt_Log_yyyy-mm-dd hh-mm-ss.xml*" という名前がつけられます。 -After an encryption operation has been completed, 4D generates a file in the Logs folder of the database. It is created in XML format and named "*DatabaseName_Encrypt_Log_yyyy-mm-dd hh-mm-ss.xml*" or "*DatabaseName_Decrypt_Log_yyyy-mm-dd hh-mm-ss.xml*". - -An Open log file button is displayed on the MSC page each time a new log file has been generated. +新しくログファイルが生成されるたび、MSCページに **ログファイルを開く** ボタンが表示されます。 -The log file lists all internal operations executed pertaining to the encryption/decryption process, as well as errors (if any). \ No newline at end of file +このログファイルには、暗号化/復号化プロセスの間に実行された内部オペレーションがすべて記録されているほか、エラー (あれば) が記録されています。 diff --git a/website/translated_docs/ja/MSC/information.md b/website/translated_docs/ja/MSC/information.md index 5d8258014531f9..5ac813559fc5be 100644 --- a/website/translated_docs/ja/MSC/information.md +++ b/website/translated_docs/ja/MSC/information.md @@ -1,53 +1,52 @@ --- id: information -title: Information Page -sidebar_label: Information Page +title: 情報ページ +sidebar_label: 情報ページ --- -The Information page provides information about the 4D and system environments, as well as the database and application files. Each page can be displayed using tab controls at the top of the window. +情報ページは 4D環境、システム環境、データベースおよびアプリケーションファイルについての情報を提供します。 各ページは、ウィンドウ上部にあるタブコントロールを使って切り替えできます。 -## Program +## プログラム -This page indicates the name, version and location of the application as well as the active 4D folder (for more information about the active 4D folder, refer to the description of the ```Get 4D folder``` command in the *4D Language Reference* manual). +このページにはアプリケーションならびにアクティブな 4Dフォルダーの名前、バージョンおよび場所を表示します (アクティブ4Dフォルダーについては *4Dランゲージリファレンス* の `Get 4D folder` コマンドを参照ください)。 -The central part of the window indicates the name and location of the database project and data files as well as the log file (if any). The lower part of the window indicates the name of the 4D license holder, the type of license, and the name of the database user when passwords have been activated (or Designer if this is not the case). +ウィンドウの中央部は、データベースプロジェクトならびにデータファイルとログファイル (あれば) の名前および場所を表示します。 ウィンドウの下部は、4Dライセンスフォルダーの名前、ライセンスのタイプ、および、パスワードが有効化されている場合はデータベースユーザーの名前 (有効でない場合はDesigner) を表示します。 -- **Display and selection of pathnames**: On the **Program** tab, pathnames are displayed in pop-up menus containing the folder sequence as found on the disk: - ![](assets/en/MSC/MSC_popup.png) If you select a menu item (disk or folder), it is displayed in a new system window. The **Copy the path** command copies the complete pathname as text to the clipboard, using the separators of the current platform. +- **パス名の表示と選択**: **プログラム** タブでは、ディスク上の一連の親フォルダーを表示するポップアップメニューの形でパス名が示されます: + ![](assets/en/MSC/MSC_popup.png) メニュー項目 (ディスクまたはフォルダー) を選択した場合、そのパスが新しいシステムウィンドウで開かれます。 **パスをコピー** コマンドは、システムのディレクトリ区切り文字を使用して、完全なパス名をクリップボードにテキストとしてコピーします。 -- **"Licenses" Folder** The **"Licenses" Folder** button displays the contents of the active Licenses folder in a new system window. All the license files installed in your 4D environment are grouped together in this folder, on your hard disk. When they are opened with a Web browser, these files display information concerning the licenses they contain and their characteristics. The location of the "Licenses" folder can vary depending on the version of your operating system. For more information about the location of this folder, refer to the ```Get 4D folder``` コマンドを使用して変更されていない場合に限ります)。 ***Note:** You can also access this folder from the “Update License” dialog box (available in the Help menu).* +- **ライセンスフォルダー**: **ライセンスフォルダー** ボタンをクリックすると、新しいシステムウィンドウにアクティブなライセンスフォルダーの中身を表示します。 インストールされた 4D環境用のライセンスファイルはすべてこのフォルダーに格納されていなければなりません。 ファイルを Webブラウザーで開くと、ライセンスの情報が表示されます。 ライセンスフォルダーの場所はバージョンや OS により異なります。 このフォルダーの場所については `Get 4D folder` コマンドの説明を参照してください。 ***注**: 上部メニューの "ヘルプ > ライセンスマネージャー..." からアクセスできるダイアログボックスにも同じボタンがあります。* ## テーブル -This page provides an overview of the tables in your database: +このページでは、データベース内のテーブルの概要を示します: ![](assets/en/MSC/MSC_Tables.png) +> このページの情報は、標準モードおよびメンテナンスモードの両方で利用可能です。 -> Information on this page is available in both standard and maintenance modes. +このページにはデータベースのすべてのテーブル (非表示のテーブルも含む) とそれらの特徴が表示されます: -The page lists all the tables of the database (including invisible tables) as well as their characteristics: +- **ID**: テーブルの内部番号 +- **テーブル**: テーブル名。 削除されたテーブルの名前は括弧付きで表示されます (ゴミ箱の中に残っている場合)。 +- **レコード**: テーブル内の総レコード数。 レコードが破損していたり読み込めなかった場合には、数字の代わりに *Error* が表示されます。 この場合、検証と修復ツールの使用を検討してください。 +- **フィールド**: テーブル内のフィールド数。 非表示のフィールドはカウントされますが、削除されたフィールドはカウントされません。 +- **インデックス**: テーブル内のあらゆるインデックスの数 +- **暗号化可能**: チェックされていれば、ストラクチャーレベルにおいてこのテーブルは **暗号化可能** 属性が選択されています (デザインリファレンスマニュアルの [暗号化可能](https://doc.4d.com/4Dv18/4D/18/Table-properties.300-4575566.ja.html#4168557) の項目を参照ください)。 +- **暗号化済み**: チェックされていれば、テーブルのレコードはデータファイルにおいて暗号化されています。 ***注**: 暗号化可能と暗号化済みオプション間において整合性が取れていない場合、必ず MSC の **暗号化** ページにてデータファイルの暗号化状態を確認してください。 * +- **アドレステーブルサイズ**: 各テーブルのアドレステーブルのサイズ。 アドレステーブルとは、テーブル内で作成される各レコードにつき 1つの要素を保存する内部テーブルのことです。 これはレコードとその物理アドレスをつなげる働きをします。 パフォーマンス上の理由から、レコードが削除されてもリサイズはされず、そのためそのサイズはテーブル内のカレントレコード数とは異なる場合があります。 この差異が著しく大きい場合、"アドレステーブルを圧縮" オプションをチェックした状態でデータ圧縮を実行することで、アドレステーブルサイズを最適化することができます ([圧縮](compact.md) ページを参照してください)。 ***注**: アドレステーブルサイズとレコード数の差異は、キャッシュフラッシュの途中での事象によるものである可能性もあります。* -- **ID**: Internal number of the table. -- **Tables**: Name of the table. Names of deleted tables are displayed with parenthesis (if they are still in the trash). -- **Records**: Total number of records in the table. If a record is damaged or cannot be read, *Error* is displayed instead of the number. In this case, you can consider using the verify and repair tools. -- **Fields**: Number of fields in the table. Invisible fields are counted, however, deleted fields are not counted. -- **Indexes**: Number of indexes of any kind in the table -- **Encryptable**: If checked, the **Encryptable** attribute is selected for the table at the structure level (see Encryptable paragraph in the Design Reference Manual). -- **Encrypted**: If checked, the records of the table are encrypted in the data file. ***Note:** Any inconstency between Encryptable and Encrypted options requires that you check the encryption status of the data file in the **Encrypt page** of the database. * -- **Address Table Size**: Size of the address table for each table. The address table is an internal table which stores one element per record created in the table. It actually links records to their physical address. For performance reasons, it is not resized when records are deleted, thus its size can be different from the current number of records in the table. If this difference is significant, a data compacting operation with the "Compact address table" option checked can be executed to optimize the address table size (see [Compact](compact.md) page). ***Note:** Differences between address table size and record number can also result from an incident during the cache flush.* -## Data -The **Data** page provides information about the available and used storage space in the data file. +## データ -> This page cannot be accessed in maintenance mode +**データ** ページには、データファイルの空き/使用済み容量の情報が表示されます。 +> このページには、メンテナンスモードではアクセスできません。 -The information is provided in graph form: +この情報はグラフ形式で提供されます: ![](assets/en/MSC/MSC_Data.png) +> このページに表示される情報には、データファイル外に格納されたデータは反映されません ([データをデータファイル外に保存](https://doc.4d.com/4Dv18/4D/18/External-data-storage.300-4575564.ja.html) 参照)。 -> This page does not take into account any data that may be stored outside of the data file (see "External storage"). +断片化があまりにも進んだファイルはディスク、そしてデータベースのパフォーマンスを低下させます。 使用率が低すぎる場合、4Dは警告アイコンを表示して (このアイコンは情報ページボタンと対応するファイルタイプのタブに表示されます)、圧縮が必要であることを警告します:![](assets/en/MSC/MSC_infowarn.png) -Files that are too fragmented reduce disk, and thus, database performance. If the occupation rate is too low, 4D will indicate this by a warning icon (which is displayed on the Information button and on the tab of the corresponding file type) and specify that compacting is necessary:![](assets/en/MSC/MSC_infowarn.png) - -A warning icon is also displayed on the button of the [Compact](compact.md) page: ![](assets/en/MSC/MSC_compactwarn.png) \ No newline at end of file +警告アイコンは [圧縮](compact.md) ページボタンにも表示されます: ![](assets/en/MSC/MSC_compactwarn.png) diff --git a/website/translated_docs/ja/MSC/overview.md b/website/translated_docs/ja/MSC/overview.md index a5d70d94ff3b82..ece17f6e3023da 100644 --- a/website/translated_docs/ja/MSC/overview.md +++ b/website/translated_docs/ja/MSC/overview.md @@ -4,37 +4,38 @@ title: 概要 sidebar_label: 概要 --- -The Maintenance and Security Center (MSC) window contains all the tools needed for verification, analysis, maintenance, backup, compacting, and encrypting of data files. The MSC window is available in all 4D applications: 4D single user, 4D Server or 4D Desktop. +Maintenance & Security Center (MSC) は、データとストラクチャーファイルを検証、保守、バックアップそして圧縮および暗号化するツールを提供します。 MSC ウィンドウは、すべての 4Dアプリケーション (4Dシングルユーザー、4D Server、4D Desktop) から利用できます。 -**Note:** The MSC window is not available from a 4D remote connection. +**注**: MSC は 4Dリモート接続ではご利用いただけません。 -There are several ways to open the MSC window. The way it is accessed also determines the way the database is opened: in “maintenance” mode or “standard” mode. In maintenance mode, the database is not opened by 4D, only its reference is provided to the MSC. In standard mode, the database is opened by 4D. +MSCウィンドウを開く方法は幾つかあります。 アクセスの方法により、"メンテナンス" モードまたは "標準" モードのいずれによってデータベースを開くかが決定されます。 メンテナンスモードの場合、4D はデータベースを開かず、その参照だけが MSC に供給されます。 標準モードの場合、4D はデータベースを開きます。 -## Display in maintenance mode -In maintenance mode, only the MSC window is displayed (the database is not opened by the 4D application). This means that databases that are too damaged to be opened in standard mode by 4D can nevertheless be accessed. Moreover, certain operations (compacting, repair, and so on) require the database to be opened in maintenance mode (see [Feature availability](#feature-availability)). +## メンテナンスモードでの表示 -You can open the MSC in maintenance mode from two locations: +メンテナンスモードでは、MSCウィンドウだけが表示されます (4Dアプリケーションはデータベースを開きません)。 つまり、損傷が激しいため 4D が標準モードで開けないデータベースにもアクセスできるということです。 さらに、特定の操作 (圧縮、修復など) はデータベースをメンテナンスモードで開くことを要求します ([アクセス権](#アクセス権) 参照)。 -- **From the standard database opening dialog box** The standard Open database dialog includes the **Maintenance Security Center** option from the menu associated with the **Open** button: ![](assets/en/MSC/MSC_standardOpen.png) -- **Help/Maintenance Security Center** menu or **MSC** button in the tool bar (database not open) - ![](assets/en/MSC/mscicon.png) - When you call this function, a standard Open file dialog appears so that you can indicate the database to be examined. The database will not be opened by 4D. +次の 2つの場所から、MSC をメインテナンスモードで開くことができます: -## Display in standard mode +- **標準の開くダイアログボックス**
標準のデータベースを開くダイアログボックスには **開く** ボタンに関連付けられているメニューに **Maintenance & Security Center** オプションが含まれます: ![](assets/en/MSC/MSC_standardOpen.png) +- **ヘルプ>メンテナンス&セキュリティセンター (MSC)** メニュー、または、ツールバーの **MSC** ボタンの使用 (データベースが開かれていない状態で) + ![](assets/en/MSC/mscicon.png) + この機能を呼び出すと、標準のファイルを開くダイアログボックスが表示され、検査するデータベースを指定できます。 データベースは開かれません。 -In standard mode, a database is open. In this mode, certain maintenance functions are not available. You have several possibilities for accessing the MSC window: +## 標準モードでの表示 -- Use the **Help/Maintenance Security Center** menu or the **MSC** button in the 4D toolbar: - ![](assets/en/MSC/mscicon.png) -- Use the “msc” standard action that it is possible to associated with a menu command or a form object (see "Standard actions" section). +標準モードではデータベースが開いています。 このモードでは、特定の保守機能を使用できません。 この場合に MSCウィンドウを開く方法は幾つかあります。 -- Use the ```OPEN SECURITY CENTER``` language command. +- **ヘルプ>メンテナンス&セキュリティセンター (MSC)** メニュー、または、ツールバーの **MSC** ボタンの使用。 + ![](assets/en/MSC/mscicon.png) +- "msc" 標準アクションを割り当てたメニューコマンドやフォームオブジェクトを使用する ("標準アクション" 参照)。 -## Feature availability +- `OPEN SECURITY CENTER` ランゲージコマンドを使用する。 -Certain MSC functions are not available depending on the MSC opening mode: +## アクセス権 -- Backup function is only available when the database is open (the MSC must have been opened in standard mode). -- Data compacting, rollback, restore, repair, and encryption functions can only be used with data files that are not open (the MSC must have been opened in maintenance mode). If these functions are tried while the database is open in standard mode, a dialog warns you that it implies that the application be closed and restarted in maintenance mode. -- In encrypted databases, access to encrypted data or to the .journal file requires that a valid encryption data key be provided (see [Encrypt page](encrypt.md)). Otherwise, encrypted data is not visible. \ No newline at end of file +特定の MSC機能は、MSC が開かれたモードによっては利用できません: + +- バックアップ機能は、データベースが開かれている状態でしか利用できません (MSC は標準モードで開かれている必要があります)。 +- データの圧縮、ロールバック、復元、修復、および暗号化の機能は、開いていないデータファイルでのみ使用できます (MSC はメインテナンスモードで開かれていなければなりません) 。 データベースが標準モードで開かれている時にこれらの機能を試みた場合は、メインテナンスモードでアプリケーション再起動を促すダイアログボックスが表示されます。 +- 暗号化されたデータベースにおいては、暗号化されたデータまたは .journal ファイルへのアクセスには有効なデータキーが提供されている必要があります ([暗号化ページ](encrypt.md) 参照)。 提供されていない場合、暗号化されたデータは見ることができません。 diff --git a/website/translated_docs/ja/MSC/repair.md b/website/translated_docs/ja/MSC/repair.md index 93479e5fd89eb5..a973d41e70f7cf 100644 --- a/website/translated_docs/ja/MSC/repair.md +++ b/website/translated_docs/ja/MSC/repair.md @@ -1,74 +1,69 @@ --- id: repair -title: Repair Page -sidebar_label: Repair Page +title: 修復ページ +sidebar_label: 修復ページ --- -This page is used to repair the data file when it has been damaged. Generally, you will only use these functions at the request of 4D, when anomalies have been detected while opening the database or following a [verification](verify.md). +このページは、データファイルが損傷を受けたとき、それを修復するために使用します。 一般的にこれらの機能は、4Dの起動時や MSC による [検査](verify.md) の結果アプリケーションに損傷を見つけたときに、4D技術者の監督下で実行します。 -**Warning:** Each repair operation involves the duplication of the original file, which increases the size of the application folder. It is important to take this into account (especially in macOS where 4D applications appear as packages) so that the size of the application does not increase excessively. Manually removing the copies of the original file inside the package can be useful to minimize the package size. +**警告**: 修復操作は毎回オリジナルファイルのコピーを伴うため、アプリケーションフォルダーのサイズが大きくなります。 アプリケーションのサイズが過剰に増加しな いよう、これを考慮することが大切です (とくに、4Dアプリケーションがパッケージとして表示される macOS の場合)。 パッケージのサイズを小さく保つには、パッケージ内オリジナルファイルのコピーを手動で削除することも役立ちます。 +> 修復はメンテナンスモードでのみ可能です。 標準モードでこの操作を実行しようとすると、警告ダイアログが表示され、データベースを終了してメンテナンスモードで再起動することを知らせます。 +> データベースが暗号化されている場合、復号化と暗号化のステップが修復過程に含まれるため、カレントデータの暗号化キーが必要になります。 有効な暗号化キーがまだ提供されていない場合、パスフレーズ、あるいは暗号化キーを要求するダイアログが表示されます (暗号化ページ参照)。 -> Repairing is only available in maintenance mode. If you attempt to carry out this operation in standard mode, a warning dialog will inform you that the database will be closed and restarted in maintenance mode. -> -> When the database is encrypted, repairing data includes decryption and encryption steps and thus, requires the current data encryption key. If no valid encryption key has already been provided, a dialog requesting the passphrase or the encryption key is displayed (see Encrypt page). +## データファイル修復 -## File overview +### 修復するデータ +カレントデータファイルのパス名。 **[...]** ボタンを使って、他のデータファイルを指定することができます。 このボタンをクリックすると標準のファイルを開くダイアログが表示され、修復するデータファイルを選択することができます。 [標準の修復](#標準の修復) を実行する場合、開かれたストラクチャーに対応するデータファイルを選択しなければなりません。 [レコードヘッダーによる再生](#レコードヘッダーによる再生) を実行する場合、どのデータファイルでも選択できます。 このダイアログを受け入れると、ウィンドウには修復対象のファイルのパス名が表示されます。 -### Data file to be repaired +### オリジナルをここに移動 +デフォルトで修復処理の前に元のデータファイルが複製されます。 このファイルは、データベースフォルダーの "Replaced files (repairing)" サブフォルダーに配置されます。 二つ目の **[...]** ボタンを使用して、複製ファイルの保存先を変更できます。 とくに大きなデータファイルを修復する際、コピー先を別のディスクに変更するためにこのオプションを使用します。 -Pathname of the current data file. The **[...]** button can be used to specify another data file. When you click on this button, a standard Open document dialog is displayed so that you can designate the data file to be repaired. If you perform a [standard repair](#standard_repair), you must select a data file that is compatible with the open project file. If you perform a [recover by record headers](#recover-by-record-headers) repair, you can select any data file. Once this dialog has been validated, the pathname of the file to be repaired is indicated in the window. +### 修復済ファイル +4Dは元のファイルの場所に空のデータファイルを新規作成します。 元のファイルは、"\Replaced Files (Repairing) {日付} {時刻}"という名前のフォルダーがオリジナルの移動先に指定したフォルダー内に作成され (デフォルトはデータベースフォルダー)、そこに移動されます。 修復されたデータは、新規作成された空のファイルに格納されます。 -### Original files backup folder -By default, the original data file will be duplicated before the repair operation. It will be placed in a subfolder named “Replaced files (repairing)” in the database folder. The second **[...]** button can be used to specify another location for the original files to be saved before repairing begins. This option can be used more particularly when repairing voluminous files while using different disks. +## 標準の修復 -### Repaired files +少数のレコードやインデックスが損傷を受けているケース (アドレステーブルは損傷を受けていない) では、標準の修復を選択します。 データは圧縮および修復されます。 このタイプの修復をおこなうには、データファイルとストラクチャーファイルが対応していなければなりません。 -4D creates a new blank data file at the location of the original file. The original file is moved into the folder named "\Replaced Files (Repairing) date time" whose location is set in the "Original files backup folder" area (database folder by default). The blank file is filled with the recovered data. +修復操作が完了すると、MSCの "修復" ページが表示され、修復の結果が表示されます。 修復に成功していれば、その旨のメッセージが表示されます。 その場合、データベースをそのまま使い始めることができます。 ![](assets/en/MSC/MSC_RepairOK.png) -## Standard repair +## レコードヘッダーによる再生 +このローレベルな修復オプションは、データファイルが大きく損傷していて、バックアップの復元や標準の修復など、他の手段では回復できなかった場合にのみ使用します。 -Standard repair should be chosen when only a few records or indexes are damaged (address tables are intact). The data is compacted and repaired. This type of repair can only be performed when the data and structure file match. +4Dのレコードはサイズが可変です。故に、そのレコードをロードするには、ディスク上のどこに格納されているか、その場所を "アドレステーブル" という専用テーブルに記録しておく必要があります。 プログラムは、インデックスやアドレステーブルを経由して、レコードのアドレスにアクセスします。 レコードやインデックスのみが損傷を受けている場合、標準の修復を使用すれば通常は問題が解決されます。 しかし、アドレステーブル自身が損傷を受けている場合には、これを再構築しなくてはならないため、より高度な修復作業が必要となります。 これをおこなうために、MSC は各レコードのヘッダーに位置するマーカーを使用します。 マーカーがレコード情報のサマリーと比較されることにより、アドレステーブルが再構築可能となります。 -When the repair procedure is finished, the "Repair" page of the MSC is displayed. A message indicates if the repair was successful. If so, you can open the database immediately. ![](assets/en/MSC/MSC_RepairOK.png) +> データベースストラクチャーのテーブルプロパティで **レコードを完全に削除** オプションを解除していると、ヘッダーマーカーを使用した復旧によって削除したはずのレコードが復活する原因となります。 ヘッダーによる再生において、整合性の制約は考慮されません。 この処理をおこなった後、重複不可フィールドに重複する値が現れたり、**NULL値を許可しない** に定義したフィールドに NULL値が現れたりするかもしれません。 -## Recover by record headers - -Use this low-level repair option only when the data file is severely damaged and after all other solutions (restoring from a backup, standard repair) have proven to be ineffective. - -4D records vary in size, so it is necessary to keep the location where they are stored on disk in a specific table, named address table, in order to find them again. The program therefore accesses the address of the record via an index and the address table. If only records or indexes are damaged, the standard repair option is usually sufficient to resolve the problem. However, when the address table itself is affected, it requires a more sophisticated recovery since it will be necessary to reconstitute it. To do this, the MSC uses the marker located in the header of each record. The markers are compared to a summary of the record, including the bulk of their information, and from which it is possible to reconstruct the address table. - -> If you have deselected the **Records definitively deleted** option in the properties of a table in the database structure, performing a recovery by header markers may cause records that were previously deleted to reappear. Recovery by headers does not take integrity constraints into account. More specifically, after this operation you may get duplicated values with unique fields or NULL values with fields declared **Never Null**. - -When you click on **Scan and repair...**, 4D performs a complete scan of the data file. When the scan is complete, the results appear in the following window: +**スキャンおよび修復...** ボタンをクリックすると、4Dはデータファイルを完全にスキャンします。 スキャンを完了すると、結果が以下のウィンドウに表示されます: ![](assets/en/MSC/mscrepair2.png) +> すべてのレコードおよびすべてのテーブルに割当先が見つかった場合は、メインエリアのみが表示されます。 -> If all the records and all the tables have been assigned, only the main area is displayed. +"データファイル中で見つかったレコード" エリアには 2つのリストがあり、データスキャン結果の概要が表示されます。 -The "Records found in the data file" area includes two tables summarizing the information from the scan of the data file. +- 左のリストには、データファイルスキャンの情報が表示されます。 各行には、データファイル中の再生可能なレコードのグループが表示されます: + - **順番** の列には、レコードグループの再生順が表示されます。 + - **カウント** 列には、グループに含まれるレコード数が表示されます。 + - **割当先テーブル** 列には、識別されたレコードのグループに割り当てられたテーブルの名前が表示されます。 割り当てられたテーブルの名前は自動で緑色で表示されます。 割り当てされなかったグループ、つまりどのレコードにも関連づけることができなかったテーブルは赤色で表示されます。 + - **再生** 列では、レコードを再生するかどうかを各グループごとに指定できます。 デフォルトで、テーブルに割り当てられるすべてのグループが選択されています。 -- The first table lists the information from the data file scan. Each row shows a group of recoverable records in the data file: - - - The **Order** column indicates the recovery order for the group of records. - - The **Count** column indicates the number of the records in the table. - - The **Destination table** column indicates the names of tables that were automatically assigned to the groups of identified records. The names of tables assigned automatically appear in green. Groups that were not assigned, i.e. tables that could not be associated with any records appear in red. - - The **Recover** column lets you indicate, for each group, whether you want to recover the records. By default, this option is checked for every group with records that can be associated with a table. -- The second table lists the tables of the project file. +- 右側のリストには、プロジェクトファイルのテーブルが表示されます。 -### Manual assigning -If several groups of records could not be assigned to tables due to a damaged address table, you can assign them manually. To do this, first select an unassigned group of records in the first table. The "Content of the records" area then displays a preview of the contents of the first records of the group to make it easier to assign them: +### 手動による割り当て +アドレステーブルが損傷を受けているため、テーブルに割り当てることのできないレコードグループがある場合、それらを手動で割り当てることができます。 これにはまず、左側のリストの中で割り当てられていないレコードグループを選択します。 グループ先頭の複数レコードの内容が "レコードの内容" エリアにプレビューされるため、それがどのテーブルのレコードか判断しやすくなります: ![](assets/en/MSC/mscrepair3.png) -Next select the table you want to assign to the group in the "Unassigned tables" table and click on the **Identify table** button. You can also assign a table using drag and drop. The group of records is then associated with the table and it will be recovered in this table. The names of tables that are assigned manually appear in black. Use the **Ignore records** button to remove the association made manually between the table and the group of records. +次に "割り当てられていないテーブル" リストから、グループを割り当てるテーブルを選択し、**テーブルを識別** ボタンをクリックします。 割り当てのためにドラッグ&ドロップを使用することもできます。 結果そのレコードグループは選択したテーブルに割り当てられ、そのテーブルのレコードとして再生されます。 手動で割り当てられたテーブルはリスト中黒色で表示されます。 **レコードを無視する** ボタンをクリックすると、レコードグループに対するテーブルの割り当てを手動で解除できます。 + -## Open log file +## ログファイルを開く -After repair is completed, 4D generates a log file in the Logs folder of the database. This file allows you to view all the operations carried out. It is created in XML format and named: *DatabaseName**_Repair_Log_yyyy-mm-dd hh-mm-ss.xml*" where: +修復が完了すると、4D はデータベースの Logs フォルダーにログファイルを生成します。 このファイルを使用すると実行されたオペレーションをすべて閲覧することができます。 このファイルは XML形式で作成され、*DatabaseName_Repair_Log_yyyy-mm-dd hh-mm-ss.xml* というファイル名がつけられます。 -- *DatabaseName* is the name of the project file without any extension, for example "Invoices", -- *yyyy-mm-dd hh-mm-ss* is the timestamp of the file, based upon the local system time when the maintenance operation was started, for example "2019-02-11 15-20-45". +- *DatabaseName* は拡張子を除いたプロジェクトファイルの名前です (例: "Invoices" 等) +- *yyyy-mm-dd hh-mm-ss* はファイルのタイムスタンプです。これはローカルのシステム時間でメンテナンスオペレーションが開始された時刻に基づいています (例: "2019-02-11 15-20-45")。 -When you click on the **Open log file** button, 4D displays the most recent log file in the default browser of the machine. \ No newline at end of file +**ログファイルを開く** ボタンをクリックすると、4Dはマシンのデフォルトブラウザーを使用して直近のログファイルを開きます。 diff --git a/website/translated_docs/ja/MSC/restore.md b/website/translated_docs/ja/MSC/restore.md index 50e0e078ed1ee1..58d5f65f013dc6 100644 --- a/website/translated_docs/ja/MSC/restore.md +++ b/website/translated_docs/ja/MSC/restore.md @@ -1,66 +1,65 @@ --- id: restore -title: Restore Page -sidebar_label: Restore Page +title: 復元ページ +sidebar_label: 復元ページ --- -## Restoring a backup +## 手動でバックアップから復元する -You can manually restore an archive of the current database using the **Restore** page. This page provides several options that can be used to control the database restoration: +**復元**ページから、カレントデータベースのアーカイブを手動で復元できます。 このページでは、データベースの復元を制御するためのオプションをいくつか提供します: ![](assets/en/MSC/MSC_restore.png) -> 4D automatic recovery systems restore databases and include data log file when necessary. +> 4D の自動復元機能は、データベース復元後に場合に応じてデータログファイルを統合します。 -The list found in the left part of the window displays any existing backups of the database. You can also click on the Browse... button found just under the area in order to open any other archive file from a different location. It is then added to the list of archives. +ウィンドウの左側には、データベースの既存のバックアップが表示されます。 **ブラウズ...** ボタンをクリックして、他の場所にあるアーカイブファイルを選択することもできます。 選択したアーカイブはリストに追加されます。 -When you select a backup in this list, the right part of the window displays the information concerning this particular backup: +このリストからバックアップファイルを選択すると、ウィンドウの右側にはそのバックアップについての説明が表示されます: -- **Path**: Complete pathname of the selected backup file. Clicking the Show button opens the backup file in a system window. -- **Date and Time**: Date and time of backup. -- **Content**: Contents of the backup file. Each item in the list has a check box next to it which can be used to indicate whether or not you want to restore it. You can also use the **Check All** or **Uncheck All** buttons to set the list of items to be restored. -- **Destination folder of the restored files**: Folder where the restored files will be placed. By default, 4D restores the files in a folder named “Archivename” (no extension) that is placed next to the database structure file. To change this location, click on **[...]** and specify the folder where you want the restored files to be placed. +- **パス**: 選択されたバックアップファイルの完全パス名。 **表示** ボタンをクリックすると、システムウィンドウでバックアップファイルが表示されます。 +- **日付と時刻**: バックアップの日付と時刻 +- **内容**: バックアップファイルの内容。 各項目の右側にはチェックボックスがあり、復元をおこなうかどうか、ファイルごとに選択できます。 **すべてを選択する** や **すべての選択をはずす** ボタンを利用して、復元するファイルの設定をおこなうこともできます。 +- **復元されたファイルの保存先フォルダー**: 復元されたファイルが配置されるフォルダー。 デフォルトで 4D はデータベースストラクチャーと同階層にアーカイブ名 (拡張子なし) のフォルダーを作成し、そこにファイルを復元します。 この場所を変更するには **[...]** をクリックして復元ファイルの配置場所を指定します。 -The **Restore** button launches the manual restoration of the selected element(s). +**復元** ボタンをクリックすると、選択した項目の復元処理が実行されます。 -## Successive integration of several data log files +## 複数のログファイルを連続して統合する -The **Integrate one or more log file(s) after restore** option allows you to integrate several data log files successively into a database. If, for example, you have 4 journal file archives (.4BL) corresponding to 4 database backups, you can restore the first backup then integrate the journal (data log) archives one by one. This means that you can, for example, recover a data file even when the last backup files are missing. +**復元後にひとつ以上のログファイルを統合** オプションを使用して、データベースに複数のログファイルを統合することができます。 たとえば、4つのデータベースバックアップに対応する 4つのログファイルアーカイブがある場合、最初のバックアップを復元して、ログアーカイブを一つずつ統合することが可能です。 これにより、たとえば最新のバックアップファイルを失った場合でも、データファイルを復旧することができます。 -When this option is checked, 4D displays the standard Open file dialog box after the restore, which can be used to select journal file to be integrated. The Open file dialog box is displayed again after each integration until it is cancelled. +このオプションが選択されていると、4Dは復元後に標準のファイルを開くダイアログを表示します。ここで統合するログファイルを選択できます。 ファイルを開くダイアログは、キャンセルされるまで統合の都度表示されます。 -## Restoring an encrypted database +## 暗号化されたデータベースの復元 -Keep in mind that the data encryption key (passphrase) may have been changed through several versions of backup files (.4BK), .journal files (.4BL) and the current database. Matching encryption keys must always be provided. +カレントデータベースと複数のバックアップファイル (.4BK) やログファイル (.4BL) の間で、データ暗号化キー (パスフレーズ) が変更されている可能性があることに注意が必要です。 合致した暗号化キーは常に必要となります。 -When restoring a backup and integrating the current log file in a encrypted database: +暗号化されたデータベースのバックアップを復元し、カレントログファイルを統合したい場合、以下の点に注意してください: -- If you restore a backup using an old passphrase, this passphrase will be required at the next database startup. -- After an encryption, when opening the encrypted data file, a backup is run and a new journal file is created. Thus, it is not possible to restore a .4BK file encrypted with one key and integrate .4BL files encrypted with another key. +- 古いパスフレーズを使用してバックアップを復元した場合、そのパスフレーズは次回のデータベース起動時に必要となります。 +- 暗号化のあと、暗号化されたデータファイルを開く際に、バックアップが実行され新しいログファイルが作成されます。 そのため、バックアップファイル (.4BK) を特定のキーで復号化した後、異なるキーで暗号化されたログファイル (.4BL) をそれに統合することはできません。 -The following sequence illustrates the principles of a multi-key backup/restore operation: +以下の表は、複数のキーを使用したバックアップ/復元操作における過程の一例をまとめたものです: -| 演算子 | Generated files | Comment | -| --------------------------- | ------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| New database | | | -| Add data (record # 1) | | | -| Backup database | 0000.4BL and 0001.4BK | | -| Add data (record # 2) | | | -| Backup database | 0001.4BL and 0002.4BK | | -| Add data (record # 3) | | | -| Encrypt data file with key1 | 0003.4BK file (encrypted with key1) | Encryption saves original files (including journal) in folder "Replaced files (Encrypting) YYY-DD-MM HH-MM-SS". When opening the encrypted data file, a new journal is created and a backup is made to activate this journal | -| Add data (record #4) | | | -| Backup database | 0003.4BL and 0004.4BK files (encrypted with key1) | We can restore 0003.4BK and integrate 0003.4BL | -| Add data (record # 5) | | | -| Backup database | 0004.4BL and 0005.4BK files (encrypted with key1) | We can restore 0003.4BK and integrate 0003.4BL + 0004.4BL. We can restore 0004.4BK and integrate 0004.4BL | -| Add data (record # 6) | | | -| Encrypt data file with key2 | 0006.4BK file (encrypted with key2) | Encryption saves original files (including journal) in folder "Replaced files (Encrypting) YYY-DD-MM HH-MM-SS". When opening the encrypted data file, a new journal is created and a backup is made to activate this journal | -| Add data (record # 7) | | | -| Backup database | 0006.4BL and 0007.4BK files (encrypted with key2) | We can restore 0006.4BK and integrate 0006.4BL | -| Add data (record # 8) | | | -| Backup database | 0007.4BL and 0008.4BK files (encrypted with key2) | We can restore 0006.4BK and integrate 0006.4BL + 0007.4BL. We can restore 0007.4BK and integrate 0007.4BL | - -> When restoring a backup and integrating one or several .4BL files, the restored .4BK and .4BL files must have the same encryption key. During the integration process, if no valid encryption key is found in the 4D keychain when the .4BL file is integrated, an error is generated. +| 演算子 | 生成されるファイル | 説明 | +| -------------------- | ------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 新規データベース作成 | | | +| 新規データ追加 (レコード番号1番) | | | +| データベースをバックアップ | 0000.4BL および 0001.4BK | | +| データを追加 (レコード番号2番) | | | +| データベースをバックアップ | 0001.4BL および 0002.4BK | | +| データを追加 (レコード番号3番) | | | +| Key1を使用してデータファイルを暗号化 | 0003.4BK ファイル (Key1で暗号化) | 暗号化をすると (ログファイルも含め) 元のファイルは "Replaced files (Encrypting) YYY-DD-MM HH-MM-SS" というフォルダーに保存されます。 暗号化されたデータファイルを開く際、新しいログファイルが作成され、このログファイルを有効化するためにバックアップ処理がおこなわれます。 | +| データを追加 (レコード番号4番) | | | +| データベースをバックアップ | 0003.4BL および 0004.4BK ファイル (Key1で暗号化) | 0003.4BK を復元し、0003.4BL を統合することが可能です | +| データを追加 (レコード番号5番) | | | +| データベースをバックアップ | 0004.4BL および 0005.4BK ファイル (Key1で暗号化) | 0003.4BK を復元し、0003.4BL + 0004.4BL を統合することが可能です。 また、0004.4BK を復元し、0004.4BL を統合することが可能です。 | +| データを追加 (レコード番号6番) | | | +| Key2を使用してデータファイルを暗号化 | 0006.4BK ファイル (Key2で暗号化) | 暗号化をすると (ログファイルも含め) 元のファイルは "Replaced files (Encrypting) YYY-DD-MM HH-MM-SS" というフォルダーに保存されます。 暗号化されたデータファイルを開く際、新しいログファイルが作成され、このログファイルを有効化するためにバックアップ処理がおこなわれます。 | +| データを追加 (レコード番号7番) | | | +| データベースをバックアップ | 0006.4BL および 0007.4BK ファイル (Key2で暗号化) | 0006.4BK を復元し、0006.4BL を統合することが可能です | +| データを追加 (レコード番号8番) | | | +| データベースをバックアップ | 0007.4BL および 0008.4BK ファイル (Key2で暗号化) | 0006.4BK を復元し、0006.4BL + 0007.4BL を統合することが可能です。 また、0007.4BK を復元し、0007.4BL を統合することが可能です。 | +> バックアップを復元し、一つ以上の .4BL ファイルを統合する場合、復元された .4BK ファイルおよび .4BL ファイルは同じ暗号化キーを持っていなければなりません。 統合プロセスの間、.4BL ファイルが統合される際に有効な暗号化キーが 4Dキーチェーンに見つからなかった場合、エラーが生成されます。 > -> If you have stored successive data keys on the same external device, restoring a backup and integrating log files will automatically find the matching key if the device is connected. \ No newline at end of file +> 連続した複数のデータキーを同じ外部デバイスに保存していた場合、バックアップの復元とログファイルの統合をおこなうと、デバイスが接続されていれば合致するキーの検索が自動的におこなわれます。 diff --git a/website/translated_docs/ja/MSC/rollback.md b/website/translated_docs/ja/MSC/rollback.md index 96bbadc248d2b9..789a79f00b8fbc 100644 --- a/website/translated_docs/ja/MSC/rollback.md +++ b/website/translated_docs/ja/MSC/rollback.md @@ -1,25 +1,25 @@ --- id: rollback -title: Rollback Page -sidebar_label: Rollback Page +title: ロールバックページ +sidebar_label: ロールバックページ --- -You use the Rollback page to access the rollback function among the operations carried out on the data file. It resembles an undo function applied over several levels. It is particularly useful when a record has been deleted by mistake in a database. +このページは、データファイルに対して実行された操作をロールバックする機能を提供します。 この機能は、複数レベルに適用された取り消し機能に似ています。 この機能はとくに、間違ってデータベースレコードを削除した場合に便利です。 -This function is only available when the database functions with a data log file. +この機能は、データベースのログファイルが有効なときにのみ使用できます。 ![](assets/en/MSC/MSC_rollback1.png) -> If the database is encrypted and no valid data key corresponding to the open log file has been provided, encrypted values are not displayed in the **Values** column and a dialog requesting the passphrase or the data key is displayed if you click the **Rollback** button. +> データベースが暗号化されており、開かれたログファイルに対応する有効なデータキーが提供されていない場合、暗号化された値は **値** カラムには表示されません。そのような状況で **ロールバック** ボタンをクリックすると、パスフレーズまたはデータキーを要求するダイアログボックスが表示されます。 -The contents and functioning of the list of operations are the same as for the [Activity analysis](analysis.md) window. +操作リストの内容と動作は [ログ解析](analysis.md) ページのものと同じです。 -To perform a rollback among the operations, select the row after which all operations must be cancelled. The operation of the selected row will be the last kept. If, for example, you wish to cancel a deletion, select the operation located just before it. The deletion operation, as well as all subsequent operations, will be cancelled. +操作のロールバックをおこなうには、それ以降の全操作をキャンセルする行を選択します。 選択された行が保持される最後の操作になります。 たとえば削除をキャンセルしたい場合、その削除操作のひとつ前の行を選択します。 すると、削除操作とそれ以降の処理がすべてキャンセルされます。 ![](assets/en/MSC/MSC_rollback2.png) -Next click on the **Rollback** button. 4D asks you to confirm the operation. If you click **OK**, the data is then restored to the exact state it was in at the moment of the selected action. +次に、**ロールバック** ボタンをクリックします。 4Dは処理を続行してもよいか、確認してきます。 **OK** をクリックすると、データは選択された行の状態に戻ります。 -You use the menu found at the bottom of the window to select a data log file to be used when you apply the rollback function to a database restored from an archive file. In this case, you must specify the data log file corresponding to the archive. +アーカイブされたファイルから復旧したデータベースに対してロールバックをおこなう場合には、ウィンドウの下部にあるメニューを使用して適用するログファイルを選択できます。 この場合、アーカイブに対応するログファイルを指定しなければなりません。 -Here is how the rollback function works: when the user clicks the **Rollback** button, 4D shuts the current database and restores the last backup of the database data. The restored database is then opened and 4D integrates the operations of the data log file up through to the selected operation. If the database has not yet been saved, 4D starts with a blank data file. \ No newline at end of file +ロールバックは次のように動作します: ユーザーが **ロールバック** ボタンをクリックすると、4Dはカレントデータベースを閉じ、最新のバックアップからデータベースデータの復元をおこないます。 復元されたデータベースが開かれ、4Dはログファイル中で選択された操作までを統合します。 データベースがまだ保存されていない場合、4Dは空のデータファイルを使います。 diff --git a/website/translated_docs/ja/MSC/verify.md b/website/translated_docs/ja/MSC/verify.md index e3601bcc1c9912..26f15b7868528f 100644 --- a/website/translated_docs/ja/MSC/verify.md +++ b/website/translated_docs/ja/MSC/verify.md @@ -1,55 +1,56 @@ --- id: verify -title: Verify Page -sidebar_label: Verify Page +title: 検査ページ +sidebar_label: 検査ページ --- -You use this page to verify data integrity. The verification can be carried out on records and/or indexes. This page only checks the data integrity. If errors are found and repairs are needed, you will be advised to use the [Repair page](repair.md). +このページでは、データおよび構造上の整合性を検査できます。 検査は、レコードおよびインデックスについて実行できます。 この機能は検査のみをおこないます。 エラーが見つかり修復が必要な場合は [修復ページ](repair.md) を使用するよう表示されます。 -## Actions -The page contains action buttons that provide direct access to the verification functions. +## アクション -> When the database is encrypted, verification includes validation of encrypted data consistency. If no valid data key has already been provided, a dialog requesting the passphrase or the data key is displayed. +このページには、検査機能に直接アクセスするための、次のアクションボタンが置かれています。 +> データベースが暗号化されている場合、検査の中には暗号化されたデータの整合性の評価も含まれます。 有効なデータキーがまだ提供されていない場合、パスフレーズ、あるいはデータキーを要求するダイアログが表示されます。 -- **Verify the records and the indexes:** Starts the total data verification procedure. -- **Verify the records only**: Starts the verification procedure for records only (indexes are not verified). -- **Verify the indexes only**: Starts the verification procedure for indexes only (records are not verified). -> Verification of records and indexes can also be carried out in detail mode, table by table (see the Details section below). +- **レコードとインデックスを検査**: 全体のデータ検査処理を開始します。 +- **レコードのみを検査**: レコードのみの検査処理を開始します (インデックスは検査されません)。 +- **インデックスのみを検査**: インデックスのみの検査処理を開始します (レコードは検査されません)。 +> レコードとインデックスの検査は、テーブルごとに検査する詳細モードでおこなうこともできます(後述の ”詳細” の章を参照してください)。 -## Open log file -Regardless of the verification requested, 4D generates a log file in the `Logs` folder of the database. This file lists all the verifications carried out and indicates any errors encountered, when applicable ([OK] is displayed when the verification is correct). It is created in XML format and is named: *DatabaseName**Verify_Log**yyyy-mm-dd hh-mm-ss*.xml where: +## ログファイルを開く -- *DatabaseName* is the name of the project file without any extension, for example "Invoices", -- *yyyy-mm-dd hh-mm-ss* is the timestamp of the file, based upon the local system time when the maintenance operation was started, for example "2019-02-11 15-20-45". +要求された検査に関係なく、4D はデータベースの `Logs` フォルダーにログファイルを生成します。 このファイルには実行された検査の内容が記録され、エラーがあればそれも示されます。問題がない場合は [OK] が表示されます。 このファイルは XML形式で、ファイル名は *DatabaseName*__Verify_Log__*yyyy-mm-dd hh-mm-ss*.xml となり、それぞれ以下の要素が入ります: -When you click on the **Open log file** button, 4D displays the most recent log file in the default browser of the machine. +- *DatabaseName* は拡張子を除いたプロジェクトファイルの名前です (例: "Invoices" 等) +- *yyyy-mm-dd hh-mm-ss* はファイルのタイムスタンプです。これはローカルのシステム時間でメンテナンスオペレーションが開始された時刻に基づいています (例: "2019-02-11 15-20-45")。 -## Details +**ログファイルを開く** ボタンをクリックすると、4Dはマシンのデフォルトブラウザーを使用して直近のログファイルを開きます。 -The **Table list** button displays a detailed page that can be used to view and select the actual records and indexes to be checked: -![](assets/en/MSC/MSC_Verify.png) +## 詳細 + +**テーブルリスト** ボタンは、検査するレコードおよびインデックスを選択するために使用する詳細ページを表示します: -Specifying the items to be verified lets you save time during the verification procedure. +![](assets/en/MSC/MSC_Verify.png) -The main list displays all the tables of the database. For each table, you can limit the verification to the records and/or indexes. Expand the contents of a table or the indexed fields and select/deselect the checkboxes as desired. By default, everything is selected. You can also use the **Select all**, **Deselect all**, **All records** and **All indexes** shortcut buttons. -For each row of the table, the "Action" column indicates the operations to be carried out. When the table is expanded, the "Records" and "Indexed fields" rows indicate the number of items concerned. +検査する項目を指定することにより、検査処理にかかる時間を短縮できます。 -The "Status" column displays the verification status of each item using symbols: +リストには、データベースの全テーブルが表示されます。 各テーブルに対して、検査対象をレコードやインデックスに限定できます。 三角形のアイコンをクリックしてテーブルまたはインデックス付フィールドの内容を展開し、要求に応じてチェックボックスにチェックを入れたり解除したりします。 デフォルトでは、すべての項目にチェックが入っています。 **すべて選択**、**すべての選択をはずす**、**すべてのレコード** および **すべてのインデックス** のショートカットボタンも使用できます。 -| ![](assets/en/MSC/MSC_OK.png) | Verification carried out with no problem | -| ------------------------------ | ---------------------------------------------- | -| ![](assets/en/MSC/MSC_KO2.png) | Verification carried out, problems encountered | -| ![](assets/en/MSC/MSC_KO3.png) | Verification partially carried out | -| ![](assets/en/MSC/MSC_KO.png) | Verification not carried out | +テーブルの各行に対して、"アクション" カラムは実行する操作を表示します。 テーブルが展開されると、"レコード" および "インデックスフィールド" の行は関連する項目の数を表示します。 +"ステータス" カラムは、記号を使用して各項目の検査ステータスを表示します: -Click on **Verify** to begin the verification or on **Standard** to go back to the standard page. +| ![](assets/en/MSC/MSC_OK.png) | 検査の結果、問題はなかった | +| ------------------------------ | -------------- | +| ![](assets/en/MSC/MSC_KO2.png) | 検査の結果、問題が見つかった | +| ![](assets/en/MSC/MSC_KO3.png) | 検査は部分的に実行された | +| ![](assets/en/MSC/MSC_KO.png) | 検査は実行されなかった | -The **Open log file** button can be used to display the log file in the default browser of the machine (see [Open log file](#open-log-file) above). +検査を開始するには **検査** ボタンをクリックします。標準ページに戻る時は **標準** ボタンをクリックします。 -> The standard page will not take any modifications made on the detailed page into account: when you click on a verification button on the standard page, all the items are verified. On the other hand, the settings made on the detailed page are kept from one session to another. \ No newline at end of file +**ログファイルを開く** ボタンをクリックすると、マシンのデフォルトブラウザーを使用してログファイルを表示します (上記の [ログファイルを開く](#ログファイルを開く) 参照)。 +> 標準ページは、詳細ページでおこなわれた変更はまったく考慮しません。標準ページの検査ボタンをクリックすると、すべての項目が検査されます。 逆に、詳細ページでおこなわれた設定は、セッションからセッションへと保持されます。 diff --git a/website/translated_docs/ja/Menus/bars.md b/website/translated_docs/ja/Menus/bars.md index 0246d7034d7153..eecdaceac6d801 100644 --- a/website/translated_docs/ja/Menus/bars.md +++ b/website/translated_docs/ja/Menus/bars.md @@ -1,39 +1,41 @@ --- id: bars -title: Menu bar features +title: メニューバーの管理 --- -Menu bars provide the major interface for custom applications. For each custom application, you must create at least one menu bar with at least one menu. By default, Menu Bar #1 is the menu bar displayed in the Application environment. You can change which menu bar is displayed using the `SET MENU BAR` command. +メニューバーはカスタムアプリケーションにおいて主要なインターフェースを提供します。 各カスタムアプリケーションにおいて、最低1つのメニューを添付したメニューバーを1つ作成しなければなりません。 デフォルトで、メニューバー#1 がアプリケーションモードで表示されます。 `SET MENU BAR` コマンドを使用して、メニューバーを変更することができます。 -4D lets you associate a custom splash screen picture with each menu bar and to preview this menu bar at any time. +各メニューバーにはカスタムスプラッシュスクリーンを関連付けることができます。またメニューバーとスプラッシュスクリーンはプレビューすることができます。 -## Splash screen -You can enhance the appearance of each menu bar by associating a custom splash screen with it. The window containing the splash screen is displayed below the menu bar when it appears. It can contain a logo or any type of picture. By default, 4D displays the 4D logo in the splash screen: +## スプラッシュスクリーン -![](assets/en/Menus/splash1.png) -A custom splash screen picture can come from any graphic application. 4D lets you paste a clipboard picture or use any picture present on your hard disk. Any standard picture format supported by 4D can be used. +各メニューバーにカスタムスラッシュスクリーンを関連付けることにより、アピアランスを拡張できます。 スプラッシュスクリーンを含むウィンドウは、メニューバーが表示されるとき、その下に表示されます。 ロゴなどのピクチャーを表示できます。 デフォルトで、4D はスプラッシュスクリーンに 4D ロゴを表示します: + +![](assets/en/Menus/splash1.png) -The splash screen picture can be set only in the Menu editor: select the menu bar with which you want to associate the custom splash screen. Note the "Background Image" area in the right-hand part of the window. To open a picture stored on your disk directly, click on the **Open** button or click in the "Background Image" area. A pop-up menu appears: +任意の画像編集アプリケーションで作成したピクチャーをスプラッシュスクリーンで使用できます。 クリップボードにコピーした画像、あるいはハードディスク上の画像を使用できます。 4D がサポートする標準のピクチャータイプの画像を使用できます。 -- To paste a picture from the clipboard, choose **Paste**. -- To open a picture stored in a disk file, choose **Open**. If you choose Open, a standard Open file dialog box will appear so that you can select the picture file to be used. Once set, the picture is displayed in miniature in the area. It is then associated with the menu bar. +スプラッシュスクリーンピクチャーはメニューエディターでのみ設定できます: まず、カスタムスプラッシュスクリーンを割り当てたいメニューバーを選択します。 ウィンドウ右側に"背景画像"エリアが表示されます。 ディスクに保存されたピクチャーを直接開くには、**開く** ボタンをクリックするか、“背景画像” エリアをクリックします。 ポップアップメニューが表示されます: +- クリップボードのピクチャーをペーストするには **ペースト** を選択します。 +- ディスクファイルとして保存された画像を開くには **開く** を選択します。 開くを選択すると、標準のファイルを開くダイアログボックスが表示されます。使用するピクチャーを選択します。 設定が完了すると、選択した画像がプレビューとして表示されます。 これにより、メニューバーとの関連付けが確認できます。 ![](assets/en/Menus/splash2.png) -You can view the final result by testing the menu bar (see the following section). In Application mode, the picture is displayed in the splash screen with the "Truncated (Centered)" type format. +メニューバーをテストすると、設定の結果を見ることができます (後述参照)。 アプリケーションモードでは、ピクチャーはスプラッシュスクリーンに "トランケート (中央合わせ)" で表示されます。 + +> データベース設定では、インターフェース>一般の **ウィンドウの表示** オプションを使用して、スプラッシュスクリーンの表示/非表示を設定できます。 -> You can choose whether to display or hide this window using the **Display toolbar** option in the Database Settings. +カスタムピクチャーを削除してデフォルトに戻すには、**クリア** ボタンをクリックするか、エリアポップアップメニューから **クリア** を選択します。 -To remove the custom picture and display the default one instead, click on the **Clear** button or select **Clear** in the area pop-up menu. -## Previewing menu bars +## メニューバーのプレビュー -The Menu Bar editor lets you view the custom menus and splash screen at any time, without closing the toolbox window. +メニューバーエディターからカスタムメニューとスプラッシュスクリーンをプレビューできます。ツールボックスウィンドウを閉じる必要はありません。 -To do so, simply select the menu bar and choose **Test the menu bar "Menu Bar #X"** in the context menu or the options menu of the editor. +これをおこなうにはメニューバーを選択して、コンテキストメニューまたはエディターのオプションメニューから、**メニューバー “メニューバー #X” をテスト** を選択します。 ![](assets/en/Menus/splash3.png) -4D displays a preview of the menu bar as well as the splash screen. You can scroll down the menus and sub-menus to preview their contents. However, these menus are not active. To test the functioning of menus and the toolbar, you must use the **Test Application** command from the **Run** menu. \ No newline at end of file +すると、メニューバーとスプラッシュスクリーンのプレビューが表示されます。 メニューや階層メニューを表示させることができます。 ただし、プレビュー状態のメニューを選択してもコマンドは実行されません。 メニューやツールバーの動作を確認するには、**実行** メニューから **アプリケーションモード** を選択します。 diff --git a/website/translated_docs/ja/Menus/creating.md b/website/translated_docs/ja/Menus/creating.md index fba82317ea9a60..def9e921c3d5ec 100644 --- a/website/translated_docs/ja/Menus/creating.md +++ b/website/translated_docs/ja/Menus/creating.md @@ -1,103 +1,105 @@ --- id: creating -title: Creating menus and menu bars +title: メニューとメニューバーの作成 --- -You can create menus and menu bars: +メニューおよびメニューバーを作成するには次の 2つの方法があります: -- using the Menus editor of the 4D Toolbox window. In this case, menus and menu bars are stored in the application's structure. -- dynamically, using the language commands from the "Menus" theme. In this case, menus and menu bars are not stored, they only exist in memory. +- 4Dツールボックスウィンドウのメニューエディターを使用する。 この場合、メニューとメニューバーはアプリケーションのストラクチャーに保存されます。 +- "メニュー" テーマのランゲージコマンドを使用して動的におこなう。 この場合、メニューとメニューバーは保存されず、メモリ内にのみ存在します。 -You can combine both features and use menus created in structure as templates to define menus in memory. +両方の機能を組み合わせて、メモリ内のメニューを定義するのに、ストラクチャーに作成したメニューをテンプレートとして使うこともできます。 -## Default menu bar -A custom application must contain at least one menu bar with one menu. By default, when you create a new database, 4D automatically creates a default menu bar (Menu Bar #1) so that you can access the Application environment. The default menu bar includes standard menus and a command for returning to the Design mode. +## デフォルトメニューバー -This allows the user to access the Application environment as soon as the database is created. Menu Bar #1 is called automatically when the **Test Application** command is chosen in the **Run** menu. +カスタムアプリケーションには、少なくとも 1つのメニューを持つ 1つのメニューバーが必要です。 新規にデータベースを作成すると、4D は自動でデフォルトメニューバー (メニューバー#1) を作成します。 このデフォルトメニューバーには、標準のメニューとデザインモードに入るためのコマンドが用意されています。 -The default menu bar includes three menus: +このメニューが用意されているため、ユーザーはデータベースを起動するとすぐにアプリケーションモードを使用できます。 **実行** メニューから **アプリケーションモード** コマンドを選択すると、自動でメニューバー#1 が呼び出されます。 -- **File**: only includes the **Quit** command. The *Quit* standard action is associated with the command, which causes the application to quit. -- **Edit**: standard and completely modifiable. Editing functions such as copy, paste, etc. are defined using standard actions. -- **Mode**: contains, by default, the **Return to Design mode** command, which is used to exit the Application mode. +デフォルトメニューバーには 3つメニューがあります: -> Menu items appear *in italics* because they consist of references and not hard-coded text. Refer to [Title property](properties.md#title). +- **ファイル**: このメニューには **終了** コマンドだけが含まれています。 このコマンドには *quit* 標準アクションが割り当てられていて、選択されるとアプリケーションが終了します。 +- **編集**: 編集メニューは標準であり、内容の変更が可能です。 編集メニューのコマンド (コピーやペーストなど) は標準アクションで指定できます。 +- **モード**: モードメニューにはデフォルトで、アプリケーションモードを終了するための **デザインモードに戻る** コマンドが含まれます。 +> メニュータイトルはハードコードされたテキストではなく、xliff 参照を使用しています。 この点については [タイトルプロパティ](properties.md#タイトル) を参照してください。 -You can modify this menu bar as desired or create additional ones. +このメニューバーを必要に応じて変更したり、新しく追加したりできます。 -## Creating menus -### Using the Menu editor +## メニューの作成 -1. Select the item you want to create and click the add ![](assets/en/Menus/PlussNew.png) button below the menu bar area. OR Choose **Create a new menu bar** or **Create a new menu** from the context menu of the list or the options menu below the list. If you created a menu bar, a new bar appears in the list containing the default menus (File and Edit). -2. (optional) Double-click on the name of the menu bar/menu to switch it to editing mode and enter a custom name. OR Enter the custom name in the "Title" area. Menu bar names must be unique. They may contain up to 31 characters. You can enter the name as "hard coded" or enter a reference (see [information about the Title property](properties.md#title)). +### メニューエディターを使用する -### Using the 4D language +1. 作成する対象 (メニューバーまたはメニュー) を選択し、エリアの下にある追加ボタン ![](assets/en/Menus/PlussNew.png) をクリックします。 または
リストのコンテキストメニューまたはリストの下にあるオプションメニューから **新規メニューバー作成** あるいは **新規メニュー作成** を選択します。 メニューバーを作成した場合は、新しいメニューバーがリスト中に追加され、デフォルトメニュー (ファイルと編集) があらかじめ添付されています。 +2. (任意) メニューバー/メニューの名前の上でダブルクリックすると、名前を編集できるモードになり、名前を変更することができます。 または
ウィンドウ右の "タイトル" エリアに名前を入力します。 メニューバー名はユニークでなければなりません。 名前には 31文字までの文字列を指定できます。 メニューのタイトルには文字列リテラルのほかに、参照も使用できます ([タイトルプロパティ](properties.md#タイトル) の説明を参照ください)。 -Use the `Create menu` command to create a new menu bar or menu reference (*MenuRef*) in memory. +### 4Dランゲージを使用する +`Create menu` コマンドを使って、新規メニューバーまたはメニュー参照 (*MenuRef*) をメモリ上に作成します。 -When menus are handled by means of *MenuRef* references, there is no difference per se between a menu and a menu bar. In both cases, it consists of a list of items. Only their use differs. In the case of a menu bar, each item corresponds to a menu which is itself composed of items. +メニューが *MenuRef* 参照を使用して処理される場合、メニューとメニューバーの間に違いはありません。 両方とも項目のリストから構成されます。 それらの利用方法のみが異なります。 メニューバーの各項目は、それ自身が 1つのメニューであり、項目から構成されています。 -`Create menu` can create empty menus (to fill using `APPEND MENU ITEM` or `INSERT MENU ITEM`) or by menus built upon menus designed in the Menu editor. +`Create menu` で空のメニューを作成した場合には、`APPEND MENU ITEM` または `INSERT MENU ITEM` コマンドによって項目を追加していきます。また、同コマンドのソースメニューとして、メニューエディターで定義されたメニューを指定した場合には、そのコピーが新しいメニューとして作成されます。 -## Adding items +## 項目の追加 +各メニューには、メニューがクリックされたときにドロップダウン表示されるメニュー項目を作成しなければなりません。 項目を追加してメソッドや標準アクションを割り当てたり、他のメニューをサブメニューとして添付したりできます。 -For each of the menus, you must add the commands that appear when the menu drops down. You can insert items that will be associated with methods or standard actions, or attach other menus (submenus). +### メニューエディターを使用する +メニュー項目を追加するには: -### Using the Menu editor +1. ソースメニューリスト中で、項目を追加するメニューを選択します。 メニューが既に項目を持っていれば、それが中央のリストに表示されます。 新しい項目を挿入するには、その上にくる項目を選択します。 ドラッグ&ドロップ操作で、後から順番を変更することも可能です。 +2. メニューエディターのオプションメニュー、またはエディターのコンテキストメニュー (中央のリスト内で右クリック) から **メニューバー/メニュー "メニュー名" に項目を追加** を選択します。 または
中央のリストの下にある追加ボタン ![](assets/en/Menus/PlussNew.png) をクリックします。 項目が追加され、デフォルト名 "項目 X" が割り当てられます (X は項目の番号)。 +3. 項目名の上でダブルクリックすると、名前を編集できるモードになり、名前を変更することができます。 または
ウィンドウ右の "タイトル" エリアに名前を入力します。 名前には 31文字までの文字列を指定できます。 メニューのタイトルには文字列リテラルのほかに、参照も使用できます (後述参照)。 -To add a menu item: -1. In the list of source menus, select the menu to which you want to add a command. If the menu already has commands, they will be displayed in the central list. If you want to insert the new command, select the command that you want it to appear above. It is still be possible to reorder the menu subsequently using drag and drop. -2. Choose **Add an item to menu “MenuName”** in the options menu of the editor or from the context menu (right click in the central list). OR Click on the add ![](assets/en/Menus/PlussNew.png) button located below the central list. 4D adds a new item with the default name “Item X” where X is the number of items already created. -3. Double-click on the name of the command in order to switch it to editing mode and enter a custom name. OR Enter the custom name in the "Title" area. It may contain up to 31 characters. You can enter the name as "hard coded" or enter a reference (see below). +### 4Dランゲージを使用する -### Using the 4D language +既存のメニュー参照にメニュー項目を挿入するには `INSERT MENU ITEM` または `APPEND MENU ITEM` コマンドを使います。 -Use `INSERT MENU ITEM` or `APPEND MENU ITEM` to insert or to add menu items in existing menu references. -## Deleting menus and items +## メニューや項目の削除 -### Using the Menu editor +### メニューエディターを使用する +メニューエディターを使って、メニューバー、メニュー、メニュー項目をいつでも削除できます。 各メニューやメニューバーは 1つの参照しか持たない点に留意してください。 あるメニューが、複数のメニューバーやメニューに添付されていた場合、そのメニューに対しておこわれた変更や削除はこのメニューのすべての他のオカレンスに対しても有効となります。 メニューを削除すると、参照だけが削除されます。 特定のメニューへの最後の参照を削除しようとすると、4Dはアラートを表示します。 -You can delete a menu bar, a menu or a menu item in the Menu editor at any time. Note that each menu or menu bar has only one reference. When a menu is attached to different bars or different menus, any modification or deletion made to the menu is immediately carried out in all other occurrences of this menu. Deleting a menu will only delete a reference. When you delete the last reference of a menu, 4D displays an alert. +メニューバー、メニュー、メニューコマンドを削除するには: -To delete a menu bar, menu or menu item: +- 削除する項目を選択し、リストの下にある削除ボタン ![](assets/en/Menus/MinussNew.png) をクリックします。 +- コンテキストメニューまたはエディターのオプションメニューから **〜 を削除** コマンドを選択します。 -- Select the item to be deleted and click on the delete ![](assets/en/Menus/MinussNew.png) button located beneath the list. -- or, use the appropriate **Delete...** command from the context menu or the options menu of the editor. +> メニューバー#1 を削除することはできません。 -> It is not possible to delete Menu Bar #1. -### Using the 4D language +### 4Dランゲージを使用する -Use `DELETE MENU ITEM` to remove an item from a menu reference. Use `RELEASE MENU` to unload the menu reference from the memory. +`DELETE MENU ITEM` コマンドを使ってメニュー参照から項目を削除します。 メニュー参照をメモリからアンロードするには `RELEASE MENU` コマンドを使います。 -## Attaching menus -Once you have created a menu, you can attach it to one or several other menus (sub-menu) or menu bar(s). +## メニューの添付 -Sub-menus can be used to group together functions organized according to subject within the same menu. Sub-menus and their items can have the same attributes as the menus themselves (actions, methods, shortcuts, icons, and so on). The items of the sub-menu keep their original characteristics and properties and the functioning of the sub-menu is identical to that of a standard menu. +メニューを作成したら、それをメニューバーや別のメニューに (サブメニューとして) 添付できます。 -You can create sub-menus of sub-menus to a virtually unlimited depth. Note, however, that for reasons concerning interface ergonomics, it is generally not recommended to go beyond two levels of sub-menus. +サブメニューは、テーマに基づき機能をグループ化する目的で使用されます。 サブメニューとその項目は、メニューと同じ属性 (アクション、メソッド、ショートカット、アイコン等) を持つことができます。 サブメニューの項目は元の特性やプロパティを保持し、サブメニューの動作は標準のメニューと同じです。 -At runtime, if an attached menu is modified by programming, every other instance of the menu will reflect these changes. +サブメニューのサブメニューを作成することができ、階層化に制限はありません。 しかし、インターフェース標準に沿うには、2レベルを超えるサブメニューは推奨されません。 -### Using the Menu editor +ランタイムにおいてプログラミングによりメニューを変更した場合、そのメニューが添付されているすべてのインスタンスに変更が反映されます。 -A menu can be attached to a menu bar or to another menu. -- To attach a menu to a menu bar: right-click on the menu bar and select **Attach a menu to the menu bar "bar name" >**, then choose the menu to be attached to the menu bar: ![](assets/en/Menus/attach.png) You can also select a menu bar then click on the options button found below the list. -- To attach a menu to another menu: select the menu in the left-hand area, then right-click on the menu item and select **Attach a sub-menu to the item "item name">**, then choose the menu you want to use as sub-menu: - ![](assets/en/Menus/attach2.png) You can also select a menu item then click on the options button found below the list. The menu being attached thus becomes a sub-menu. The title of the item is kept (the original sub-menu name is ignored), but this title can be modified. +### メニューエディターを使用する -#### Detaching menus +各メニューは、メニューバーあるいは別のメニューに添付できます。 -You can detach a menu from a menu bar or a sub-menu from a menu at any time. The detached menu is then no longer available in the menu bar or sub-menu as the case may be, but it is still present in the list of menus. +- メニューバーにメニューを添付するには: メニューバーを右クリックし、**メニューバー "メニューバー名" にメニューを添付 >** を選択、そしてサブメニューから添付するメニューを選択します: ![](assets/en/Menus/attach.png) メニューバーを選択してから、リストの下にあるオプションメニューをクリックする方法もあります。 +- メニューに他のメニューを添付するには: 左のリスト中でメニューを選択し、次に中央リストのメニュー項目上で右クリックし、**項目 "項目名" にサブメニューを添付 >** を選択、そしてサブメニューとして使用するメニューを選択します: + ![](assets/en/Menus/attach2.png) メニュー項目を選択してから、リストの下にあるオプションメニューをクリックする方法もあります。 添付されたメニューはサブメニューとなります。 項目のタイトルは保持されますが (元のサブメニュー名は無視されます)、このタイトルを変更することができます。 -To detach a menu, right-click with the right button on the menu or sub-menu that you want to detach in the central list, then choose the **Detach the menu(...)** or **Detach the sub-menu(...)** +#### メニューの分離 -### Using the 4D language +メニューバーからメニューを、あるいはメニューからサブメニューを分離できます。 分離されたメニューは、メニューバーやメニューから利用できなくなります。しかしメニューリストには残されます。 -Since there is no difference between menus and menu bars in the 4D language, attaching menus or sub-menus is done in the same manner: use the *subMenu* parameter of the `APPEND MENU ITEM` command to attach a menu to a menu bar or an menu. \ No newline at end of file +メニューを分離するには、中央リスト内の分離したいメニュー上で右クリックし、**メニュー "メニュー名" をメニューバー "メニューバー名" から分離** または **項目 "項目名" のサブメニューを分離** を選択します。 + +### 4Dランゲージを使用する + +4Dランゲージにおいてはメニューとメニューバーの違いはないため、メニューおよびサブメニューの添付は同じ手順でおこないます: `APPEND MENU ITEM` コマンドの *subMenu* パラメーターを指定して、メニューやメニューバーにメニューを添付します。 diff --git a/website/translated_docs/ja/Menus/overview.md b/website/translated_docs/ja/Menus/overview.md index c9b637d21f6e49..ce68f1e22f07ab 100644 --- a/website/translated_docs/ja/Menus/overview.md +++ b/website/translated_docs/ja/Menus/overview.md @@ -3,33 +3,32 @@ id: overview title: 概要 --- -You can create menu bars and menus for your 4D databases and custom applications. Because pull-down menus are a standard feature of any desktop application, their addition will make your databases easier to use and will make them feel familiar to users. +4Dデータベースやカスタムアプリケーション用にカスタムメニューを作成できます。 デスクトップアプリケーションではプルダウン形式のメニューが標準機能であるため、メニューを追加することでデータベースがより使いやすくなりユーザーに親しみやすいものになるでしょう。 ![](assets/en/Menus/menubar.png) -A **menu bar** is a group of menus that can be displayed on a screen together. Each **menu** on a menu bar can have numerous menu commands in it, including some that call cascading submenus (or hierarchical submenus). When the user chooses a menu or submenu command, it calls a project method or a standard action that performs an operation. +**メニューバー** とは、スクリーン上にまとめて表示されるメニューのグループです。 メニューバー上の各 **メニュー** はメニューコマンドを持ちます。またメニューコマンドは階層メニューと呼ばれるサブメニューを持つこともできます。 メニューやサブメニューコマンドをユーザーが選択すると、プロジェクトメソッドまたは標準アクションが呼び出されます。 -You can have many separate menu bars for each database. For example, you can use one menu bar that contains menus for standard database operations and another that becomes active only for reporting. One menu bar may contain a menu with menu commands for entering records. The menu bar appearing with the input form may contain the same menu, but the menu commands are disabled because the user doesn’t need them during data entry. +各データベースに対し、異なるメニューバーを複数作成することもできます。 たとえば、あるメニューバーには標準的なデータベース処理用のメニューを納め、別のメニューバーはレポート作成時にのみアクティブにすることができます。 また別のメニューバーには、レコード入力用のメニューコマンドを含むメニューを格納することも可能です。 入力フォームと一緒に表示されるメニューバーには同じメニューを格納しながらも、データ入力中は不要になるメニューコマンドを選択不可にすることができます。 -You can use the same menu in several menu bars or other menus, or you can leave it unattached and manage it only by programming (in this case, it is known as an independent menu). +あるメニューを複数のメニューバーで使用したり、どのメニューバーにも割り当てずにプログラムからのみ管理することもできます (独立メニューと呼びます)。 -When you design menus, keep the following two rules in mind: +メニューを設計する際には以下の 2つのルールを覚えておいてください: +- メニューに適している機能に対しメニューを使用する: メニューコマンドは、レコードの追加や検索、レポートの印刷のような作業を実行しなければなりません。 +- メニューコマンドを機能別にまとめる: たとえば、レポートの印刷をおこなうメニューコマンドはすべて同じメニュー内に置くべきです。 また別の例として、特定のテーブルに関するすべての操作を 1つのメニューに納めてもよいでしょう。 -- Use menus for functions that are suited to menus: Menu commands should perform tasks such as adding a record, searching for records, or printing a report. -- Group menu commands by function: For example, all menu commands that print reports should be in the same menu. For another example, you might have all the operations for a certain table in one menu. +メニューやメニューバーを作成するには以下のいずれかを使用します: -To create menus and menu bars, you can use either: +- ツールボックスのメニューエディター +- "メニュー" テーマのランゲージコマンド +- 上 2つの組み合わせ -- the Menu editor from the Toolbox, -- language commands for the "Menus" theme, -- a combination of both. -## Menu editor - -The Menu editor is accessed using the **Menus** button of the Toolbox. +## メニューエディター +ツールボックスの **メニュー** ページを開くと、メニューエディターにアクセスできます。 ![](assets/en/Menus/editor1.png) -Menus and menu bars are displayed as two items of the same hierarchical list, on the left side of the dialog box. Each menu can be attached to a menu bar or to another menu. In the second case, the menu becomes a sub-menu. +メニューおよびメニューバーは両方ともエディター左の階層リスト中に表示されます。 各メニューは、メニューバーあるいは別のメニューに添付できます。 後者の場合、そのメニューはサブメニューとなります。 -4D assigns menu bar numbers sequentially — Menu Bar #1 appears first. You can rename menu bars but you cannot change their numbers. These numbers are used by the language commands. \ No newline at end of file +4D はメニューバーに連番を割り当てます。メニューバー#1 が一番上に表示されます。 メニューバーの名前を変更することができますが、番号は変更できません。 この番号はランゲージコマンドで使用されます。 diff --git a/website/translated_docs/ja/Menus/properties.md b/website/translated_docs/ja/Menus/properties.md index a3cdef5e7efdd6..0447ae1de3d854 100644 --- a/website/translated_docs/ja/Menus/properties.md +++ b/website/translated_docs/ja/Menus/properties.md @@ -1,175 +1,176 @@ --- id: properties -title: Menu item properties +title: メニュープロパティ --- -You can set various properties for menu items such as action, font style, separator lines, keyboard shortcuts or icons. +アクション、フォントスタイルや区切り線、キーボードショートカット、アイコンなど様々なメニュー項目プロパティを設定できます。 -## タイトル -The **Title** property contains the label of a menu or menu item as it will be displayed on the application interface. +## タイトル -In the Menu editor, you can directly enter the label as "hard coded". Or, you can enter a reference for a variable or an XLIFF element, which will facilitate the maintenance and translation of applications. You can use the following types of references: +**タイトル** プロパティには、アプリケーションインターフェースに表示されるメニュー/メニュー項目のラベルを指定します。 -- An XLIFF resource reference of the type :xliff:MyLabel. For more information about XLIFF references, refer to *XLIFF Architecture* section in *4D Design Reference*. -- An interprocess variable name followed by a number, for example: :<>vlang,3. Changing the contents of this variable will modify the menu label when it is displayed. In this case, the label will call an XLIFF resource. The value contained in the <>vlang variable corresponds to the *id* attribute of the *group* element. The second value (3 in this example) designates the *id* attribute of the *trans-unit* element. +メニューエディターを使って、テキストリテラルを直接、ラベルとして入力することができます。 または、変数参照、xliff参照を使用することもできます。これによりアプリケーションの翻訳が容易になります。 次のの参照タイプを使用できます: -Using the 4D language, you set the title property through the *itemText* parameter of the `APPEND MENU ITEM`, `INSERT MENU ITEM`, and `SET MENU ITEM` commands. +- :xliff:MyLabel という形の XLIFFリソース参照。 XLIFF参照についての詳細は、*4D デザインリファレンス* の [XLIFF アーキテクチャー](https://doc.4d.com/4Dv18/4D/18/Appendix-B-XLIFF-architecture.300-4575737.ja.html) の章を参照ください。 +- :<>vlang,3 という形のインタープロセス変数名と、それに続く数値。 この変数の内容を変更すると、メニューが表示される際にラベルも変更されます。 この場合、ラベルは XLIFFリソースを呼び出します。 <>vlang 変数に含まれる値は *group* 要素の *id* 属性値に対応します。 二つ目の値 (例では3) は *trans-unit* 要素の *id* 属性の値を指定します。 -### Using control characters +4Dランゲージを使う場合は、`APPEND MENU ITEM`、`INSERT MENU ITEM`、および `SET MENU ITEM` コマンドの *itemText* パラメーターでタイトルプロパティを設定します。 -You can set some properties of the menu commands by using control characters (metacharacters) directly in the menu command labels. For instance, you can assign the keyboard shortcut Ctrl+G (Windows) or Command+G (macOS) for a menu command by placing the "/G" characters in the label of the menu item label. +### 制御文字の使用 -Control characters do not appear in the menu command labels. You should therefore avoid using them so as not to have any undesirable effects. The control characters are the following: +メニュータイトルに制御文字 (メタ文字) を直接使用し、メニューのプロパティをいくつか設定することができます。 たとえば、メニュータイトルに "/G" という文字を入れると、キーボードショートカットである Ctrl+G (Windows) または Command+G (macOS) を割り当てることができます。 -| Character | 説明 | Usage | -| ----------- | --------------------------- | ------------------------------------------------------------- | -| ( | open parenthese | Disable item | -| We recommend that you keep the default keyboard shortcuts that are associated with standard actions. +- macOS: + - Command+文字 + - Command+Shift+文字 + - Command+Option+文字 + - Command+Shift+Option+文字 -You can use any alphanumeric keys as a keyboard shortcut, except for the keys reserved by standard menu commands that appear in the **Edit** and **File** menus, and the keys reserved for 4D menu commands. +> 標準アクションに割り当てられたデフォルトのキーボードショートカットは変更しないことをお勧めします。 -These reserved key combinations are listed in the following table: +**ファイル** や **編集** メニュー、および 4D のメニューコマンドに予約されている標準メニューのショートカットを除き、すべての英数字をキーボードショートカット文字として使用できます。 -| Key (Windows) | Key (macOS) | 演算子 | -| --------------- | ------------------ | ----------- | -| Ctrl+C | Command+C | Copy | -| Ctrl+Q | Command+Q | Quit | -| Ctrl+V | Command+V | Paste | -| Ctrl+X | Command+X | Cut | -| Ctrl+Z | Command+Z | Undo | -| Ctrl+. (period) | Command+. (period) | Stop action | +予約されている組み合わせは以下の通りです: +| キー (Windows) | キー (macOS) | 演算子 | +| ------------- | ---------------- | ---- | +| Ctrl+C | Command+C | コピー | +| Ctrl+Q | Command+Q | 終了 | +| Ctrl+V | Command+V | ペースト | +| Ctrl+X | Command+X | カット | +| Ctrl+Z | Command+Z | 取り消し | +| Ctrl+. (ピリオド) | Command+. (ピリオド) | 実行停止 | -To assign a keyboard shortcut in the Menu editor: +メニューエディターでキーボードショートカットを割り当てるには: -Select the menu item to which you want to assign a keyboard shortcut. Click on the [...] button to the right of the "Shortcut" entry area. The following window appears: +キーボードショートカットを割り当てるメニュー項目を選択します。 "ショートカット" 入力エリアの [...] ボタンをクリックします。 以下のウィンドウが表示されます: ![](assets/en/Menus/Shortcut.png) -Enter the character to use then (optional) click the **Shift** and/or **Alt** (**Option**) checkboxes according to the combination desired. You can also directly press the keys that make up the desired combination (do not press the **Ctrl/Command** key). +文字を入力し、(必要であれば) **Shift** そして **Alt** (**Option**) チェックボックスを選択します。 指定する組み合わせのキーを押すと、押したキーがウィンドウに反映されます (このときには **Ctrl/Command** キーは押しません)。 + +> Ctrl/Command キーの選択を解除することはできません。このキーは必須です。 内容を消去するには **クリア** をクリックします。 **OK** をクリックすると、内容を確定してウィンドウを閉じます。 指定したショートカットが "ショーとカット" 入力エリアに表示されます: + +4Dランゲージでキーボードショートカットを割り当てるには、`SET ITEM SHORTCUT` コマンドを使います。 -> You cannot deselect the Ctrl/Command key, which is mandatory for keyboard shortcuts for menus. To start over, click on **Clear**. Click **OK** to validate the changes. The shortcut defined is shown in the "Shortcut" entry area. +> アクティブオブジェクトにも、キーボードショートカットを割り当てることができます。 **Ctrl/Command** キーの割り当てが衝突した場合、アクティブオブジェクトが優先されます。 -To assign a keyboard shortcut using the 4D language, use the `SET ITEM SHORTCUT` command. -> An active object can also have a keyboard shortcut. If the **Ctrl/Command** key assignments conflict, the active object takes precedence. +### 選択可 -### Enabled item +メニューエディターにて、メニュー項目を有効として表示するか無効として表示するかを選択できます。 ユーザーは有効なメニュー項目を選択できます。無効なメニュー項目は灰色で表示され、選択することはできません。 **選択可** チェックボックスの選択が解除されていると、メニューコマンドは灰色で表示され、選択することができません。 -In the Menu editor, you can specify whether a menu item will appear enabled or disabled. An enabled menu command can be chosen by the user; a disabled menu command is dimmed and cannot be chosen. When the **Enabled Item** check box is unchecked, the menu command appears dimmed, indicating that it cannot be chosen. +明示的に設定しない限り、4D は自動でカスタムメニュ-に追加された項目を有効にします。 たとえば、特定の条件下で `ENABLE MENU ITEM` コマンドを使用して有効化するために、初期状態を無効にすることができます (無効化には `DISABLE MENU ITEM` コマンドを使います)。 -Unless you specify otherwise, 4D automatically enables each menu item you add to a custom menu. You can disable an item in order, for example, to enable it only using programming with `ENABLE MENU ITEM` and `DISABLE MENU ITEM` commands. -### Check mark +### チェック -This Menu editor option can be used to associate a system check mark with a menu item. You can then manage the display of the check mark using language commands (`SET MENU ITEM MARK` and `Get menu item mark`). +このオプションを使用して、メニュー項目にシステムチェックマークを関連付けることができます。 その後チェックマークの表示をランゲージコマンド (`SET MENU ITEM MARK` や `Get menu item mark`) で制御できます。 -Check marks are generally used for continuous action menu items and indicate that the action is currently underway. +通常チェックマークは連続したアクションをおこなうメニュー項目に付けられ、そのアクションを現在実行中であることを示すために使用されます。 -### Font styles +### フォントスタイル -4D lets you customize menus by applying different font styles to the menu commands. You can customize your menus with the Bold, Italic or Underline styles through options in the Menu editor, or using the `SET MENU ITEM STYLE` language command. +メニューコマンドにフォントスタイル (太字、下線、イタリック) を適用することができます。 メニューエディターのオプションを使用して、または `SET MENU ITEM STYLE` ランゲージコマンドを使って、メニューのスタイルを太字・イタリック・下線でカスタマイズすることができます。 -As a general rule, apply font styles sparingly to your menus — too many styles will be distracting to the user and give a cluttered look to your application. +一般的なルールとして、フォントスタイルの適用は慎重におこなってください。煩雑なスタイルの使用はユーザーの注意をそらし、アプリケーションの見た目を悪くします。 +> メニュータイトルに制御文字を挿入してスタイルを管理することもできます ([制御文字の使用](properties.md#制御文字の使用) 参照)。 -> You can also apply styles by inserting special characters in the menu title (see [Using control characters](properties.md#using-control-characters) above). -### Item icon +### 項目アイコン -You can associate an icon with a menu item. It will displayed directly in the menu, next to the item: +メニュー項目にアイコンを関連付けることができます。 設定されたアイコンはメニューの左に表示されます: ![](assets/en/Menus/iconMenu.png) -To define the icon in the Menu editor, click on the "Item icon" area and select **Open** to open a picture from the disk. If you select a picture file that is not already stored in the database resources folder, it is automatically copied in that folder. Once set, the item icon appears in the preview area: +メニューエディターでアイコンを設定するには、"項目アイコン" エリアをクリックし、**開く** を選択してディスクからピクチャーを開きます。 データベースの Resources フォルダーに格納されていないピクチャーファイルを選択した場合、そのファイルは自動的に Resources フォルダーにコピーされます。 項目アイコンを設定すると、プレビューエリアに表示されます: ![](assets/en/Menus/iconpreview.png) -To remove the icon from the item, choose the **No Icon** option from the "Item Icon" area. +項目からアイコンを取り除くには、"項目アイコン" エリアのメニューから **アイコンなし** を選択します。 -To define item icons using the 4D language, call the `SET MENU ITEM ICON` command. \ No newline at end of file +4Dランゲージを使って項目アイコンを設定するには、`SET MENU ITEM ICON` コマンドを使います。 diff --git a/website/translated_docs/ja/Menus/sdi.md b/website/translated_docs/ja/Menus/sdi.md index 46f9ffe7980007..edfd1b36b108b0 100644 --- a/website/translated_docs/ja/Menus/sdi.md +++ b/website/translated_docs/ja/Menus/sdi.md @@ -1,73 +1,72 @@ --- id: sdi -title: SDI mode on Windows +title: Windows での SDIモード --- ## 概要 -On Windows, 4D developers can configure their 4D merged applications to work as SDI (Single-Document Interface) applications. In SDI applications, each window is independant from others and can have its own menu bar. SDI applications are opposed to MDI (Multiple Documents Interface) applications, where all windows are contained in and depend on the main window. +Windows において、組みこみ 4Dアプリケーションを SDI (シングルドキュメントインターフェース) アプリケーションとして設定することができます。 SDIアプリケーションでは、それぞれのウィンドウが互いに独立し、それぞれが独自のメニューバーを持つことができます。 SDIアプリケーションは MDI (マルチドキュメントインターフェース) に対する概念で、MDI ではすべてのウィンドウが一つのメインウィンドウの中に含まれ、それに依存した作りになっています。 -> The concept of SDI/MDI does not exist on macOS. This feature concerns Windows applications only and related options are ignored on macOS. +> SDI/MDI という概念は macOS には存在しません。 この機能は Windows用アプリケーション専用のもので、関連オプションは macOS においてはすべて無視されます。 -### SDI mode availabilty - -The SDI mode is available in the following execution environment only: +### SDIモード利用条件 +SDIモードは以下の実行環境に限り利用可能です: - Windows -- Merged stand-alone or client 4D application +- 組み込みスタンドアロン4Dアプリケーション、またはクライアント4Dアプリケーション -## Enabling the SDI mode +## SDIモードの有効化 -Enabling and using the SDI mode in your application require the following steps: +アプリケーションにおいて SDIモードを有効化し使用する手順は次の通りです: -1. Check the **Use SDI mode on Windows** option in the "Interface" page of the Database Settings dialog box. -2. Build a merged application (standalone and/or client application). +1. データベース設定ダイアログボックスの "インターフェース" ページ内にある **WindowsでSDIモードを使用する** オプションをチェックします。 +2. 組み込みアプリケーションをビルドします (スタンドアロンまたはクライアントアプリケーション)。 -Then, when executed it in a supported context (see above), the merged application will work automatically in SDI mode. +その後、サポートされているコンテキスト (上記参照) において実行されると、組み込みアプリケーションは自動的に SDIモードで実行されます。 -## Managing applications in SDI mode +## SDIモードでのアプリケーションの管理 -Executing a 4D application in SDI mode does not require any specific implementation: existing menu bars are automatically moved in SDI windows themselves. However, you need to pay attention to specific principles that are listed below. +4Dアプリケーションを SDIモードで実行するために、特別な実装は必要ありません。既存のメニューバーは自動的に SDIウィンドウへと移されます。 しかしながら、以下に挙げられている特定の原則に注意する必要があります。 -### Menus in Windows +### ウィンドウ内のメニュー -In SDI mode, the process menu bar is automatically displayed in every document type window opened during the process life (this excludes, for example, floating palettes). When the process menu bar is not visible, menu item shortcuts remain active however. +SDIモードでは、同プロセス中に開かれたすべてのドキュメントタイプウィンドウ (たとえばフローティングパレットはこれに含まれません) には自動的にプロセスメニューバーが表示されます。 ただし、プロセスメニューバーが非表示の状態でも、メニュー項目のショートカットは有効です。 -Menus are added above windows without modifiying their contents size: +メニューは、コンテンツのサイズを変更することなくウィンドウの上部に追加されます: ![](assets/en/Menus/sdi1.png) -Windows can therefore be used in MDI or SDI modes without having to recalculate the position of objects. +このため、ウィンドウは MDIモードあるいは SDIモードのどちらにおいてもオブジェクトの位置を再計算することなく使用することができます。 -#### About the splash screen +#### スプラッシュスクリーンについての注意: -- If the **Splash screen** interface option was selected in the Database Settings, the splash window will contain any menus that would have been displayed in the MDI window. Note also that closing the splash screen window will result in exiting the application, just like in MDI mode. -- If the Splash screen option was not selected, menus will be displayed in opened windows only, depending on the programmer's choices. +- データベース設定において **スプラッシュスクリーン** インターフェースオプションが選択されていた場合、スプラッシュウィンドウは、MDIウィンドウであれば表示されていたメニューをすべて格納します。 MDIモード同様、スプラッシュスクリーンを閉じるとアプリケーションを終了することになるという点に注意してください。 +- スプラッシュスクリーンオプションが選択されていなかった場合、メニューは開かれているウィンドウにおいて、プログラマーの選択に応じて表示されます。 -### Automatic quit +### 自動終了 -When executed in MDI mode, a 4D application simply quits when the user closes the application window (MDI window). However, when executed in SDI mode, 4D applications do not have an application window and, on the other hand, closing the last opened window does not necessarily mean that the user wants the application to quit (faceless processes can be running, for example) -- although it could be what they want. +MDIモードで実行時、ユーザーによってアプリケーションウィンドウ (MDIウィンドウ) が閉じられると、4Dアプリケーションが終了します。 しかしながら、SDIモードで実行時、4Dアプリケーションにはアプリケーションウィンドウがなく、また開いているウィンドウをすべて閉じたとしても、必ずしもユーザーがアプリケーションを終了したいと思っているとは限りません (たとえばフェイスレスプロセスが熟考中かもしれません) が、場合によっては終了したいという場合もあります。 -To handle this case, 4D applications executed in SDI mode include a mechanism to automatically quit (by calling the `QUIT 4D` command) when the following conditions are met: +こういった場合を管理するため、SDIモードで実行されている 4Dアプリケーションには、以下の条件が満たされた場合に自動的に (`QUIT 4D` コマンドを呼び出して) 終了する機構が含まれています: -- the user cannot interact anymore with the application -- there are no live user processes -- 4D processes or worker processes are waiting for an event -- the Web server is not started. +- ユーザーがこれ以上アプリケーションとやりとりすることができない +- 生きているユーザープロセスがない +- 4Dプロセスあるいはワーカープロセスはイベント待機中である +- Webサーバーが開始されていない -> When a menu with an associated *quit* standard action is called, the application quits and all windows are closed, wherever the menu was called from. +> *quit* (終了) 標準アクションが割り当てられているメニューが呼び出された場合、そのメニューがどこから呼ばれたものであろうと、アプリケーションは終了し、すべてのウィンドウが閉じられます。 -## Language +## ランゲージ -Although it is transparently handled by 4D, the SDI mode introduces small variations in the application interface management. Specificities in the 4D language are listed below. +4D によって透過的に管理されるとはいえ、SDIモードではアプリケーションインターフェースの管理に関してこれまでと若干の差異が存在します。 4Dランゲージにおける特異性は以下の表にある通りです。 -| Command/feature | Specificity in SDI mode on Windows | -| --------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Open form window` | Options to support floating windows in SDI (`Controller form window`) and to remove the menu bar (`Form has no menu bar`) | -| `Menu bar height` | Returns the height in pixels of a single menu bar line even if the menu bar has been wrapped on two or more lines. Returns 0 when the command is called from a process without a form window | -| `SHOW MENU BAR` / `HIDE MENU BAR` | Applied to the current form window only (from where the code is executed) | -| `MAXIMIZE WINDOW` | The window is maximized to the screen size | -| `CONVERT COORDINATES` | `XY Screen` is the global coordinate system where the main screen is positioned at (0,0). Screens on its left side or on top of it can have negative coordinates and any screens on its right side or underneath it can have coordinates greater than the values returned by `Screen height` or `Screen width`. | -| `GET MOUSE` | Global coordinates are relative to the screen | -| `GET WINDOW RECT` | When -1 is passed in window parameter, the command returns 0;0;0;0 | -| `On Drop database method` | Not supported | \ No newline at end of file +| コマンド/機能 | Windows での SDIモードの特徴 | +| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `Open form window` | SDIモードにおけるフローティングウィンドウのサポート (`Controller form window`) およびメニューバーの削除 (`Form has no menu bar`) のオプション | +| `Menu bar height` | メニューバーが 2行以上に折り返されている場合でも単一行のメニューバーのピクセル単位での高さを返します。 フォームウィンドウをともなわないプロセスからコマンドが呼ばれている場合には 0 を返します。 | +| `SHOW MENU BAR` / `HIDE MENU BAR` | カレントの (コードが実行されている場所の) フォームウィンドウにのみ適用されます | +| `MAXIMIZE WINDOW` | ウィンドウはスクリーンサイズいっぱいまで最大化されます | +| `CONVERT COORDINATES` | `XY Screen` はメインスクリーンが (0,0) に位置するグローバルな座標系です。 座標系の左側、あるいは上側にあるスクリーンについては、負の値の座標を持つことができ、右側、あるいは下側にあるスクリーンについては `Screen height` や `Screen width` から返される値より大き値を持つことができます。 | +| `GET MOUSE` | グローバル座標はスクリーンからの相対位置になります | +| `GET WINDOW RECT` | window パラメーターに -1 を渡した場合、コマンドは 0;0;0;0 を返します | +| `On Drop database method` | サポートされていません | diff --git a/website/translated_docs/ja/Project/architecture.md b/website/translated_docs/ja/Project/architecture.md index fb62741c42d6b0..848c6743f1ce09 100644 --- a/website/translated_docs/ja/Project/architecture.md +++ b/website/translated_docs/ja/Project/architecture.md @@ -5,38 +5,40 @@ title: 4D プロジェクトのアーキテクチャー 4D プロジェクトは、一つの親プロジェクトフォルダー (パッケージフォルダー) に格納された、複数のファイルやフォルダーから構成されています。 たとえば: -- MyProject - - コンポーネント - - Data +- MyProject + - Components + - Data - Logs - Settings - Documentation - Plugins - - Project + - Project - DerivedData - Sources - Trash - Resources - Settings - - userPreference.username + - userPreferences.username - WebFolder -> バイナリデータベースから変換されたプロジェクトの場合には、追加のフォルダーが存在している場合があります (doc.4d.com にて "[データベースをプロジェクトモードに変換する](https://doc.4d.com/4Dv18/4D/18/Converting-databases-to-projects.300-4606146.ja.html)" 参照)。 +> バイナリデータベースから変換されたプロジェクトの場合には、追加のフォルダーが存在している場合があります (doc.4d.com にて "[データベースをプロジェクトモードに変換する](https://doc.4d.com/4Dv18/4D/18/Converting-databases-to-projects.300-4606146.ja.html)" 参照)。 + ## Project フォルダー 典型的な Project フォルダーの構造です: - *databaseName*.4DProject ファイル -- Sources - + クラス +- Sources + + Classes + DatabaseMethods - + メソッド - + フォーム + + Methods + + Forms + TableForms + Triggers -+ DerivedData -+ Trash (あれば) +- DerivedData +- Trash (あれば) + ### *databaseName*.4DProject ファイル @@ -47,35 +49,34 @@ title: 4D プロジェクトのアーキテクチャー **注:** 4D プロジェクトの開発は 4D Developer によっておこない、マルチユーザー開発はソース管理ツールによって管理します。 4D Server は .4DProject ファイルを開くことができますが、クライアントからの開発はおこなえません。 + ### Sources フォルダー -| 内容 | 説明 | 形式 | -| ----------------------- | ---------------------------------------------------------------------------------------------- | ---- | -| catalog.4DCatalog | テーブルおよびフィールド定義 | XML | -| folders.json |  エクスプローラーフォルダー定義 | JSON | -| menus.json | メニュー定義 | JSON | -| settings.4DSettings | *ストラクチャー*データベース設定。 *ユーザー設定*が定義されている場合は、そちらの設定が優先されます。 *データファイル用のユーザー設定*が定義されている場合は、その設定が最優先です。 | XML | -| tips.json | 定義されたヘルプTips | JSON | -| lists.json | 定義されたリスト | JSON | -| filters.json | 定義されたフィルター | JSON | -| styleSheets.css | CSS スタイルシート | CSS | -| styleSheets_mac.css | Mac用 CSS スタイルシート (変換されたバイナリデータベースより) | CSS | -| styleSheets_windows.css | Windows用 CSS スタイルシート (変換されたバイナリデータベースより) | CSS | +| 内容 | 説明 | 形式 | +| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---- | +| catalog.4DCatalog | テーブルおよびフィールド定義 | XML | +| folders.json |  エクスプローラーフォルダー定義 | JSON | +| menus.json | メニュー定義 | JSON | +| settings.4DSettings | *ストラクチャー*データベース設定。 *[ユーザー設定](#settings-フォルダー-1)* または *[データファイル用のユーザー設定](#settings-フォルダー)* が定義されている場合は、そちらの設定が優先されます。

**警告**: コンパイル済みアプリケーションの場合、ストラクチャー設定は読み取り専用の .4dz ファイルに格納されます。 運用時にカスタム設定を定義するには、*ユーザー設定* または *データファイル用のユーザー設定* を使う必要があります。 | XML | +| tips.json | 定義されたヘルプTips | JSON | +| lists.json | 定義されたリスト | JSON | +| filters.json | 定義されたフィルター | JSON | +| styleSheets.css | CSS スタイルシート | CSS | +| styleSheets_mac.css | Mac用 CSS スタイルシート (変換されたバイナリデータベースより) | CSS | +| styleSheets_windows.css | Windows用 CSS スタイルシート (変換されたバイナリデータベースより) | CSS | #### DatabaseMethods フォルダー -| 内容 | 説明 | 形式 | -| ------------------------ | -------------------------------------------------- | ---- | -| *databaseMethodName*.4dm | データベース内で定義されているデータベースメソッド (1つのデータベースメソッドにつき1ファイル)。 | テキスト | - +| 内容 | 説明 | 形式 | +| ------------------------ | --------------------------------------------------- | ---- | +| *databaseMethodName*.4dm | データベース内で定義されているデータベースメソッド (1つのデータベースメソッドにつき1ファイル)。 | テキスト | #### Methods フォルダー -| 内容 | 説明 | 形式 | -| ---------------- | -------------------------------------------- | ---- | -| *methodName*.4dm | データベース内で定義されているプロジェクトメソッド (1つのメソッドにつき1ファイル)。 | テキスト | - +| 内容 | 説明 | 形式 | +| ---------------- | --------------------------------------------- | ---- | +| *methodName*.4dm | データベース内で定義されているプロジェクトメソッド (1つのメソッドにつき1ファイル)。 | テキスト | #### Classes フォルダー @@ -86,63 +87,63 @@ title: 4D プロジェクトのアーキテクチャー #### Forms フォルダー -| 内容 | 説明 | 形式 | -| ----------------------------------------- | ---------------------------------- | ------- | -| *formName*/form.4DForm | プロジェクトフォームの定義 | JSON | -| *formName*/method.4dm | プロジェクトフォームメソッド | テキスト | -| *formName*/Images/*pictureName* | プロジェクトフォームのスタティックピクチャー | picture | -| *formName*/ObjectMethods/*objectName*.4dm | オブジェクトメソッド (1つのオブジェクトメソッドにつき1ファイル) | テキスト | - +| 内容 | 説明 | 形式 | +| ----------------------------------------- | ----------------------------------- | ------- | +| *formName*/form.4DForm | プロジェクトフォームの定義 | json | +| *formName*/method.4dm | プロジェクトフォームメソッド | テキスト | +| *formName*/Images/*pictureName* | プロジェクトフォームのスタティックピクチャー | picture | +| *formName*/ObjectMethods/*objectName*.4dm | オブジェクトメソッド (1つのオブジェクトメソッドにつき1ファイル) | テキスト | #### TableForms フォルダー -| 内容 | 説明 | 形式 | -| ---------------------------------------------------- | --------------------------------------------- | ------- | -| *n*/Input/*formName*/form.4DForm | 入力テーブルフォームの定義 (n: テーブル番号) | JSON | -| *n*/Input/*formName*/Images/*pictureName* | 入力テーブルフォームのスタティックピクチャー | picture | -| *n*/Input/*formName*/method.4dm | 入力テーブルフォームのフォームメソッド | テキスト | -| *n*/Input/*formName*/ObjectMethods/*objectName*.4dm | 入力テーブルフォームのオブジェクトメソッド (1つのオブジェクトメソッドにつき1ファイル) | テキスト | -| *n*/Output/*formName*/form.4DForm | 出力テーブルフォーム (n: テーブル番号) | JSON | -| *n*/Output/*formName*/Images/*pictureName* | 出力テーブルフォームのスタティックピクチャー | picture | -| *n*/Output/*formName*/method.4dm | 出力テーブルフォームのフォームメソッド | テキスト | -| *n*/Output/*formName*/ObjectMethods/*objectName*.4dm | 出力テーブルフォームのオブジェクトメソッド (1つのオブジェクトメソッドにつき1ファイル) | テキスト | - +| 内容 | 説明 | 形式 | +| ---------------------------------------------------- | ---------------------------------------------- | ------- | +| *n*/Input/*formName*/form.4DForm | 入力テーブルフォームの定義 (n: テーブル番号) | json | +| *n*/Input/*formName*/Images/*pictureName* | 入力テーブルフォームのスタティックピクチャー | picture | +| *n*/Input/*formName*/method.4dm | 入力テーブルフォームのフォームメソッド | テキスト | +| *n*/Input/*formName*/ObjectMethods/*objectName*.4dm | 入力テーブルフォームのオブジェクトメソッド (1つのオブジェクトメソッドにつき1ファイル) | テキスト | +| *n*/Output/*formName*/form.4DForm | 出力テーブルフォーム (n: テーブル番号) | json | +| *n*/Output/*formName*/Images/*pictureName* | 出力テーブルフォームのスタティックピクチャー | picture | +| *n*/Output/*formName*/method.4dm | 出力テーブルフォームのフォームメソッド | テキスト | +| *n*/Output/*formName*/ObjectMethods/*objectName*.4dm | 出力テーブルフォームのオブジェクトメソッド (1つのオブジェクトメソッドにつき1ファイル) | テキスト | #### Triggers フォルダー -| 内容 | 説明 | 形式 | -| ------------- | ---------------------------------------------------- | ---- | -| table_*n*.4dm | データベース内で定義されているトリガーメソッド ( 1つのテーブルにつき1ファイル;n: テーブル番号) | テキスト | - +| 内容 | 説明 | 形式 | +| ------------- | ----------------------------------------------------- | ---- | +| table_*n*.4dm | データベース内で定義されているトリガーメソッド ( 1つのテーブルにつき1ファイル;n: テーブル番号) | テキスト | **注:** 拡張子 .4dm のファイルは、4D メソッドのコードをテキスト形式で格納しており、 ソース管理ツールに対応しています。 + ### Trash フォルダー プロジェクトから削除されたメソッドやフォームがあれば、Trash フォルダーにはそれらが格納されます。 たとえば、つぎのフォルダーが格納されている場合があります: -- メソッド -- フォーム +- Methods +- Forms - TableForms 削除された要素はファイル名に括弧が付いた形でフォルダー内に置かれます (例: "(myMethod).4dm")。 フォルダーの構成は [Sources](#sources) フォルダーと同じです。 + ### DerivedData フォルダー DerivedData フォルダーには、処理を最適化するため 4D が内部的に使用するキャッシュデーターが格納されます。 これらは必要に応じて自動的に生成・再生成されます。 このフォルダーは無視してかまいません。 + ## Resources フォルダー -Resources フォルダーには、追加のカスタムデータベースリソースファイルやフォルダーが格納されます。 アプリケーションインターフェースの翻訳やカスタマイズに必要なファイルはすべてここに格納します (ピクチャー、テキスト、XLIFF ファイルなど)。 4D は自動のメカニズムによってフォルダー内のファイル (とくに XLIFF ファイルおよびスタティックピクチャー) を扱います。 リモートモードにおいては、サーバーとすべてのクライアントマシン間でファイルを共有することが Resources フォルダーによって可能です (*4D Server リファレンスマニュアル* の [リソースフォルダの管理](https://doc.4d.com/4Dv18/4D/18/Managing-the-Resources-folder.300-4672420.ja.html) を参照ください)。 +Resources フォルダーには、追加のカスタムデータベースリソースファイルやフォルダーが格納されます。 アプリケーションインターフェースの翻訳やカスタマイズに必要なファイルはすべてここに格納します (ピクチャー、テキスト、XLIFF ファイルなど)。 4D は自動のメカニズムによってフォルダー内のファイル (とくに XLIFF ファイルおよびスタティックピクチャー) を扱います。 リモートモードにおいては、サーバーとすべてのクライアントマシン間でファイルを共有することが Resources フォルダーによって可能です (*4D Server リファレンスマニュアル* の [リソースフォルダの管理](https://doc.4d.com/4Dv18/4D/18/Managing-the-Resources-folder.300-4672420.ja.html) を参照ください)。 | 内容 | 説明 | 形式 | | --------------------- | ------------------------------------------------------------------------- | ------- | | *item* | データベースリソースファイルとフォルダー | 様々 | | Images/Library/*item* | ピクチャーライブラリの個別ピクチャーファイル(*)。 各アイテムの名称がファイル名となります。 名称が重複する場合には、名称に番号が追加されます。 | picture | - (*) .4db バイナリデータベースから変換されたプロジェクトの場合のみ + ## Data フォルダー Data フォルダーには、データファイルのほか、データに関わるするファイルやフォルダーがすべて格納されています。 @@ -153,7 +154,6 @@ Data フォルダーには、データファイルのほか、データに関わ | data.journal | データベースがログファイルを使用する場合のみ作成されます。 ログファイルは2つのバックアップ間のデータ保護を確実なものにするために使用されます。 データに対して実行されたすべての処理が、このファイルに順番に記録されます。 つまりデータに対して操作がおこなわれるたびに、データ上の処理 (操作の実行) とログファイル上の処理 (操作の記録) という 2つの処理が同時に発生します。 ログファイルはユーザーの処理を妨げたり遅くしたりすることなく、独立して構築されます。 データベースは 1つのログファイルしか同時に使用できません。 ログファイルにはレコードの追加・更新・削除やトランザクションなどの処理が記録されます。 ログファイルはデータベースが作成される際にデフォルトで生成されます。 | バイナリ | | data.match | (内部用) テーブル番号に対応する UUID | XML | - (*) .4db バイナリデータベースからプロジェクトに変換した場合、データファイルは変換による影響を受けません。 このデータファイルの名称を変更して移動させることができます。 ### Settings フォルダー @@ -169,13 +169,14 @@ Settings フォルダーには、データベースの管理に使用される * | directory.json | このデータファイルを使ってデータベースが実行されている場合に使用する 4D グループとユーザー、およびアクセス権の定義 | JSON | + ### Logs フォルダー Logs フォルダーには、プロジェクトが使用するすべてのログファイルが格納されます。 以下のログファイルが格納されます: - データベース変換 - Webサーバーリクエスト -- バックアップ/復元アクションのジャーナル (*Backup Journal\[xxx].txt*、[バックアップジャーナル](Backup/backup.md#バックアップジャーナル) 参照) +- バックアップ/復元アクションのジャーナル (*Backup Journal\[xxx].txt*、[バックアップジャーナル](Backup/backup.md#backup-journal) 参照) - コマンドデバッグ - 4D Serverリクエスト (クライアントマシンおよびサーバー上で生成) @@ -185,37 +186,38 @@ Logs フォルダーには、プロジェクトが使用するすべてのログ このフォルダーにはデータベースの管理に使用される **ユーザー設定** ファイルが格納されます。 必要に応じてこのフォルダーにファイルが追加されます。 -> [Data フォルダー](#settings-folder)の Setting フォルダー内にデータファイル用のユーザー設定ファイルがある場合には、そちらが優先されます。 +> [Data フォルダー](#settings-フォルダー)の Setting フォルダー内にデータファイル用のユーザー設定ファイルがある場合には、そちらが優先されます。 | 内容 | 説明 | 形式 | | ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | | directory.json | 4D グループとユーザー、およびアクセス権の定義 | JSON | | BuildApp.4DSettings | アプリケーションビルダーのダイアログボックス、または `BUILD APPLICATION` コマンドを使ったときに自動的に作成されるビルド設定ファイル | XML | | Backup.4DSettings | バックアップ開始時に [バックアップオプション](Backup/settings.md) を指定するためのデータベースバックアップ設定です。 このファイルは、*バックアップジャーナル* に保存する情報量などの追加オプションの確認や設定にも使用することができます。 バックアップ設定に使われるキーについての説明は [バックアップ設定ファイル](https://doc.4d.com/4Dv18/4D/18/4D-XML-Keys-Backup.100-4673706.ja.html) マニュアルを参照ください。 | XML | +| BuildApp.4DSettings | アプリケーションビルダーのダイアログボックス、または `BUILD APPLICATION` コマンドを使ったときに自動的に作成されるビルド設定ファイル | XML | ## userPreferences.*userName* フォルダー -ブレークポイントの位置など、ユーザーの環境設定を定義するファイルを格納するフォルダーです。 このフォルダーは無視してかまいません。 格納されるファイルの例です: +ブレークポイントやウィンドウの位置など、ユーザーの環境設定を定義するファイルを格納するフォルダーです。 このフォルダーは無視してかまいません。 格納されるファイルの例です: -| 内容 | 説明 | 形式 | -| ---------------------------- | ---------------------------------- | ---- | -| methodPreferences.json | カレントユーザーのメソッドエディター環境設定 | JSON | -| methodWindowPositions.json | カレントユーザーのメソッドのウィンドウポジション | JSON | -| formWindowPositions.json | カレントユーザーのフォームのウィンドウポジション | JSON | -| workspace.json | 開かれているウィンドウのリスト;macOS ではタブウィンドウの順序 | JSON | -| debuggerCatches.json | キャッチコマンドリスト | JSON | -| recentTables.json | 最近開かれたテーブルのリスト | JSON | -| preferencesv15.4DPreferences | ユーザー環境設定 | JSON | +| 内容 | 説明 | 形式 | +| -------------------------- | ---------------------------------- | ---- | +| methodPreferences.json | カレントユーザーのメソッドエディター環境設定 | JSON | +| methodWindowPositions.json | カレントユーザーのメソッドのウィンドウポジション | JSON | +| formWindowPositions.json | カレントユーザーのフォームのウィンドウポジション | JSON | +| workspace.json | 開かれているウィンドウのリスト;macOS ではタブウィンドウの順序 | JSON | +| debuggerCatches.json | キャッチコマンドリスト | JSON | +| recentTables.json | 最近開かれたテーブルのリスト | JSON | +| preferences.4DPreferences | カレントデータパスおよび主なウィンドウの位置 | XML | ## Components フォルダー プロジェクトデータベースが利用するコンポーネントを格納するフォルダーです。 このフォルダーは、Project フォルダーと同じ階層に置きます。 -> プロジェクトデータベースはコンポーネントとして利用することができます: -> - 開発においては、ホストデーターベースの Components フォルダーに .4dproject ファイルのエイリアスを置きます。 - 運用時においては、コンポーネントをビルドし ([プロジェクトパッケージのビルド](building.md))、生成された .4dz ファイルを .4dbase フォルダーに格納し、それをホストデータベースの Components フォルダーに置きます。 +> プロジェクトデータベースはコンポーネントとして利用することができます:
- 開発においては、ホストデーターベースの Components フォルダーに .4dproject ファイルのエイリアスを置きます。 - 運用時においては、コンポーネントをビルドし ([プロジェクトパッケージのビルド](building.md))、生成された .4dz ファイルを .4dbase フォルダーに格納し、それをホストデータベースの Components フォルダーに置きます。 + ## Plugins フォルダー -プロジェクトデータベースが利用するプラグインを格納するフォルダーです。 このフォルダーは、Project フォルダーと同じ階層に置きます。 \ No newline at end of file +プロジェクトデータベースが利用するプラグインを格納するフォルダーです。 このフォルダーは、Project フォルダーと同じ階層に置きます。 diff --git a/website/translated_docs/ja/Project/building.md b/website/translated_docs/ja/Project/building.md index 53bf1391282bdc..549fad2f8661f3 100644 --- a/website/translated_docs/ja/Project/building.md +++ b/website/translated_docs/ja/Project/building.md @@ -7,12 +7,14 @@ title: プロジェクトパッケージのビルド アプリケーションビルダーでは以下のことを行えます: -* インタープリターコードを含まないコンパイル済みアプリケーションのビルド -* ダブルクリックで起動可能なスタンドアロンアプリケーションのビルド (4D のデータベースエンジンである 4D Volume Desktop を組み込んだ 4D アプリケーション) -* XML形式のプロジェクトファイル定義を用いて、同じコンパイル済みデータベースから異なるアプリケーションのビルド -* クライアント/サーバーアプリケーションのビルド -* クライアントとサーバーの自動更新機能を備えたクライアント/サーバーアプリケーションのビルド -* ビルド設定の保存 (*設定保存* ボタン) +* インタープリターコードを含まないコンパイル済みアプリケーションのビルド +* ダブルクリックで起動可能なスタンドアロンアプリケーションのビルド (4D のデータベースエンジンである 4D Volume Desktop を組み込んだ 4D アプリケーション) +* XML形式のプロジェクトファイル定義を用いて、同じコンパイル済みデータベースから異なるアプリケーションのビルド +* クライアント/サーバーアプリケーションのビルド +* クライアントとサーバーの自動更新機能を備えたクライアント/サーバーアプリケーションのビルド +* ビルド設定の保存 (*設定保存* ボタン) + + ## アプリケーションのビルド @@ -29,8 +31,10 @@ title: プロジェクトパッケージのビルド ![](assets/en/Project/appbuilderProj.png) + ビルドをおこなう前にアプリケーションはコンパイルされていなければなりません。 まだコンパイルされていないアプリケーションでこのメニューコマンドを選択する、あるいはコンパイル後にコードが変更されていると、データベースを (再) コンパイルしなければならない旨の警告ダイアログが表示されます。 + ### アプリケーションビルド設定 アプリケーションビルドに関わる各パラメーター設定は XML キーの形で、"buildApp.4DSettings" という名称のアプリケーションプロジェクトファイルに保存されます。この XML ファイルはデータベースの Settings フォルダーに配置されます。 @@ -42,12 +46,13 @@ title: プロジェクトパッケージのビルド ### ログファイル アプリケーションをビルドすると、4D はログファイルを生成して **Logs** フォルダーに保存します。 ログファイルにはビルド毎に以下の情報が書き込まれます: - - ターゲットビルドの開始と終了 - 生成されたファイルの名称とフルパス - ビルドの日付と時刻 - 発生したエラー + + ## アプリケーション名と保存先フォルダー ![](assets/en/Project/buidappstructureProj.png) @@ -56,12 +61,15 @@ title: プロジェクトパッケージのビルド **保存先フォルダー** にはビルドされるアプリケーションの保存先を指定します。 指定したフォルダーが存在しない場合は新たに作成します。 + + ## コンパイル済みストラクチャーページ このページでは、標準のコンパイル済みストラクチャーファイルやコンパイル済みコンポーネントをビルドできます。 ![](assets/en/Project/appbuilderProj.png) + ### コンパイル済みストラクチャーをビルド インタープリターコードを含まないアプリケーションをビルドします。 @@ -72,40 +80,39 @@ title: プロジェクトパッケージのビルド > .4dz ファイルは ZIP 圧縮されたプロジェクトフォルダーです (**注:** バイナリデータベースの場合に生成される .4DC ファイルと同義ではないことに注意が必要です)。 .4dz ファイルを開けるのは 4D Server、4D Volume ライセンス (組み込みアプリケーション)、および 4D Developer です。 圧縮・最適化された .4dz ファイルによってプロジェクトパッケージの展開が容易になります。 + #### 関連するフォルダーを含む -このオプションを選択すると、データベースに関連するフォルダーが、Build フォルダーの *Components* および *Resources* フォルダーにコピーされます。 これらのフォルダーに関する情報は [データベースアーキテクチャー ](https://doc.4d.com/4Dv18/4D/18/Description-of-4D-files.300-4575698.ja.html#4671957) を参照してください。 +このオプションを選択すると、データベースに関連するフォルダーが、Build フォルダーの *Components* および *Resources* フォルダーにコピーされます。 これらのフォルダーに関する情報は [データベースアーキテクチャー ](https://doc.4d.com/4Dv18/4D/18/Description-of-4D-files.300-4575698.ja.html#4671957) を参照してください。 + ### コンポーネントをビルド ストラクチャーからコンパイル済みコンポーネントをビルドします。 コンポーネントは特定の機能を実装した標準の 4D プロジェクトです。 ビルドされたコンポーネントを他の 4D データベース (ホストデータベース) にインストールすると、ホストデータベースはその機能を利用できるようになります。 コンポーネントに関する詳細は [4D コンポーネントの開発とインストール](https://doc.4d.com/4Dv18/4D/18/Developing-and-installing-4D-components.200-4575436.ja.html) を参照してください。 +アプリケーション名を *MyComponent* に指定した場合、4D は Components フォルダーを作成し、その中に *MyComponent.4dbase* フォルダーを生成します:

*\/Components/name.4dbase/\.4DZ*. -アプリケーション名を *MyComponent* に指定した場合、4D は Components フォルダーを作成し、その中に *MyComponent.4dbase* フォルダーを生成します: +*MyComponent.4dbase* フォルダーには次のファイルが含まれます: +- *MyComponent.4DZ* ファイル +- *Resources* フォルダー: 関連リソースは自動的にこのフォルダーにコピーされます。 コンポーネントは他のコンポーネントやプラグインを使用できないため、その他の "Components" や "Plugins" フォルダーはコピーされません。 -< -*\/Components/MyComponent.4dbase/* +## アプリケーションページ -*MyComponent.4dbase* フォルダーには次のファイルが含まれます: - *MyComponent.4DZ* ファイル - *Resources* フォルダー: 関連リソースは自動的にこフォルダーにコピーされます。 Any other components and/or plugins folders are not copied (a component cannot use plug-ins or other components). - -## Application page - -This tab allows you can build a stand-alone, single-user version of your application: +このタブでは、スタンドアロンのシングルユーザー版アプリケーションをビルドします: ![](assets/en/Project/standaloneProj.png) -### Build stand-alone Application +### スタンドアロンアプリケーションをビルド -Checking the **Build stand-alone Application** option and clicking **Build** will create a stand-alone (double-clickable) application directly from your database project. +**スタンドアロンアプリケーションをビルド** オプションを選択して **ビルド** ボタンをクリックすると、スタンドアロンの (つまり、ダブルクリックで起動可能な) アプリケーションがデータベースプロジェクトをもとに作成されます。 -The following elements are required for the build: +ビルドには次のものが必要です: +- 4D Volume Desktop (4D データベースエンジン), +- [適切なライセンス](#licenses) -- 4D Volume Desktop (the 4D database engine), -- an [appropriate license](#licenses) - -On Windows, this feature creates an executable file (.exe). macOS においては、ソフトウェアパッケージが作成されます。 +Windows においては、.exe 拡張子のついた実行ファイルが作成されます。 macOS においては、ソフトウェアパッケージが作成されます。 この処理はコンパイル済みストラクチャーファイルと4D Volume Desktopを統合します。 4D Volume Desktop が提供する機能はライセンスページで指定するライセンス情報に基づきます。 この点についての詳細な情報は、4D の [オンラインストア](http://store.4d.com/jp/) と、セールスドキュメンテーションを参照してください。 @@ -117,8 +124,8 @@ On Windows, this feature creates an executable file (.exe). macOS において ダブルクリックで起動されるアプリケーションをビルドするためには、まず 4D Volume Desktop が格納されているフォルダーの場所を指定しなければなりません: -* *Windows* では: 4D Volume Desktop.4DE や 4D Volume Desktop.RSR、その他動作に必要なファイルやフォルダーを含むフォルダーを選択します。 -* *macOS* では: ソフトウェアパッケージとして 4D Volume Desktop が提供されているので、このパッケージを選択します。 +* *Windows* では: 4D Volume Desktop.4DE や 4D Volume Desktop.RSR、その他動作に必要なファイルやフォルダーを含むフォルダーを選択します。 +* *macOS* では: ソフトウェアパッケージとして 4D Volume Desktop が提供されているので、このパッケージを選択します。 4D Volume Desktop フォルダーを選択するには **[...]** ボタンをクリックします。 フォルダーを選択するダイアログが表示されたら、4D Volume Desktop フォルダー (Windows) またはパッケージ (macOS) を選択します。 @@ -130,55 +137,59 @@ On Windows, this feature creates an executable file (.exe). macOS において このオプションを使って、組み込みアプリケーションとローカルデータファイルとのリンクモードを選択します。 二種類のリンクモードから選択可能です: -* **アプリケーション名** (デフォルト) - このモードでは、4D アプリケーションはストラクチャーファイルに対応する、最後に開かれたデータファイルを開きます。 このモードではアプリケーションパッケージをディスク上で自由に移動させることができます。 アプリケーションを複製する場合を除いて、通常は組み込みアプリに対してこのモードが使用されるべきです。 +* **アプリケーション名** (デフォルト) - このモードでは、4D アプリケーションはストラクチャーファイルに対応する、最後に開かれたデータファイルを開きます。 このモードではアプリケーションパッケージをディスク上で自由に移動させることができます。 アプリケーションを複製する場合を除いて、通常は組み込みアプリに対してこのモードが使用されるべきです。 -* **アプリケーションパス** - このモードでは、組み込み 4D アプリケーションは自身に紐づいている *lastDataPath.xml* ファイルを解析して、起動アプリのフルパスに合致する "executablePath" 属性を持つデータパスマップのエントリーを探し、 同エントリー内で "dataFilePath" 属性で定義されているデータファイルを開きます。 +* **アプリケーションパス** - このモードでは、組み込み 4D アプリケーションは自身に紐づいている *lastDataPath.xml* ファイルを解析して、起動アプリのフルパスに合致する "executablePath" 属性を持つデータパスマップのエントリーを探し、 同エントリー内で "dataFilePath" 属性で定義されているデータファイルを開きます。 データリンクモードについての詳細は [最後に開いたデータファイル](#last-data-file-opened) を参照してください。 + #### 生成されるファイル **ビルド** ボタンをクリックすると、4D は **保存先フォルダー** に **Final Application** フォルダーを作成し、 その中に指定したアプリケーション名のサブフォルダーを作成します。 アプリケーション名に "MyProject"と指定した場合、MyProject サブフォルダー内には以下のファイルが置かれます: -* *Windows* - - * MyProject.exe - 実行可能ファイル、そして MyProject.rsr (アプリケーションリソースファイル) - * 4D Extensions および Resources フォルダー、さまざまなライブラリ (DLL)、 Native Components フォルダー、SASL Plugins フォルダーなど、アプリケーション実行に必要なファイル - * Databaseフォルダー: Resources フォルダーと MyProject.4DZ ファイルが格納されています。 これらはデータベースのコンパイル済みストラクチャーおよびデータベースの Resources フォルダーです。 **注**: このフォルダには、定義されていれば *Default Data* フォルダーも含まれています ([最終アプリケーションでのデータファイルの管理](#data-file-management-in-final-applicatons)を参照してください)。 - * (オプション) データベースに含まれるコンポーネントやプラグインが配置された Components フォルダーおよび Plugins フォルダー。 この点に関する詳細は [プラグイン & コンポーネントページ](#plugins-and-components)を参照してください。 - * Licenses フォルダー - アプリケーションに統合されたライセンス番号の XML ファイルが含まれます。 For more information about this, refer to the [Licenses & Certificate](#licenses-and-certificate) section. - * Additional items added to the 4D Volume Desktop folder, if any (see [Customizing the 4D Volume Desktop folder](#customizing-4d-volume-desktop-folder)). - - All these items must be kept in the same folder in order for the executable to operate. +* *Windows* + * MyProject.exe - 実行可能ファイル、そして MyProject.rsr (アプリケーションリソースファイル) + * 4D Extensions および Resources フォルダー、さまざまなライブラリ (DLL)、 Native Components フォルダー、SASL Plugins フォルダーなど、アプリケーション実行に必要なファイル + * Databaseフォルダー: Resources フォルダーと MyProject.4DZ ファイルが格納されています。 これらはデータベースのコンパイル済みストラクチャーおよびデータベースの Resources フォルダーです。 **注**: このフォルダには、定義されていれば *Default Data* フォルダーも含まれています ([最終アプリケーションでのデータファイルの管理](#データファイルの管理)を参照してください)。 + * (オプション) データベースに含まれるコンポーネントやプラグインが配置された Components フォルダーおよび Plugins フォルダー。 この点に関する詳細は [プラグイン&コンポーネントページ](#プラグイン&コンポーネントページ)を参照してください。 + * Licenses フォルダー - アプリケーションに統合されたライセンス番号の XML ファイルが含まれます。 この点に関する詳細は [ライセンス&証明書ページ](#ライセンス&証明書ページ) を参照してください。 + * 4D Volume Desktop フォルダーに追加されたその他の項目 (あれば)([4D Volume Desktop フォルダーのカスタマイズ](#4d-volume-desktop-フォルダーのカスタマイズ) 参照) -* *macOS* - - - A software package named MyProject.app containing your application and all the items necessary for its operation, including the plug-ins, components and licenses. プラグインやコンポーネントの統合に関する詳細は [プラグイン & コンポーネントページ](#plugins-and-components) を参照してください。 ライセンスの統合に関しては [ライセンス & 証明書ページ](#licenses-and-certificate) を参照してください。 **Note**: In macOS, the [Application file](https://doc.4d.com/4Dv17R6/4D/17-R6/Application-file.301-4311297.en.html) command of the 4D language returns the pathname of the ApplicationName file (located in the Contents:macOS folder of the software package) and not that of the .comp file (Contents:Resources folder of the software package). + 実行ファイルの動作には、これらすべての項目が同じフォルダー内に必要です。 -#### Customizing 4D Volume Desktop folder +* *macOS* + - MyProject.app という名称のソフトウェアパッケージに、プラグインやコンポーネント、ライセンスなど必要な項目がすべて格納されます。 プラグインやコンポーネントの統合に関する詳細は [プラグイン&コンポーネントページ](#プラグイン&コンポーネントページ) を参照してください。 ライセンスの統合に関しては [ライセンス&証明書ページ](#ライセンス&証明書ページ) を参照してください。 **注**: macOSでは、4D ランゲージの [Application file](https://doc.4d.com/4Dv17R6/4D/17-R6/Application-file.301-4311297.en.html) コマンドが返すのは、ソフトウェアパッケージ内の "Contents:macOS" フォルダー内にコピーされる ApplicationName ファイルのパス名です (ソフトウェアパッケージの "Contents:Resources" フォルダー内の .comp ファイルのパスではありません)。 -When building a stand-alone application, 4D copies the contents of the 4D Volume Desktop folder into Destination folder > *Final Application* folder. 必要に応じて、このコピー元である 4D Volume Desktop フォルダーの内容をカスタマイズすることできます。 たとえば: -* 特定の言語バージョンに対応する 4D Volume Desktop をインストールする -* カスタムプラグインを *Plugins* フォルダーに置く -* *Resources* フォルダーの内容をカスタマイズする +#### 4D Volume Desktop フォルダーのカスタマイズ +ダブルクリックで起動可能なアプリケーションをビルドする際、4D は 4D Volume Desktop フォルダーの内容を *Final Application* 内のアプリケーション名サブフォルダーにコピーします。 必要に応じて、このコピー元である 4D Volume Desktop フォルダーの内容をカスタマイズすることできます。 たとえば: + +* 特定の言語バージョンに対応する 4D Volume Desktop をインストールする +* カスタムプラグインを *Plugins* フォルダーに置く +* *Resources* フォルダーの内容をカスタマイズする > macOS では、4D Volume Desktop はソフトウェアパッケージ形式で提供されています。 内容を変更するにはパッケージを開きます (アイコンを **Control+click**)。 + #### Web ファイルの場所 -ダブルクリックで起動可能なアプリケーションを Web サーバーとして使用する場合、Web フォルダーやファイルは特定の場所にインストールする必要があります: +ダブルクリックで起動可能なアプリケーションを Web サーバーとして使用する場合、Web フォルダーやファイルは特定の場所にインストールする必要があります: -* *cert.pem* と *key.pem* ファイル (オプション): これらのファイルはSSL接続とデータ暗号化コマンドに使用されます。 -* デフォルト Web ルートフォルダー +* *cert.pem* と *key.pem* ファイル (オプション): これらのファイルはSSL接続とデータ暗号化コマンドに使用されます。 +* デフォルト Web ルートフォルダー インストール場所: - **Windows**: *Final Application\MyProject\Database* サブフォルダー内 - **macOS**: *MyProject.app* ソフトウェアパッケージと同階層 + + + + ## クライアント/サーバーページ このページでは、クライアントの自動更新もサポートできるクロスプラットフォームなクライアント/サーバーアプリケーションをビルドするための設定をおこないます。 @@ -193,15 +204,17 @@ When building a stand-alone application, 4D copies the contents of the 4D Volume - 4D Server アプリケーション - 4D Volume Desktop アプリケーション (macOS / Windows) -ビルドを行うと、クライアント/サーバーアプリケーションは2つのカスタマイズされたパーツ (サーバーと、各クライアントマシンにインストールするクライアント) で構成されます。 +ビルドを行うと、クライアント/サーバーアプリケーションは2つのカスタマイズされたパーツ (サーバーと、各クライアントマシンにインストールするクライアント) で構成されます。. ビルドされたクライアント/サーバーアプリケーションは起動や接続処理が簡易です: - サーバーを起動するには、サーバーアプリケーションをダブルクリックします。 データベースを選択する必要はありません。 -- クライアントを起動するにも、同様にクライアントアプリケーションをダブルクリックします。すると、サーバーアプリケーションへの接続が直接おこなわれるため、 接続ダイアログでサーバーを選択する必要はありません。 クライアントは接続対象のサーバーを名称 (サーバーが同じサブネットワーク上にある場合)、あるいはIPアドレスによって認識します。IPアドレスの指定は buildapp.4DSettings ファイル内の `IPAddress` XMLキーを使用して設定されます。 接続が失敗した場合のために、代替機構を実装することができます。これについては [クライアントアプリケーションによる接続の管理](#management-of-client-connections) の章で説明されています。 また、**Option** (macOS) や **Alt** (Windows) キーを押しながらクライアントアプリケーション起動すると、標準の接続ダイアログを強制的に表示させることもできます。 サーバーアプリケーションには、対応するクライアントアプリケーションのみが接続できます。 標準の 4D アプリケーションを使用してサーバーアプリケーションに接続を試みると、接続は拒否されエラーが返されます。 -- クライアント側をネットワーク越しに自動更新するようにクライアント/サーバーアプリケーションを設定することも可能です。この点については [サーバーアプリケーション内部のクライアントアプリケーションのコピー](#copy-of-client-applications-in-the-server-application) を参照ください。 +- クライアントを起動するにも、同様にクライアントアプリケーションをダブルクリックします。すると、サーバーアプリケーションへの接続が直接おこなわれるため、 接続ダイアログでサーバーを選択する必要はありません。 クライアントは接続対象のサーバーを名称 (サーバーが同じサブネットワーク上にある場合)、あるいはIPアドレスによって認識します。IPアドレスの指定は buildapp.4DSettings ファイル内の `IPAddress` XMLキーを使用して設定されます。 接続が失敗した場合のために、代替機構を実装することができます。これについては [クライアント接続の管理](#クライアント接続の管理) の章で説明されています。 また、**Option** (macOS) や **Alt** (Windows) キーを押しながらクライアントアプリケーション起動すると、標準の接続ダイアログを強制的に表示させることもできます。 サーバーアプリケーションには、対応するクライアントアプリケーションのみが接続できます。 標準の 4D アプリケーションを使用してサーバーアプリケーションに接続を試みると、接続は拒否されエラーが返されます。 +- クライアント側をネットワーク越しに自動更新するようにクライアント/サーバーアプリケーションを設定することも可能です。この点については [サーバーアプリケーション内部のクライアントアプリケーションのコピー](#サーバーアプリケーション内部のクライアントアプリケーションのコピー) を参照ください。 - また、ランゲージコマンド ([SET UPDATE FOLDER](https://doc.4d.com/4Dv18/4D/18/SET-UPDATE-FOLDER.301-4505379.ja.html)、および [RESTART 4D](https://doc.4d.com/4Dv18/4D/18/RESTART-4D.301-4505382.ja.html)) を使用して、サーバーアプリケーションの更新を自動化することも可能です + + ### サーバーアプリケーションをビルド サーバー部分をビルドするにはこのオプションを選択します。 ビルドに使用する 4D Server アプリケーションの場所を選択する必要があります。 この 4D Server はビルドをおこなうプラットフォームに対応していなければなりません (たとえば、Windows 用のサーバーアプリケーションをビルドするには Windows 上でビルドを実行する必要があり、Windows 版の 4D Server アプリケーションを指定する必要があります)。 @@ -212,17 +225,18 @@ When building a stand-alone application, 4D copies the contents of the 4D Volume #### 現在のバージョン -生成されるアプリケーションのバージョン番号を指定します。 このバージョン番号をもとに、クライアントアプリケーションからの接続を受け入れたり拒否したりできます。 クライアントとサーバーアプリケーションで互換性のある番号の範囲は [XML キー](#build-application-settings) で設定します。 +生成されるアプリケーションのバージョン番号を指定します。 このバージョン番号をもとに、クライアントアプリケーションからの接続を受け入れたり拒否したりできます。 クライアントとサーバーアプリケーションで互換性のある番号の範囲は [XML キー](#アプリケーションビルド設定) で設定します。 #### データリンクモードの基準 このオプションを使って、組み込みアプリケーションとローカルデータファイルとのリンクモードを選択します。 二種類のリンクモードから選択可能です: -* **アプリケーション名** (デフォルト) - このモードでは、4D アプリケーションはストラクチャーファイルに対応する、最後に開かれたデータファイルを開きます。 このモードではアプリケーションパッケージをディスク上で自由に移動させることができます。 アプリケーションを複製する場合を除いて、通常は組み込みアプリに対してこのモードが使用されるべきです。 +* **アプリケーション名** (デフォルト) - このモードでは、4D アプリケーションはストラクチャーファイルに対応する、最後に開かれたデータファイルを開きます。 このモードではアプリケーションパッケージをディスク上で自由に移動させることができます。 アプリケーションを複製する場合を除いて、通常は組み込みアプリに対してこのモードが使用されるべきです。 -* **アプリケーションパス** - このモードでは、組み込み 4D アプリケーションは自身に紐づいている *lastDataPath.xml* ファイルを解析して、起動アプリのフルパスに合致する "executablePath" 属性を持つデータパスマップのエントリーを探し、 同エントリー内で "dataFilePath" 属性で定義されているデータファイルを開きます。 +* **アプリケーションパス** - このモードでは、組み込み 4D アプリケーションは自身に紐づいている *lastDataPath.xml* ファイルを解析して、起動アプリのフルパスに合致する "executablePath" 属性を持つデータパスマップのエントリーを探し、 同エントリー内で "dataFilePath" 属性で定義されているデータファイルを開きます。 + +データリンクモードについての詳細は [最後に開かれたデータファイル](#最後に開かれたデータファイル) を参照してください。 -データリンクモードについての詳細は [最後に開いたデータファイル](#last-data-file-opened) を参照してください。 ### クライアントアプリケーションをビルド @@ -230,35 +244,37 @@ When building a stand-alone application, 4D copies the contents of the 4D Volume #### 4D Volume Desktop の場所 -ビルドに使用する 4D Volume Desktop アプリケーションの場所を選択する必要があります。 この 4D Volume Desktop はビルドをおこなうプラットフォームに対応していなければなりません。 異なるプラットフォーム用のクライアントアプリケーションをビルドするには、そのプラットフォームで 4D アプリケーションを実行し、追加のビルド処理をしなければなりません。 これはクライアントアプリケーションの最初のバージョンをビルドするときのみ必要です。自動アップデート機構を利用することで、それ以降のアップデートは同じプラットフォーム上から管理することができます。 詳細については [4D Serverや4Dクライアントフォルダーのカスタマイズ](#customizing-4d-server-and-or-4d-client-folders) を参照ください。 +ビルドに使用する 4D Volume Desktop アプリケーションの場所を選択する必要があります。 この 4D Volume Desktop はビルドをおこなうプラットフォームに対応していなければなりません。 異なるプラットフォーム用のクライアントアプリケーションをビルドするには、そのプラットフォームで 4D アプリケーションを実行し、追加のビルド処理をしなければなりません。 これはクライアントアプリケーションの最初のバージョンをビルドするときのみ必要です。自動アップデート機構を利用することで、それ以降のアップデートは同じプラットフォーム上から管理することができます。 詳細については [サーバーやクライアントフォルダーのカスタマイズ](#サーバーやクライアントフォルダーのカスタマイズ) を参照ください。 > 4D Volume Desktop のバージョン番号は、4D Developer のバージョン番号と合致する必要があります。 たとえば、4D Developer の v18 を利用していれば、4D Volume Desktop v18 が必要です。 -クライアントアプリから特定のアドレスを使用して (サブネットワーク上にサーバー名が公開されていない) サーバーに接続したい場合、buildapp.4DSettings ファイル内の `IPAddress` XML キーを使用する必要があります。 この点についてのより詳細な情報については、[BUILD APPLICATION](https://doc.4d.com/4Dv18/4D/18/BUILD-APPLICATION.301-4505371.ja.html) コマンドを参照してください。 接続失敗時の特定の機構を実装することもできます。 The different scenarios proposed are described in the [Management of connections by client applications](#management-of-client-connections) paragraph. +クライアントアプリから特定のアドレスを使用して (サブネットワーク上にサーバー名が公開されていない) サーバーに接続したい場合、buildapp.4DSettings ファイル内の `IPAddress` XML キーを使用する必要があります。 この点についてのより詳細な情報については、[BUILD APPLICATION](https://doc.4d.com/4Dv18/4D/18/BUILD-APPLICATION.301-4505371.ja.html) コマンドを参照してください。 接続失敗時の特定の機構を実装することもできます。 詳細は [クライアントアプリケーションによる接続の管理](#クライアント接続の管理) で説明されています。 + +#### サーバーアプリケーション内部のクライアントアプリケーションのコピー + +このエリアのオプションを使用して、クライアント/サーバーアプリケーションの新しいバージョンがビルドされた際の、ネットワーク越しにクライアントを自動更新するメカニズムを設定できます。 -#### Copy of client applications in the server application +- **Windows クライアントアプリケーションの自動更新を有効にする** - このオプションを選択すると、ネットワーク越しの Windows クライアントの自動更新を有効にすることができます。 +- **macOS クライアントアプリケーションの自動更新を有効にする** - このオプションを選択すると、ネットワーク越しの macOS クライアントの自動更新を有効にすることができます。 -The options of this area to set up the mechanism for updating the client parts of your client/server applications using the network each time a new version of the application is generated. +クロスプラットフォームなクライアントアプリケーションの場合には、ビルドをおこなうマシンとは別のプラットフォーム用の 4D Volume Desktop アプリケーションの場所を選択する必要があります。 -- **Allow automatic update of Windows client application** - Check these options so that your Windows client/server application can take advantage of the automatic update mechanism for clients via the network. -- **Allow automatic update of Macintosh client application** - Check these options so that your Macintosh client/server application can take advantage of the automatic update mechanism for clients via the network. +たとえば Windows 上で **[...]** ボタンをクリックし、macOS 用の 4D Volume Desktop.app フォルダーを選択します。 -- **Allow automatic update of Macintosh client application** - If you want to create a cross-platform client application, you must designate the location on your disk of the 4D Volume Desktop application that corresponds to the “concurrent” platform of the build platform. - - For example, if you build your application in Windows, you must use the **[...]** button to designate the 4D Volume Desktop macOS application (provided as a package). -#### Displaying update notification -The client application update notification is carried out automatically following the server application update. +#### 更新通知の表示 -It works as follows: when a new version of the client/server application is built using the application builder, the new client portion is copied as a compressed file in the **Upgrade4DClient** subfolder of the **ApplicationName** Server folder (in macOS, these folders are included in the server package). クロスプラットフォームのクライアントアプリケーションを生成した場合には、各プラットフォーム用に *.4darchive* という更新ファイルが格納されます: +サーバーが更新されると、各クライアントマシン上に自動で更新通知がおこなわれます。 + +これは次のように動作します: クライアント/サーバーアプリケーションの新しいバージョンをビルドする際、新しいクライアントは **ApplicationName** Server フォルダー内の **Upgrade4DClient** サブフォルダーに圧縮して格納されます (macOSでは、これらのフォルダーはサーバーパッケージ内に配置されます)。 クロスプラットフォームのクライアントアプリケーションを生成した場合には、各プラットフォーム用に *.4darchive* という更新ファイルが格納されます: クライアントアプリケーションに更新を通知するには、古いサーバーアプリケーションを新しいバージョンで置き換えて起動します。 あとの処理は自動でおこなわれます。 古いバージョンのクライアントが、更新されたサーバーに接続を試みると、新しいバージョンが利用可能である旨を伝えるダイアログがクライアントマシン上に表示されます。 ユーザーはバージョンを更新するか、ダイアログをキャンセルできます。 -* ユーザーが **OK** をクリックすると、新バージョンがネットワーク越しにクライアントマシンにダウンロードされます。 ダウンロードが完了すると古いクライアントアプリケーションが閉じられて、新しいバージョンが起動しサーバーに接続します。 古いバージョンはゴミ箱に移動されます。 -* ユーザーが **キャンセル** をクリックすると、更新手続きはキャンセルされます。古いクライアントのバージョンがサーバーの許可する範囲外であれば (後述参照)、アプリケーションは閉じられて、接続することはできません。 そうでなければ接続が行われます。 +* ユーザーが **OK** をクリックすると、新バージョンがネットワーク越しにクライアントマシンにダウンロードされます。 ダウンロードが完了すると古いクライアントアプリケーションが閉じられて、新しいバージョンが起動しサーバーに接続します。 古いバージョンはゴミ箱に移動されます。 +* ユーザーが **キャンセル** をクリックすると、更新手続きはキャンセルされます。古いクライアントのバージョンがサーバーの許可する範囲外であれば (後述参照)、アプリケーションは閉じられて、接続することはできません。 そうでなければ接続が行われます。 #### 自動更新の強制 @@ -266,7 +282,8 @@ It works as follows: when a new version of the client/server application is buil 更新を強制するには、サーバーアプリケーションと互換性のあるバージョン番号の範囲からクライアントアプリケーションの現バージョン番号を除外します。 すると、未更新クライアントからの接続は更新メカニズムによって拒否されます。 たとえば、クライアントサーバーアプリケーションの新しいバージョン番号がの 6 の場合、バージョン番号が 5 以下のクライアントアプリケーションを許可しないようにできます。 -[現在のバージョン](build-server-application) はアプリケーションビルドダイアログのクライアント/サーバーページで設定できます (前述)。 接続を許可するバージョン番号の範囲は [XML キー](#build-application-settings) で設定します。 +[現在のバージョン](build-server-application) はアプリケーションビルドダイアログのクライアント/サーバーページで設定できます (前述)。 接続を許可するバージョン番号の範囲は [XML キー](#アプリケーションビルド設定) で設定します。 + #### エラーが発生する場合 @@ -274,24 +291,23 @@ It works as follows: when a new version of the client/server application is buil このエラーが発生する原因は複数ありえます。 このエラーが表示されるような場合は、まず次の点をチェックしてみてください: -* **パス名** - アプリケーションビルドダイアログや XML キー (たとえば *ClientMacFolderToWin*) で指定されたパス名の有効性をチェックしてください。 とくに 4D Volume Desktop へのパスをチェックしてください。 -* **読み書き権限** - クライアントマシン上でカレントユーザーがクライアントアプリケーションを更新する書き込みアクセス権を持っているか確認してください。 +* **パス名** - アプリケーションビルドダイアログや XML キー (たとえば *ClientMacFolderToWin*) で指定されたパス名の有効性をチェックしてください。 とくに 4D Volume Desktop へのパスをチェックしてください。 +* **読み書き権限** - クライアントマシン上でカレントユーザーがクライアントアプリケーションを更新する書き込みアクセス権を持っているか確認してください。 + ### 生成されるファイル クライアント/サーバーアプリケーションをビルドすると、保存先フォルダー内に **Client Server executable** という名前の新しいフォルダーが作成されます。 このフォルダーにはさらに2つのサブフォルダー、 *\ Client* と *\ Server* があります。 - -> エラーが発生した場合これらのフォルダーは作成されません。 そのような場合はエラーの原因を特定するために [ログファイル](#log-file) の内容を確認してください。 +> エラーが発生した場合これらのフォルダーは作成されません。 そのような場合はエラーの原因を特定するために [ログファイル](#ログファイル) の内容を確認してください。 *\ Client* フォルダーは、アプリケーションビルダーを実行したプラットフォームに対応するクライアントアプリケーションを格納します。 このフォルダーを各クライアントにインストールします。 *\ Server* フォルダーはサーバーアプリケーションを格納します。 これらのフォルダーの内容はカレントのプラットフォームにより異なります: -* *Windows* - 各フォルダーに*\Client.exe* (クライアント用) あるいは*\Server.exe* (サーバー用) という名前の実行ファイル、およびそれぞれに対応する.rsrファイルが作成されます。 これらのフォルダーには、アプリケーション実行のために必要な様々なファイルやフォルダー、および元の 4D Server や 4D Volume Desktop に追加されたカスタマイズ項目も格納されます。 -* *macOS* - 各フォルダーは*\Client.app* (クライアント用) と*\Server.app* (サーバー用) という名前のアプリケーションパッケージになっています。 各パッケージには動作に必要なすべてのファイルが含まれます。 macOSではアプリケーションを実行するためにパッケージをダブルクリックします。 - - > ビルドされた macOS パッケージには、Windows 版のサブフォルダーと同じものが格納されています。 ビルドされた macOS パッケージの内容を表示するにはアイコンを **Control+クリック** して、"パッケージの内容を表示"を選択します。 - > +* *Windows* - 各フォルダーに*\Client.exe* (クライアント用) あるいは*\Server.exe* (サーバー用) という名前の実行ファイル、およびそれぞれに対応する.rsrファイルが作成されます。 これらのフォルダーには、アプリケーション実行のために必要な様々なファイルやフォルダー、および元の 4D Server や 4D Volume Desktop に追加されたカスタマイズ項目も格納されます。 +* *macOS* - 各フォルダーは*\Client.app* (クライアント用) と*\Server.app* (サーバー用) という名前のアプリケーションパッケージになっています。 各パッケージには動作に必要なすべてのファイルが含まれます。 macOSではアプリケーションを実行するためにパッケージをダブルクリックします。 + + > ビルドされた macOS パッケージには、Windows 版のサブフォルダーと同じものが格納されています。 ビルドされた macOS パッケージの内容を表示するにはアイコンを **Control+クリック** して、"パッケージの内容を表示"を選択します。 "クライアントの自動更新を有効にする" オプションを選択している場合、*\Server* フォルダー/パッケージには追加で *Upgrade4DClient* サブフォルダーが作成されます。 このサブフォルダーには macOS/Windows 版のクライアントアプリケーションが圧縮されて格納されます。 クライアントアプリケーションを自動更新するときに、このファイルは使用されます。 @@ -301,21 +317,29 @@ It works as follows: when a new version of the client/server application is buil - 特定の言語に対応した4D Serverをインストールする - Plugins フォルダーにプラグインを追加する +- Resources フォルダーのコンテンツをカスタマイズする + +#### Web ファイルの場所 + +サーバーやクライアントを Web サーバーとして使用する場合、Web サーバーが使用するファイルを 特定の場所に配置しなければなりません: -#### Web ファイルの場所 +- *cert.pem* と *key.pem* ファイル (オプション): これらのファイルは SSL 接続で使用されます。 +- デフォルト Web ルートフォルダー (WebFolder) -サーバーやクライアントを Web サーバーとして使用する場合、Web サーバーが使用するファイルを These items are the following: +インストール場所: +* **Windows** + * **サーバーアプリケーション** - *Client Server executable\ \Server\Server Database* サブフォルダー内にこれらの項目を配置します。 + * **クライアントアプリケーション** - *Client Server executable\ \Client* サブフォルダー内にこれらの項目を配置します。 + +* **macOS** + * **サーバーアプリケーション** - *\Server* ソフトウェアパッケージと同階層にこれらの項目を配置します。 + * **クライアントアプリケーション** - *\Client* ソフトウェアパッケージと同階層にこれらの項目を配置します。 -- *cert.pem* and *key.pem* files (optional): These files are used for SSL connections and by data encryption commands, -- Default Web root folder (WebFolder). -Items must be installed: * **on Windows** * **Server application** - in the *Client Server executable\ \Server\Server Database* subfolder. * **クライアントアプリケーション** - *Client Server executable\ \ Client* サブフォルダー内にこれらの項目を配置します。 -* **macOS** - * **サーバーアプリケーション** - *\ Server* ソフトウェアパッケージと同階層にこれらの項目を配置します。 - * **クライアントアプリケーション** - *\ Client* ソフトウェアパッケージと同階層にこれらの項目を配置します。 -## プラグイン&コンポーネントページ + +## プラグイン&コンポーネントページ このページではビルドするアプリケーションに含める [プラグイン](Concepts/plug-ins.md) や [コンポーネント](Concepts/components.md) を設定できます。 @@ -323,32 +347,37 @@ Items must be installed: * **on Windows** * **Server application** - in the *Cli ![](assets/en/Project/buildapppluginsProj.png) -* **アクティブ** 列 - その行の項目をビルドするアプリケーションに統合するかどうかを指定します。 デフォルトですべての項目が選択されています。 プラグインやコンポーネントをアプリケーションから除外するには、チェックボックスの選択を外します。 +* **アクティブ** 列 - その行の項目をビルドするアプリケーションに統合するかどうかを指定します。 デフォルトですべての項目が選択されています。 プラグインやコンポーネントをアプリケーションから除外するには、チェックボックスの選択を外します。 -* **プラグイン&コンポーネント** 列 - プラグイン/コンポーネントの名称を表示します。 +* **プラグイン&コンポーネント** 列 - プラグイン/コンポーネントの名称を表示します。 -* **ID** 列 - プラグイン/コンポーネントの ID (あれば) を表示します。 +* **ID** 列 - プラグイン/コンポーネントの ID (あれば) を表示します。 -* **タイプ** 列 - その要素がプラグインであるかコンポーネントであるかが表示されます。 +* **タイプ** 列 - その要素がプラグインであるかコンポーネントであるかが表示されます。 -アプリケーションにその他の (現在 4D にロードされていない) プラグインやコンポーネントを統合したい場合、4D Server や 4D Volume Desktop の **Plugins** や **Components** フォルダーにそれらを配置します。 ソースアプリケーションのフォルダーから内容をコピーするメカニズム ([4D Volume Desktop フォルダーのカスタマイズ](#customizing-4d-volume-desktop-folder) 参照) により、どんなタイプのファイルでもアプリケーションに統合することができます。 +アプリケーションにその他の (現在 4D にロードされていない) プラグインやコンポーネントを統合したい場合、4D Server や 4D Volume Desktop の **Plugins** や **Components** フォルダーにそれらを配置します。 ソースアプリケーションのフォルダーから内容をコピーするメカニズム ([4D Volume Desktop フォルダーのカスタマイズ](#4d-volume-desktop-フォルダーのカスタマイズ) 参照) により、どんなタイプのファイルでもアプリケーションに統合することができます。 同じプラグインの異なるバージョンが見つかった場合 (現在 4D にロードされているものと同じプラグインが、ソースアプリケーションのフォルダーにも配置されている場合など)、4D Volume Desktop/4D Server フォルダーにインストールされているバージョンが優先されます。 他方、同じコンポーネントが両方にインストールされていた場合は、アプリケーションを開くことはできません。 - > 配布するアプリケーションでプラグインやコンポーネントを使用するには、それぞれ適切なライセンスが必要です。 -## ライセンス&証明書ページ -ライセンス&証明書のページでは、次のようなことができます: -* シングルユーザーのスタンドアロンアプリケーションに統合するライセンス番号を指定します。 -* macOS 環境下では、証明書を使用してアプリケーションに署名をすることができます。 + + + +## ライセンス&証明書ページ + +ライセンス&証明書のページでは、次のようなことができます: + +* シングルユーザーのスタンドアロンアプリケーションに統合するライセンス番号を指定します。 +* macOS 環境下では、証明書を使用してアプリケーションに署名をすることができます。 + ![](assets/en/Project/buildapplicenseProj.png) ### ライセンスリスト -アプリケーションに統合するのに使用できる配付ライセンスの一覧を表示します。 デフォルトでリストは空です。 アプリケーションをビルドするには *4D Developer Professional* ライセンスと、その開発ライセンスに対応する *4D Desktop Volume* ライセンスを指定しなければなりません。 +アプリケーションに統合するのに使用できる配付ライセンスの一覧を表示します。 デフォルトでリストは空です。 アプリケーションをビルドするには *4D Developer Professional* ライセンスと、その開発ライセンスに対応する *4D Desktop Volume* ライセンスを指定しなければなりません。 現在使用されているものとは別の4D Developer Professional のライセンス番号とその付属ライセンスを追加することもできます。 ライセンスを追加または取り除くにはウィンドウ下部の **[+]** または **[-]** ボタンをクリックします。 @@ -358,48 +387,49 @@ Items must be installed: * **on Windows** * **Server application** - in the *Cli ファイルを選択すると、リストに選択内容が反映されます: -* **ライセンス #** - 製品ライセンス番号 -* **ライセンス** - プロダクト名 -* **有効期限** - ライセンスの有効期限 (あれば) -* **パス** - ディスク上のライセンスの場所 +* **ライセンス #** - 製品ライセンス番号 +* **ライセンス** - プロダクト名 +* **有効期限** - ライセンスの有効期限 (あれば) +* **パス** - ディスク上のライセンスの場所 ライセンスが有効でない場合、警告が表示されます。 必要なだけ有効なファイルを選択することができます。 実行可能アプリケーションをビルドする際に 4D は最も適切なライセンスを使用します。 - > "R-リリース" バージョンのアプリケーションをビルドするには、専用の "R" ライセンスが必要です ("R" 製品用のライセンス番号は "R-" から始まる番号です)。 アプリケーションビルド後、配布ライセンスファイルは実行可能ファイルと同階層 (Windows) やパッケージ内 (macOS) に自動でコピーされます。 + ### OS X 署名に使用する証明書 アプリケーションビルダーは、macOS 環境下において組み込み 4D アプリに署名をする機能を備えています (macOS のシングルユーザーアプリ、サーバーおよびクライアントアプリ)。 アプリケーションを署名することにより、 macOS において「Mac App Store と確認済みの開発元からのアプリケーションを許可」のオプションが選択されているときに Gatekeeper の機能を使用してアプリケーションを実行することが可能になります (後述の "Gatekeeper について" を参照ください)。 -- **アプリケーションに署名** オプションにチェックをすると、macOS のアプリケーションビルド処理に認証が含まれます。 4D will check the availability of elements required for certification when the build occurs: +- **アプリケーションに署名** オプションにチェックをすると、macOS のアプリケーションビルド処理に認証が含まれます。4D はビルドの際に、認証に必要な要素の有無をチェックします: ![](assets/en/Project/buildapposxcertProj.png) -This option is displayed under both Windows and macOS, but it is only taken into account for macOS versions. +このオプションは Windows と macOS 両方の環境で表示されますが、macOS の場合においてのみ有効です。 -* **Name of certificate** - Enter the name of your developer certificate validated by Apple in this entry area. この認証名は通常、キーチェーンアクセスユーティリティ内の証明書の名前と一緒です: +* **認証名** - Apple によって有効化されたデベロッパー認証名を入力してください。 この認証名は通常、キーチェーンアクセスユーティリティ内の証明書の名前と一緒です: ![](assets/en/Project/certificate.png) -Apple からデベロッパ認証を取得するためには、キーチェーンアクセスのメニューのコマンドを使用するか、次のリンクへ移動してください: - +Apple からデベロッパー認証を取得するためには、キーチェーンアクセスのメニューのコマンドを使用するか、次のリンクへ移動してください: [http://developer.apple.com/library/mac/#documentation/Security/Conceptual/CodeSigningGuide/Procedures/Procedures.html](http://developer.apple.com/library/mac/#documentation/Security/Conceptual/CodeSigningGuide/Procedures/Procedures.html) > この証明書の取得には Apple の codesign ユーティリティが必要になります。このユーティリティはデフォルトで提供されており、通常 “/usr/bin/codesign” フォルダーにあります。 エラーが起きた際には、このユーティリティがディスク上にあるかどうかを確認してください。 + #### Gatekeeper について Gatekeeper とは macOS のセキュリティ機能で、インターネットからダウンロードしてきたアプリケーションの実行を管理するものです。 もしダウンロードしたアプリケーションが Apple Store からダウンロードしたものではない、または署名されていない場合には実行が拒否されます。 アプリケーションビルダーの **アプリケーションに署名** 機能によって、このセキュリティオプションとデフォルトで互換性のあるアプリケーションを生成することができます。 + #### ノータリゼーション (公証) について macOS 10.14.5 (Mojave) および 10.15 (Catalina) において、アプリケーションのノータリゼーション (公証) が Apple より強く推奨されています。公証を得ていないアプリケーションをインターネットからダウンロードした場合、デフォルトでブロックされます。 -Apple の公証サービスを利用するのに必要な条件を満たすため、4D v18 では [ビルトインの署名機能](#os-x-signing-certificate) が更新されています。 公証自体はデベロッパーによっておこなわなくてはいけないもので、4D とは直接関係ありません。なお、Xcode のインストールが必須である点に注意してください。 公証の手順については 4Dの [ブログ記事](https://blog.4d.com/how-to-notarize-your-merged-4d-application/) や [テクニカルノート](https://4d-jp.github.io/tech_notes/20-02-25-notarization/) を参照ください。 +Apple の公証サービスを利用するのに必要な条件を満たすため、4D v18 では [ビルトインの署名機能](#os-x-署名に使用する証明書) が更新されています。 公証自体はデベロッパーによっておこなわなくてはいけないもので、4D とは直接関係ありません。なお、Xcode のインストールが必須である点に注意してください。 公証の手順については 4Dの [ブログ記事](https://blog.4d.com/how-to-notarize-your-merged-4d-application/) や [テクニカルノート](https://4d-jp.github.io/tech_notes/20-02-25-notarization/) を参照ください。 公証についての詳細は、[Apple のデベロッパー Web サイト](https://developer.apple.com/documentation/xcode/notarizing_your_app_before_distribution/customizing_the_notarization_workflow) を参照ください。 @@ -407,14 +437,13 @@ Apple の公証サービスを利用するのに必要な条件を満たすた 4Dは、ダブルクリックで実行可能なアプリケーションにデフォルトアイコンを割り当てますが、各アプリケーションごとにこのアイコンをカスタマイズできます。 -* **macOs** - アプリケーションビルドの際にアイコンをカスタマイズするには、 icns タイプのアイコンファイルを作成し、それを Project フォルダーと同階層に配置しておきます。 - - > Apple, Inc. より、*icns* アイコンファイルを作成するツールが提供されています。(詳細については、[Apple documentation](https://developer.apple.com/library/archive/documentation/GraphicsAnimation/Conceptual/HighResolutionOSX/Optimizing/Optimizing.html#//apple_ref/doc/uid/TP40012302-CH7-SW2) を参照してください。) - +* **macOs** - アプリケーションビルドの際にアイコンをカスタマイズするには、 icns タイプのアイコンファイルを作成し、それを Project フォルダーと同階層に配置しておきます。 +> Apple, Inc. より、*icns* アイコンファイルを作成するツールが提供されています。(詳細については、[Apple documentation](https://developer.apple.com/library/archive/documentation/GraphicsAnimation/Conceptual/HighResolutionOSX/Optimizing/Optimizing.html#//apple_ref/doc/uid/TP40012302-CH7-SW2) を参照してください。) + アイコンファイルの名前はプロジェクトファイル名+"*.icns*" 拡張子でなければなりません。 4D は自動でこのファイルを認識し、アイコンとして使用します (*.icns* ファイルは *ApplicationName.icns* に名称変更されて Resourcesフォルダーに置かれます。さらに *info.plist* ファイルの *CFBundleFileIcon* エントリーを更新します)。 -* **Windows** - アプリケーションビルドの際にアイコンをカスタマイズするには、 .ico タイプのアイコンファイルを作成し、それを Project フォルダーと同階層に配置しておきます。 - +* **Windows** - アプリケーションビルドの際にアイコンをカスタマイズするには、 .ico タイプのアイコンファイルを作成し、それを Project フォルダーと同階層に配置しておきます。 + アイコンファイルの名前はストラクチャーファイル名+"*.ico*" 拡張子でなければなりません。 4Dは自動でこのファイルを認識し、アイコンとして使用します。 また、buildApp.4DSettings ファイルにて、使用すべきアイコンを [XML keys](https://doc.4d.com/4Dv18/4D/18/4D-XML-Keys-BuildApplication.100-4670981.ja.html) (SourcesFiles の項参照)によって指定することも可能です。 次のキーが利用できます: @@ -428,6 +457,8 @@ Apple の公証サービスを利用するのに必要な条件を満たすた - ClientMacIconForWinPath - ClientWinIconForWinPath + + ## データファイルの管理 ### データファイルを開く @@ -436,15 +467,15 @@ Apple の公証サービスを利用するのに必要な条件を満たすた 組み込みアプリ起動時のオープニングシーケンスは以下のようになっています: -1. 4D は最後に開かれたデータファイルを開こうとします。詳しくは [後述の説明](#last-data-file-opened) を参照ください (これは初回起動時には適用されません)。 -2. 見つからない場合、4D は .4DZ ファイルと同階層の Default Data フォルダー内にあるデータファイルを、読み込み専用モードで開こうとします。 +1. 4D は最後に開かれたデータファイルを開こうとします。詳しくは [後述の説明](#最後に開かれたデータファイル) を参照ください (これは初回起動時には適用されません)。 +2. 見つからない場合、4D は .4DZ ファイルと同階層の Default Data フォルダー内にあるデータファイルを、読み取り専用モードで開こうとします。 3. これも見つからない場合、4D は標準のデフォルトデータファイルを開こうとします(.4DZ ファイルと同じ場所にある、同じ名前のファイル)。 4. これも見つからない場合、4D は "データファイルを開く" ダイアログボックスを表示します。 + ### 最後に開かれたデータファイル #### 最後に開かれたファイルへのパス - 4D でビルドされたスタンドアロンまたはサーバーアプリケーションは、最後に開かれたデータファイルのパスをアプリケーションのユーザー設定フォルダー内に保存します。 アプリケーションのユーザー設定フォルダーの場所は、以下のコマンドで返されるパスに対応しています: @@ -469,34 +500,38 @@ userPrefs:=Get 4D folder(Active 4D Folder) このモードを使えば、組み込みアプリがいくつあっても、それぞれが専用のデータファイルを使えます。 ただし、デメリットもあります: アプリケーションパッケージを移動させてしまうとアプリケーションパスが変わってしまうため、データファイルを見つけられなくなります。この場合、ユーザーは開くデータファイルを指定するダイアログを提示され、正しいファイルを選択しなくてはなりません。一度選択されれば、*lastDataPath.xml* ファイルが更新され、新しい "executablePath" 属性のエントリーが保存されます。 + *データがアプリケーション名でリンクされている場合の複製:* ![](assets/en/Project/datalinking1.png) *データがアプリケーションパスでリンクされている場合の複製:* ![](assets/en/Project/datalinking2.png) このデータリンクモードはアプリケーションビルドの際に選択することができます。 次の二つから選択可能です: -- アプリケーションビルダーの [アプリケーションページ](#application) または [クライアント/サーバーページ](#client-server) を使用する。 +- アプリケーションビルダーの [アプリケーションページ](#アプリケーションページ) または [クライアント/サーバーページ](#client-server) を使用する。 - シングルユーザーまたはサーバーアプリケーションの **LastDataPathLookup** XMLキーを使用する。 + ### デフォルトのデータフォルダーを定義する -4D では、アプリケーションビルド時にデフォルトのデータファイルを指定することができます。 アプリケーションの初回起動時に、開くべきローカルデータファイルが見つからなかった場合 (前述の [オープニングシーケンス](#opening-the-data-file)参照)、デフォルトのデータファイルが読み込み専用モードで自動的に開かれます。 この機能を使って、組み込みアプリを初回起動したときのデータファイル作成・選択の操作をより制御することができます。 +4D では、アプリケーションビルド時にデフォルトのデータファイルを指定することができます。 アプリケーションの初回起動時に、開くべきローカルデータファイルが見つからなかった場合 (前述の [オープニングシーケンス](#データファイルを開く)参照)、デフォルトのデータファイルが読み取り専用モードで自動的に開かれます。 この機能を使って、組み込みアプリを初回起動したときのデータファイル作成・選択の操作をより制御することができます。 具体的には、次のような場合に対応できます: - 新しい、またはアップデートされた組み込みアプリを起動したときに、"データファイルを開く" ダイアログが表示されるのを防ぐことができます。 たとえば、デフォルトデータファイルが開かれたことを起動時に検知して、独自のコードやダイアログを実行して、ローカルデータファイルの作成や選択を促すことができます。 -- デモアプリなどの用途で、読み込み専用データしか持たない組み込みアプリを配布することができます。 +- デモアプリなどの用途で、読み取り専用データしか持たない組み込みアプリを配布することができます。 + デフォルトのデータファイルを定義・使用するには: -- デフォルトのデータファイル (名称は必ず "Default.4DD") を、データベースプロジェクトのデフォルトフォルダー (名称は必ず "Default Data") 内に保存します。 このデフォルトのデータファイルには必要なファイルもすべて揃っている必要があります: インデックス (.4DIndx)、外部BLOB、ジャーナル、他。 必ず、有効なデフォルトデータファイルを用意するようにしてください。 なお、デフォルトデータファイルはつねに読み込み専用モードで開かれるため、データファイルの作成前に、あらかじめ大元のストラクチャー設定の "ログを使用" オプションを非選択にしておくことが推奨されます。 +- デフォルトのデータファイル (名称は必ず "Default.4DD") を、データベースプロジェクトのデフォルトフォルダー (名称は必ず "Default Data") 内に保存します。 このデフォルトのデータファイルには必要なファイルもすべて揃っている必要があります: インデックス (.4DIndx)、外部BLOB、ジャーナル、他。 必ず、有効なデフォルトデータファイルを用意するようにしてください。 なお、デフォルトデータファイルはつねに読み取り専用モードで開かれるため、データファイルの作成前に、あらかじめ大元のストラクチャー設定の "ログを使用" オプションを非選択にしておくことが推奨されます。 - アプリケーションをビルドすると、このデフォルトデータフォルダーが組み込みアプリに統合されます。 同フォルダー内ファイルはすべて一緒に埋め込まれます。 この機能を図示すると次のようになります: ![](assets/en/Project/DefaultData.png) -デフォルトのデータファイルが初回起動時に検知された場合、データファイルは自動的に読み込み専用モードで開かれ、カスタムのオペレーション実行ができるようになります。 +デフォルトのデータファイルが初回起動時に検知された場合、データファイルは自動的に読み取り専用モードで開かれ、カスタムのオペレーション実行ができるようになります。 + ## クライアント接続の管理 @@ -506,11 +541,11 @@ userPrefs:=Get 4D folder(Active 4D Folder) 組み込みクライアントアプリの接続プロシージャーは、専用サーバーが使用不可能な場合にも柔軟に対応します。 4D クライアントアプリのスタートアップシナリオは、次のとおりです: -- クライアントアプリは検索サービスを使用してサーバーへの接続を試みます (同じサブネット内に公開されたサーバー名に基づいて検索します)。 - または - クライアントアプリ内の "EnginedServer.4DLink" ファイルに有効な接続情報が保存されていた場合、クライアントアプリは指定されたサーバーアドレスへ接続を試みます。 +- クライアントアプリは検索サービスを使用してサーバーへの接続を試みます (同じサブネット内に公開されたサーバー名に基づいて検索します)。< + または + クライアントアプリ内の "EnginedServer.4DLink" ファイルに有効な接続情報が保存されていた場合、クライアントアプリは指定されたサーバーアドレスへ接続を試みます。 - これが失敗した場合、クライアントアプリケーションは、アプリケーションのユーザー設定フォルダーに保存されている情報 ("lastServer.xml" ファイル、詳細は後述参照) を使用してサーバーへの接続を試みます。 -- これが失敗した場合、クライアントアプリケーションは接続エラーダイアログボックスを表示します。 +- これが失敗した場合、クライアントアプリケーションは接続エラーダイアログボックスを表示します。 - ユーザーが **選択...** ボタンをクリックした場合、標準の "サーバー接続" ダイアログボックスが表示されます (ビルドの段階で許可されていた場合に限ります。詳細は後述)。 - ユーザーが **終了** ボタンをクリックした場合、クライアントアプリケーションは終了します。 - 接続が成功した場合、クライアントアプリケーションは将来の使用のために、その接続情報をアプリケーションのユーザー設定フォルダーに保存します。 @@ -525,15 +560,17 @@ userPrefs:=Get 4D folder(Active 4D Folder) このメカニズムは、最初に指定したサーバーが何らかの理由 (例えばメンテナンスモードなど) で一時的に使用できないケースに対応します。 こういった状態が初めて起こったときにはサーバー選択ダイアログボックスが表示され (ただし許可されていた場合に限ります、後述参照)、ほかのサーバーをユーザーが手動で選択すると、その接続が成功した場合にはそのパスが保存されます。 それ以降に接続ができなかった場合には、"lastServer.xml" のパス情報によって自動的に対処されます。 -> - ネットワークの設定などの影響で、クライアントアプリが恒久的に検索サービスを使ったサーバー接続ができない場合には、ビルド時にあらかじめ "BuildApp.4DSettings" ファイル内の [IPAddress](https://doc.4d.com/4Dv18/4D/18/IPAddress.300-4671089.ja.html) キーでホスト名を指定しておくことが推奨されます。 このメカニズムはあくまで一時的な接続不可状態の場合を想定しています。 +> - ネットワークの設定などの影響で、クライアントアプリが恒久的に検索サービスを使ったサーバー接続ができない場合には、ビルド時にあらかじめ "BuildApp.4DSettings" ファイル内の [IPAddress](https://doc.4d.com/4Dv18/4D/18/IPAddress.300-4671089.ja.html) キーでホスト名を指定しておくことが推奨されます。 このメカニズムはあくまで一時的な接続不可状態の場合を想定しています。 > - スタートアップ時に **Alt/Option** キーを押しながら起動してサーバー接続ダイアログボックスを表示する方法は、すべての場合において可能です。 + + ### エラー時のサーバー選択ダイアログボックス使用の可・不可 組み込みクライアントアプリがサーバーに接続できない場合、標準のサーバー選択ダイアログボックスを表示するかどうかは設定しておくことができます。 この設定は、アプリケーションをビルドするマシン上の [ServerSelectionAllowedXML](https://doc.4d.com/4Dv18/4D/18/ServerSelectionAllowed.300-4671093.ja.html) キーの値によって制御されます: - **エラーメッセージを表示し、サーバー選択ダイアログボックスを表示させない** デフォルトの挙動です。 アプリケーションは終了する以外の選択肢がありません。 - `ServerSelectionAllowed`: **False** 値、またはキーを省略 ![](assets/en/Project/connect1.png) + `ServerSelectionAllowed`: **False** 値、またはキーを省略 ![](assets/en/Project/connect1.png) -- **エラーメッセージを表示し、サーバー選択ダイアログボックスへのアクセスを可能にする** The user can access the server selection window by clicking on the **Select...** button. - `ServerSelectionAllowed`: **True** ![](assets/en/Project/connect2.png) ![](assets/en/Project/connect3.png) \ No newline at end of file +- **エラーメッセージを表示し、サーバー選択ダイアログボックスへのアクセスを可能にする** ユーザーは **選択...** ボタンをクリックする事によってサーバー選択ウィンドウにアクセスできます。 + `ServerSelectionAllowed`: **true**値 ![](assets/en/Project/connect2.png) ![](assets/en/Project/connect3.png) diff --git a/website/translated_docs/ja/Project/creating.md b/website/translated_docs/ja/Project/creating.md index a29e8446d5c778..546646cc044f37 100644 --- a/website/translated_docs/ja/Project/creating.md +++ b/website/translated_docs/ja/Project/creating.md @@ -7,6 +7,7 @@ title: 4D プロジェクトの作成 新規の 4D プロジェクトを作成できるのは **4D Developer** アプリケーションのみです ([プロジェクトの開発](developing.md) 参照)。 + **注:** 4D Server は .4DProject ファイルを読み取り専用モードで開くことができます (テスト目的のみ)。 運用するにあたっては、4D プロジェクトは .4dz ファイル (圧縮ファイル) の形で提供されます。 詳細については [プロジェクトパッケージのビルド](building.md) を参照ください。 > 既存のバイナリデータベースを変換してプロジェクトデータベースにすることもできます doc.4d.com の "[データベースをプロジェクトモードに変換する](https://doc.4d.com/4Dv18/4D/18/Converting-databases-to-projects.300-4606146.ja.html)" 参照。 @@ -16,16 +17,12 @@ title: 4D プロジェクトの作成 新規データベースプロジェクトを作成するには: 1. 4D Developer アプリケーションを起動します。 -2. **ファイル**メニューから**新規 > データベースプロジェクト...**を選択します: ![](assets/en/Project/project-create1.png) - または - ツールバーの**新規**ボタンの矢印をクリックして**データベースプロジェクト...**を選択します: ![](assets/en/Project/projectCreate2.png) - 標準の**保存**ダイアログが開き、4D データベースプロジェクトを格納するフォルダーの名称と場所が指定できます。 -3. プロジェクトフォルダー名を入力したら、**保存**をクリックします。 この名称はつぎの場所に使用されます: +2. **ファイル**メニューから**新規 > データベースプロジェクト...**を選択します: ![](assets/en/Project/project-create1.png) + または
ツールバーの**新規**ボタンの矢印をクリックして**データベースプロジェクト...**を選択します: ![](assets/en/Project/projectCreate2.png)
標準の**保存**ダイアログが開き、4D データベースプロジェクトを格納するフォルダーの名称と場所が指定できます。 +1. プロジェクトフォルダー名を入力したら、**保存**をクリックします。 この名称はつぎの場所に使用されます: - プロジェクトを格納するフォルダーの名称 ([4D プロジェクトのアーキテクチャー](Project/architecture.md) で紹介している例では "MyFirstProject") - - "Project" フォルダーの中にある .4DProject ファイルの名称 - - OS によって許可されている名称であれば使用可能です。 *警告:* 異なる OS での使用を予定していたり、ソース管理ツールを利用したりするのであれば、それらの命名規則を考慮する必要があります。 + - "Project" フォルダーの中にある .4DProject ファイルの名称

OS によって許可されている名称であれば使用可能です。 *警告:* 異なる OS での使用を予定していたり、ソース管理ツールを利用したりするのであれば、それらの命名規則を考慮する必要があります。 -ダイアログボックスを受け入れると、4D は開いているデータベース (あれば) を閉じ、指定の場所にプロジェクトフォルダーを作成し、データベースプロジェクトに必要なファイルを設置します (詳細については [4D プロジェクトのアーキテクチャー](Project/architecture.md) を参照ください)。 +ダイアログボックスを受け入れると、4D は開いているデータベース (あれば) を閉じ、指定の場所にプロジェクトフォルダーを作成し、データベースプロジェクトに必要なファイルを設置します (詳細については [4D プロジェクトのアーキテクチャー](Project/architecture.md) を参照ください)。 -つぎに、エクスプローラーを最前面にした 4D アプリケーションウィンドウが表示されます。 プロジェクトが作成されたら、プロジェクトフォームの作成や、ストラクチャーエディターを開いてテーブルおよびフィールドを追加するなど、開発作業へと進みます。 \ No newline at end of file +つぎに、エクスプローラーを最前面にした 4D アプリケーションウィンドウが表示されます。 プロジェクトが作成されたら、プロジェクトフォームの作成や、ストラクチャーエディターを開いてテーブルおよびフィールドを追加するなど、開発作業へと進みます。 diff --git a/website/translated_docs/ja/Project/developing.md b/website/translated_docs/ja/Project/developing.md index 8c21c15c36137a..46a2ec436c68d6 100644 --- a/website/translated_docs/ja/Project/developing.md +++ b/website/translated_docs/ja/Project/developing.md @@ -5,21 +5,24 @@ title: プロジェクトの開発 ## 開発ツール + 4D データベースプロジェクトは **4D Developer** アプリケーションを使ってローカルに作成します。 4D Developer でプロジェクトを開くには、*databaseName.4DProject* という名称のファイルを選択します ([4D プロジェクトのアーキテクチャー](architecture.md) 参照)。 4D プロジェクトファイルの大多数はテキストファイルなため、任意のテキストエディターを使って作業することも可能です。 ファイルへの同時アクセスはファイルアクセスマネージャーによって管理されます (後述参照)。 4D Server も *databaseName.4DProject* ファイルを開くことができます: リモートの 4D マシンはデータベースに接続して利用することができますが、データベースストラクチャーファイルはすべて読み取り専用のため、開発はできません。 マルチユーザー開発は標準的なソース管理ツールを使っておこないます。これによって、異なるブランチで開発し、比較してマージまたは変更を戻すといった処理が可能になります。 + + ## プロジェクトファイルアクセス 4D Developer でプロジェクトを開発するにあたって、ストラクチャー要素やメソッド、フォームの作成・変更・保存には 4D のビルトインエディターを利用することができます。 このエディターの作業対象はディスク上のファイルなため、同じファイルが同時に編集されていたり削除されていたりといった場合には競合が発生します。 たとえば、一つのメソッドをメソッドエディターで編集しつつ、標準のテキストエディターでも開いて変更した場合に競合が起こりえます。 4D Developer のフレームワークには同時アクセスを制御するためのファイルアクセスマネージャーが含まれています: -- 開かれているファイルが OS レベルで読み取り専用の場合、エディターには鍵アイコンが表示されます: - ![](assets/en/Project/lockicon.png) -- 開かれているファイルが複数のアクセスによって同時編集を受けている場合、4D は保存時に警告ダイアログを表示します: ![](assets/en/Project/projectReload.png) +- 開かれているファイルが OS レベルで読み取り専用の場合、エディターには鍵アイコンが表示されます: + ![](assets/en/Project/lockicon.png) +- 開かれているファイルが複数のアクセスによって同時編集を受けている場合、4D は保存時に警告ダイアログを表示します: ![](assets/en/Project/projectReload.png) - **はい**: 編集内容を破棄してリロードします - **いいえ**: 編集内容で上書き保存します - **キャンセル**: 保存しません @@ -30,4 +33,4 @@ title: プロジェクトの開発 - フォームエディター - メソッドエディター - 環境設定 -- ツールボックス \ No newline at end of file +- ツールボックス diff --git a/website/translated_docs/ja/Project/overview.md b/website/translated_docs/ja/Project/overview.md index cee6984d54b18c..45b68cf82cb9a7 100644 --- a/website/translated_docs/ja/Project/overview.md +++ b/website/translated_docs/ja/Project/overview.md @@ -7,12 +7,14 @@ title: 概要 4D プロジェクトは 4D Developer アプリケーションを使って作成・編集します。 プロジェクトファイルをもとにビルドしたアプリケーション運用ファイルは、4D Server や 4D Volume ライセンスで開くことができます (組み込みアプリケーション)。 + ## プロジェクトファイル 4D プロジェクトファイルは 4D で開いて編集します。 ストラクチャーエディター、メソッドエディター、フォームエディター、メニューエディターなど、機能の充実したエディターを使ってファイルを扱うことができます。 また、人間にも解読可能なテキストファイル (JSON、XML等) 形式で提供されているため、プロジェクトの読み書きは任意のコードエディターでおこなうことも可能です。 + ## ソース管理 4D プロジェクトファイルによって、汎用的なコーディング、アプリケーションテンプレートの作成や、コードシェアリングが容易になります。 @@ -23,6 +25,7 @@ title: 概要 - リビジョン比較 - ロールバック + ## プロジェクトで開発する 4D データベースプロジェクトを作成する方法は二つあります: @@ -32,4 +35,4 @@ title: 概要 プロジェクトの開発は 4D Developer アプリケーションを用いて、ローカルにおこないます -- [プロジェクトの開発](developing.md) 参照。 チーム開発によるソースの管理にはソース管理ツールを使います。 -4D プロジェクトはコンパイルして圧縮し、シングルユーザーまたはクライアントサーバーアプリケーションとして簡単に運用することができます -- [プロジェクトパッケージのビルド](building.md) 参照。 \ No newline at end of file +4D プロジェクトはコンパイルして圧縮し、シングルユーザーまたはクライアントサーバーアプリケーションとして簡単に運用することができます -- [プロジェクトパッケージのビルド](building.md) 参照。 diff --git a/website/translated_docs/ja/REST/$asArray.md b/website/translated_docs/ja/REST/$asArray.md index f6c4fbde694dc0..c077f17a631a11 100644 --- a/website/translated_docs/ja/REST/$asArray.md +++ b/website/translated_docs/ja/REST/$asArray.md @@ -4,116 +4,121 @@ title: '$asArray' --- -Returns the result of a query in an array (i.e. a collection) instead of a JSON object. +クエリの結果を、JSONオブジェクトではなく配列 (コレクション) として返します。 + ## 説明 -If you want to receive the response in an array, you just have to add `$asArray` to your REST request (*e.g.*, `$asArray=true`). +レスポンスを配列として取得するには、RESTリクエストに `$asArray` を追加します (*例:* `$asArray=true`)。 ## 例題 +配列としてレスポンスを取得する例です。 + + `GET /rest/Company/?$filter="name begin a"&$top=3&$asArray=true` -Here is an example or how to receive the response in an array. +**レスポンス**: -`GET /rest/Company/?$filter="name begin a"&$top=3&$asArray=true` +```` +[ + { + "__KEY": 15, + "__STAMP": 0, + "ID": 15, + "name": "Alpha North Yellow", + "creationDate": "!!0000-00-00!!", + "revenues": 82000000, + "extra": null, + "comments": "", + "__GlobalStamp": 0 + }, + { + "__KEY": 34, + "__STAMP": 0, + "ID": 34, + "name": "Astral Partner November", + "creationDate": "!!0000-00-00!!", + "revenues": 90000000, + "extra": null, + "comments": "", + "__GlobalStamp": 0 + }, + { + "__KEY": 47, + "__STAMP": 0, + "ID": 47, + "name": "Audio Production Uniform", + "creationDate": "!!0000-00-00!!", + "revenues": 28000000, + "extra": null, + "comments": "", + "__GlobalStamp": 0 + } +] +```` -**Response**: +同じデータをデフォルトの JSON形式で取得した場合です: - [ +```` +{ + "__entityModel": "Company", + "__GlobalStamp": 50, + "__COUNT": 52, + "__FIRST": 0, + "__ENTITIES": [ { - "__KEY": 15, + "__KEY": "15", + "__TIMESTAMP": "2018-03-28T14:38:07.434Z", "__STAMP": 0, "ID": 15, "name": "Alpha North Yellow", - "creationDate": "!!0000-00-00!!", + "creationDate": "0!0!0", "revenues": 82000000, "extra": null, "comments": "", - "__GlobalStamp": 0 + "__GlobalStamp": 0, + "employees": { + "__deferred": { + "uri": "/rest/Company(15)/employees?$expand=employees" + } + } }, { - "__KEY": 34, + "__KEY": "34", + "__TIMESTAMP": "2018-03-28T14:38:07.439Z", "__STAMP": 0, "ID": 34, "name": "Astral Partner November", - "creationDate": "!!0000-00-00!!", + "creationDate": "0!0!0", "revenues": 90000000, "extra": null, "comments": "", - "__GlobalStamp": 0 + "__GlobalStamp": 0, + "employees": { + "__deferred": { + "uri": "/rest/Company(34)/employees?$expand=employees" + } + } }, { - "__KEY": 47, + "__KEY": "47", + "__TIMESTAMP": "2018-03-28T14:38:07.443Z", "__STAMP": 0, "ID": 47, "name": "Audio Production Uniform", - "creationDate": "!!0000-00-00!!", + "creationDate": "0!0!0", "revenues": 28000000, "extra": null, "comments": "", - "__GlobalStamp": 0 + "__GlobalStamp": 0, + "employees": { + "__deferred": { + "uri": "/rest/Company(47)/employees?$expand=employees" + } + } } - ] - + ], +"__SENT": 3 +} +```` -The same data in its default JSON format: - { - "__entityModel": "Company", - "__GlobalStamp": 50, - "__COUNT": 52, - "__FIRST": 0, - "__ENTITIES": [ - { - "__KEY": "15", - "__TIMESTAMP": "2018-03-28T14:38:07.434Z", - "__STAMP": 0, - "ID": 15, - "name": "Alpha North Yellow", - "creationDate": "0!0!0", - "revenues": 82000000, - "extra": null, - "comments": "", - "__GlobalStamp": 0, - "employees": { - "__deferred": { - "uri": "/rest/Company(15)/employees?$expand=employees" - } - } - }, - { - "__KEY": "34", - "__TIMESTAMP": "2018-03-28T14:38:07.439Z", - "__STAMP": 0, - "ID": 34, - "name": "Astral Partner November", - "creationDate": "0!0!0", - "revenues": 90000000, - "extra": null, - "comments": "", - "__GlobalStamp": 0, - "employees": { - "__deferred": { - "uri": "/rest/Company(34)/employees?$expand=employees" - } - } - }, - { - "__KEY": "47", - "__TIMESTAMP": "2018-03-28T14:38:07.443Z", - "__STAMP": 0, - "ID": 47, - "name": "Audio Production Uniform", - "creationDate": "0!0!0", - "revenues": 28000000, - "extra": null, - "comments": "", - "__GlobalStamp": 0, - "employees": { - "__deferred": { - "uri": "/rest/Company(47)/employees?$expand=employees" - } - } - } - ], - "__SENT": 3 - } \ No newline at end of file diff --git a/website/translated_docs/ja/REST/$atomic_$atonce.md b/website/translated_docs/ja/REST/$atomic_$atonce.md index 5e0e03d4d50421..1dfeec4673ce5b 100644 --- a/website/translated_docs/ja/REST/$atomic_$atonce.md +++ b/website/translated_docs/ja/REST/$atomic_$atonce.md @@ -4,63 +4,64 @@ title: '$atomic/$atonce' --- -Allows the actions in the REST request to be in a transaction. If there are no errors, the transaction is validated. Otherwise, the transaction is cancelled. +RESTリクエストに含まれる操作をトランザクション内で処理します。 エラーがなかった場合、トランザクションは受け入れられます。 それ以外の場合、トランザクションはキャンセルされます。 + ## 説明 +複数の操作を一回のリクエストで処理する際には `$atomic/$atonce` を使うことで、1つでも操作に問題があった場合にすべての操作をキャンセルすることができます。 `$atomic` および `$atonce` のどちらでも利用できます。 -When you have multiple actions together, you can use `$atomic/$atonce` to make sure that none of the actions are completed if one of them fails. You can use either `$atomic` or `$atonce`. ## 例題 +次の RESTリクエストをトランザクション内で呼び出します。 + + `POST /rest/Employee?$method=update&$atomic=true` -We call the following REST request in a transaction. +**POST データ**: -`POST /rest/Employee?$method=update&$atomic=true` +```` +[ +{ + "__KEY": "200", + "firstname": "John" +}, +{ + "__KEY": "201", + "firstname": "Harry" +} +] +```` -**POST data**: +2つ目のエンティティの操作中に次のエラーが発生します。そのため、1つ目のエンティティも保存されません: - [ - { - "__KEY": "200", - "firstname": "John" +```` +{ + "__STATUS": { + "success": true + }, + "__KEY": "200", + "__STAMP": 1, + "uri": "/rest/Employee(200)", + "__TIMESTAMP": "!!2020-04-03!!", + "ID": 200, + "firstname": "John", + "lastname": "Keeling", + "isWoman": false, + "numberOfKids": 2, + "addressID": 200, + "gender": false, + "address": { + "__deferred": { + "uri": "/rest/Address(200)", + "__KEY": "200" + } }, - { - "__KEY": "201", - "firstname": "Harry" - } + "__ERROR": [ + { + "message": "Cannot find entity with \"201\" key in the \"Employee\" dataclass", + "componentSignature": "dbmg", + "errCode": 1542 + } ] - - -We get the following error in the second entity and therefore the first entity is not saved either: - - { - "__STATUS": { - "success": true - }, - "__KEY": "200", - "__STAMP": 1, - "uri": "/rest/Employee(200)", - "__TIMESTAMP": "!!2020-04-03!!", - "ID": 200, - "firstname": "John", - "lastname": "Keeling", - "isWoman": false, - "numberOfKids": 2, - "addressID": 200, - "gender": false, - "address": { - "__deferred": { - "uri": "/rest/Address(200)", - "__KEY": "200" - } - }, - "__ERROR": [ - { - "message": "Cannot find entity with \"201\" key in the \"Employee\" datastore class", - "componentSignature": "dbmg", - "errCode": 1542 - } - ] - } - - -> Even though the salary for the first entity has a value of 45000, this value was not saved to the server and the *timestamp (__STAMP)* was not modified either. If we reload the entity, we will see the previous value. \ No newline at end of file +} +```` +> 1つ目のエンティティの名前は "John" ですが、この値はサーバー上に保存されず、タイムスタンプも変更されません。 したがって、エンティティをリロードすると、もとの値に戻ります。 diff --git a/website/translated_docs/ja/REST/$attributes.md b/website/translated_docs/ja/REST/$attributes.md index e03c5ead742c86..1acd8555495ff9 100644 --- a/website/translated_docs/ja/REST/$attributes.md +++ b/website/translated_docs/ja/REST/$attributes.md @@ -3,96 +3,104 @@ id: attributes title: '$attributes' --- -Allows selecting the related attribute(s) to get from the dataclass (*e.g.*, `Company(1)?$attributes=employees.lastname` or `Employee?$attributes=employer.name`). +データクラスから取得するリレート属性を選択するのに使います (*例:* `Company(1)?$attributes=employees.lastname`、 `Employee?$attributes=employer.name`)。 + ## 説明 -When you have relation attributes in a dataclass, use `$attributes` to define the path of attributes whose values you want to get for the related entity or entities. +データクラスにリレーション属性が含まれていて、リレート先のエンティティまたはエンティティセレクションの属性のうち値を取得するものを選択したい場合、そのパスを指定するのに `$attributes` を使用します。 -You can apply `$attributes` to an entity (*e.g.*, People(1)) or an entity selection (*e.g.*, People/$entityset/0AF4679A5C394746BFEB68D2162A19FF) . +`$attributes` はエンティティ (*例:* People(1)) またはエンティティセレクション (*例:* People/$entityset/0AF4679A5C394746BFEB68D2162A19FF) に対して適用できます。 -- If `$attributes` is not specified in a query, or if the "*" value is passed, all available attributes are extracted. **Related entity** attributes are extracted with the simple form: an object with property `__KEY` (primary key) and `URI`. **Related entities** attributes are not extracted. -- If `$attributes` is specified for **related entity** attributes: - - - `$attributes=relatedEntity`: the related entity is returned with simple form (deferred __KEY property (primary key)) and `URI`. - - `$attributes=relatedEntity.*`: all the attributes of the related entity are returned - - `$attributes=relatedEntity.attributePath1, relatedEntity.attributePath2, ...`: only those attributes of the related entity are returned. -- If `$attributes` is specified for **related entities** attributes: - - - `$attributes=relatedEntities.*`: all the properties of all the related entities are returned - - `$attributes=relatedEntities.attributePath1, relatedEntities.attributePath2, ...`: only those attributes of the related entities are returned. +- クエリに `$attributes` が指定されていない場合、または "*" が渡された場合、すべての取得可能な属性が取得されます。 **リレートエンティティ** 属性は、`__KEY` (プライマリーキー) と `URI` プロパティを持つオブジェクトという簡単な形で抽出されます。 **リレートエンティティズ** 属性は抽出されません。 -## Example with related entities +- **リレートエンティティ** 属性を対象に `$attributes` が指定された場合: + - `$attributes=relatedEntity`: リレートエンティティは簡単な形で返されます (`__KEY` (プライマリーキー) と `URI` プロパティを持つ deferred オブジェクト) + - `$attributes=relatedEntity.*`: リレートエンティティの属性がすべて返されます。 + - `$attributes=relatedEntity.attributePath1, relatedEntity.attributePath2, ...`: リレートエンティティの指定された属性だけが返されます。 -If we pass the following REST request for our Company datastore class (which has a relation attribute "employees"): -`GET /rest/Company(1)/?$attributes=employees.lastname` +- **リレートエンティティズ** 属性を対象に `$attributes` が指定された場合: + - `$attributes=relatedEntities.*`: リレートエンティティズの属性がすべて返されます。 + - `$attributes=relatedEntities.attributePath1, relatedEntities.attributePath2, ...`: リレートエンティティズの指定された属性だけが返されます。 -**Response**: - { - "__entityModel": "Company", - "__KEY": "1", - "__TIMESTAMP": "2018-04-25T14:41:16.237Z", - "__STAMP": 2, - "employees": { - "__ENTITYSET": "/rest/Company(1)/employees?$expand=employees", - "__GlobalStamp": 50, - "__COUNT": 135, - "__FIRST": 0, - "__ENTITIES": [ - { - "__KEY": "1", - "__TIMESTAMP": "2019-12-01T20:18:26.046Z", - "__STAMP": 5, - "lastname": "ESSEAL" - }, - { - "__KEY": "2", - "__TIMESTAMP": "2019-12-04T10:58:42.542Z", - "__STAMP": 6, - "lastname": "JONES" - }, - ... - } + +## リレートエンティティズの例 + +"employees" 1対Nリレーションを持つ Company データクラスに対して次の RESTリクエストをおこなうと: + + `GET /rest/Company(1)/?$attributes=employees.lastname` + +**レスポンス**: + +``` +{ + "__entityModel": "Company", + "__KEY": "1", + "__TIMESTAMP": "2018-04-25T14:41:16.237Z", + "__STAMP": 2, + "employees": { + "__ENTITYSET": "/rest/Company(1)/employees?$expand=employees", + "__GlobalStamp": 50, + "__COUNT": 135, + "__FIRST": 0, + "__ENTITIES": [ + { + "__KEY": "1", + "__TIMESTAMP": "2019-12-01T20:18:26.046Z", + "__STAMP": 5, + "lastname": "ESSEAL" + }, + { + "__KEY": "2", + "__TIMESTAMP": "2019-12-04T10:58:42.542Z", + "__STAMP": 6, + "lastname": "JONES" + }, + ... } - +} +``` + +employees の属性をすべて取得するには: -If you want to get all attributes from employees: + `GET /rest/Company(1)/?$attributes=employees.*` -`GET /rest/Company(1)/?$attributes=employees.*` +また、employees の lastname属性と jobname属性を取得するには: -If you want to get last name and job name attributes from employees: + `GET /rest/Company(1)/?$attributes=employees.lastname,employees.jobname` -`GET /rest/Company(1)/?$attributes=employees.lastname,employees.jobname` -## Example with related entity +## リレートエンティティの例 -If we pass the following REST request for our Employee datastore class (which has several relation attributes, including "employer"): +"employer" N対1リレーションを持つ Employee データクラスに対して次の RESTリクエストをおこなうと: -`GET /rest/Employee(1)?$attributes=employer.name` -**Response**: + `GET /rest/Employee(1)?$attributes=employer.name` - { - "__entityModel": "Employee", +**レスポンス**: + +``` +{ + "__entityModel": "Employee", + "__KEY": "1", + "__TIMESTAMP": "2019-12-01T20:18:26.046Z", + "__STAMP": 5, + "employer": { "__KEY": "1", - "__TIMESTAMP": "2019-12-01T20:18:26.046Z", - "__STAMP": 5, - "employer": { - "__KEY": "1", - "__TIMESTAMP": "2018-04-25T14:41:16.237Z", - "__STAMP": 0, - "name": "Adobe" - } + "__TIMESTAMP": "2018-04-25T14:41:16.237Z", + "__STAMP": 0, + "name": "Adobe" } - +} +``` -If you want to get all attributes of the employer: +employer の属性をすべて取得するには: -`GET /rest/Employee(1)?$attributes=employer.*` + `GET /rest/Employee(1)?$attributes=employer.*` -If you want to get the last names of all employees of the employer: +また、employer の全employees の lastname属性を取得するには: -`GET /rest/Employee(1)?$attributes=employer.employees.lastname` \ No newline at end of file + `GET /rest/Employee(1)?$attributes=employer.employees.lastname` \ No newline at end of file diff --git a/website/translated_docs/ja/REST/$binary.md b/website/translated_docs/ja/REST/$binary.md index 2a83040a9bcf2a..c7a972b537647a 100644 --- a/website/translated_docs/ja/REST/$binary.md +++ b/website/translated_docs/ja/REST/$binary.md @@ -3,17 +3,19 @@ id: バイナリ title: '$binary' --- -Pass "true" to save the BLOB as a document (must also pass `$expand={blobAttributeName}`) +ドキュメントを BLOB として保存するには "true" を渡します (`$expand={blobAttributeName}` も渡す必要があります) ## 説明 -`$binary` allows you to save the BLOB as a document. You must also use the [`$expand`]($expand.md) command in conjunction with it. +`$binary` を使うと、ドキュメントを BLOB として保存できます。 [`$expand`]($expand.md) コマンドとの組み合わせで使う必要があります。 -When you make the following request: +以下のリクエストを実行した場合: - GET /rest/Company(11)/blobAtt?$binary=true&$expand=blobAtt - +``` +GET /rest/Company(11)/blobAtt?$binary=true&$expand=blobAtt +``` -You will be asked where to save the BLOB to disk: +ディスク上の BLOB の保存先を聞かれます: + +![](assets/en/REST/binary.png) -![](assets/en/REST/binary.png) \ No newline at end of file diff --git a/website/translated_docs/ja/REST/$catalog.md b/website/translated_docs/ja/REST/$catalog.md index 823720d2c4f7e6..a711db734644f2 100644 --- a/website/translated_docs/ja/REST/$catalog.md +++ b/website/translated_docs/ja/REST/$catalog.md @@ -4,326 +4,368 @@ title: '$catalog' --- -The catalog describes all the dataclasses and attributes available in the datastore. +カタログには、データストアを構成するすべてのデータクラスおよび属性の詳細な情報が含まれます。 -## Available syntaxes -| シンタックス | 例題 | 説明 | -| --------------------------------------------- | -------------------- | -------------------------------------------------------------------------------- | -| [**$catalog**](#catalog) | `/$catalog` | Returns a list of the dataclasses in your project along with two URIs | -| [**$catalog/$all**](#catalogall) | `/$catalog/$all` | Returns information about all of your project's dataclasses and their attributes | -| [**$catalog/{dataClass}**](#catalogdataclass) | `/$catalog/Employee` | Returns information about a dataclass and its attributes | +## 使用可能なシンタックス + +| シンタックス | 例題 | 説明 | +| --------------------------------------------- | -------------------- | ------------------------------------- | +| [**$catalog**](#catalog) | `/$catalog` | プロジェクト内のデータクラスのリストを、2つの URI とともに返します。 | +| [**$catalog/$all**](#catalogall) | `/$catalog/$all` | プロジェクト内のすべてのデータクラスとそれらの属性の情報を返します。 | +| [**$catalog/{dataClass}**](#catalogdataclass) | `/$catalog/Employee` | 特定のデータクラスとその属性の情報を返します。 | ## $catalog +プロジェクト内のデータクラスのリストを、2つの URI とともに返します。1つはデータクラスのストラクチャー情報にアクセスするためのもので、もう1つはデータクラスのデータを取得するためのものです。 -Returns a list of the dataclasses in your project along with two URIs: one to access the information about its structure and one to retrieve the data in the dataclass ### 説明 -When you call `$catalog`, a list of the dataclasses is returned along with two URIs for each dataclass in your project's datastore. +`$catalog` を呼び出すと、プロジェクトのデータストア内のデータクラスのリストを、データクラス毎に 2つの URI とともに返します。 + +プロジェクトのデータストア内の、公開されているデータクラスのみがリストされます。 詳細については、テーブルやフィールドの公開** を参照してください。

+ +データクラス毎に返されるプロパティの説明です: + +| プロパティ | タイプ | 説明 | +| ------- | ------ | --------------------------------- | +| name | String | データクラスの名称。 | +| uri | String | データクラスとその属性に関する情報を取得するための URI です。 | +| dataURI | String | データクラスのデータを取得するための URI です。 | -Only the exposed dataclasses are shown in this list for your project's datastore. For more information, please refer to [**Exposing tables and fields**](configuration.md#exposing-tables-and-fields) section. -Here is a description of the properties returned for each dataclass in your project's datastore: -| プロパティ | 型 | 説明 | -| ------- | --- | --------------------------------------------------------------------------------- | -| name | 文字列 | Name of the dataclass. | -| uri | 文字列 | A URI allowing you to obtain information about the |dataclass and its attributes. | -| dataURI | 文字列 | A URI that allows you to view the data in the dataclass. | ### 例題 `GET /rest/$catalog` -**Result**: - - { - dataClasses: [ - { - name: "Company", - uri: "http://127.0.0.1:8081/rest/$catalog/Company", - dataURI: "http://127.0.0.1:8081/rest/Company" - }, - { - name: "Employee", - uri: "http://127.0.0.1:8081/rest/$catalog/Employee", - dataURI: "http://127.0.0.1:8081/rest/Employee" - } - ] - } - +**結果**: + + + +```` +{ + dataClasses: [ + { + name: "Company", + uri: "http://127.0.0.1:8081/rest/$catalog/Company", + dataURI: "http://127.0.0.1:8081/rest/Company" + }, + { + name: "Employee", + uri: "http://127.0.0.1:8081/rest/$catalog/Employee", + dataURI: "http://127.0.0.1:8081/rest/Employee" + } + ] +} +```` + + + + ## $catalog/$all -Returns information about all of your project's dataclasses and their attributes +プロジェクト内のすべてのデータクラスとそれらの属性の情報を返します。 + + ### 説明 -Calling `$catalog/$all` allows you to receive detailed information about the attributes in each of the datastore classes in your project's active model. +`$catalog/$all` を呼び出すと、プロジェクトのデータストア内の各データクラスについて属性の情報を取得します。 + +各データクラスと属性について取得される情報についての詳細は [`$catalog/{dataClass}`](#catalogdataClass) を参照ください。 + + -For more information about what is returned for each datastore class and its attributes, use [`$catalog/{dataClass}`](#catalogdataClass). ### 例題 -`GET /rest/$catalog/$all` - -**Result**: - - { - - "dataClasses": [ - { - "name": "Company", - "className": "Company", - "collectionName": "CompanySelection", - "tableNumber": 2, - "scope": "public", - "dataURI": "/rest/Company", - "attributes": [ - { - "name": "ID", - "kind": "storage", - "fieldPos": 1, - "scope": "public", - "indexed": true, - "type": "long", - "identifying": true - }, - { - "name": "name", - "kind": "storage", - "fieldPos": 2, - "scope": "public", - "type": "string" - }, - { - "name": "revenues", - "kind": "storage", - "fieldPos": 3, - "scope": "public", - "type": "number" - }, - { - "name": "staff", - "kind": "relatedEntities", - "fieldPos": 4, - "scope": "public", - "type": "EmployeeSelection", - "reversePath": true, - "path": "employer" - }, - { - "name": "url", - "kind": "storage", - "scope": "public", - "type": "string" - } - ], - "key": [ - { - "name": "ID" - } - ] - }, - { - "name": "Employee", - "className": "Employee", - "collectionName": "EmployeeSelection", - "tableNumber": 1, - "scope": "public", - "dataURI": "/rest/Employee", - "attributes": [ - { - "name": "ID", - "kind": "storage", - "scope": "public", - "indexed": true, - "type": "long", - "identifying": true - }, - { - "name": "firstname", - "kind": "storage", - "scope": "public", - "type": "string" - }, - { - "name": "lastname", - "kind": "storage", - "scope": "public", - "type": "string" - }, - { - "name": "employer", - "kind": "relatedEntity", - "scope": "public", - "type": "Company", - "path": "Company" - } - ], - "key": [ - { - "name": "ID" - } - ] - } - ] - } - +`GET /rest/$catalog/$all` + +**結果**: + + + +```` +{ + + "dataClasses": [ + { + "name": "Company", + "className": "Company", + "collectionName": "CompanySelection", + "tableNumber": 2, + "scope": "public", + "dataURI": "/rest/Company", + "attributes": [ + { + "name": "ID", + "kind": "storage", + "fieldPos": 1, + "scope": "public", + "indexed": true, + "type": "long", + "identifying": true + }, + { + "name": "name", + "kind": "storage", + "fieldPos": 2, + "scope": "public", + "type": "string" + }, + { + "name": "revenues", + "kind": "storage", + "fieldPos": 3, + "scope": "public", + "type": "number" + }, + { + "name": "staff", + "kind": "relatedEntities", + "fieldPos": 4, + "scope": "public", + "type": "EmployeeSelection", + "reversePath": true, + "path": "employer" + }, + { + "name": "url", + "kind": "storage", + "scope": "public", + "type": "string" + } + ], + "key": [ + { + "name": "ID" + } + ] + }, + { + "name": "Employee", + "className": "Employee", + "collectionName": "EmployeeSelection", + "tableNumber": 1, + "scope": "public", + "dataURI": "/rest/Employee", + "attributes": [ + { + "name": "ID", + "kind": "storage", + "scope": "public", + "indexed": true, + "type": "long", + "identifying": true + }, + { + "name": "firstname", + "kind": "storage", + "scope": "public", + "type": "string" + }, + { + "name": "lastname", + "kind": "storage", + "scope": "public", + "type": "string" + }, + { + "name": "employer", + "kind": "relatedEntity", + "scope": "public", + "type": "Company", + "path": "Company" + } + ], + "key": [ + { + "name": "ID" + } + ] + } + ] +} +```` + + + + ## $catalog/{dataClass} -Returns information about a dataclass and its attributes +特定のデータクラスとその属性の情報を返します。 + + ### 説明 -Calling `$catalog/{dataClass}` for a specific dataclass will return the following information about the dataclass and the attributes it contains. If you want to retrieve this information for all the datastore classes in your project's datastore, use [`$catalog/$all`](#catalogall). +`$catalog/{dataClass}` を呼び出すと、指定したデータクラスとその属性について詳細な情報が返されます。 プロジェクトのデータストア内のすべてのデータクラスに関して同様の情報を得るには [`$catalog/$all`](#catalogall) を使います。 + +返される情報は次の通りです: + +* データクラス +* 属性 +* メソッド (あれば) +* プライマリーキー + + + +### データクラス + +公開されているデータクラスについて、次のプロパティが返されます: + +| プロパティ | タイプ | 説明 | +| -------------- | ------ | --------------------------------------------------- | +| name | String | データクラスの名称 | +| collectionName | String | データクラスにおいて作成されるエンティティセレクションの名称 | +| tableNumber | 数値 | 4Dデータベース内のテーブル番号 | +| scope | String | データクラスのスコープ (**公開 (public)** に設定されているデータクラスのみ返されます) | +| dataURI | String | データクラスのデータを取得するための URI | + + + -The information you retrieve concerns the following: -* Dataclass -* Attribute(s) -* Method(s) if any -* Primary key +### 属性 -### DataClass +公開されている各属性について、次のプロパティが返されます: -The following properties are returned for an exposed dataclass: +| プロパティ | タイプ | 説明 | +| ----------- | ------ | ----------------------------------------------------------------------------------------------------------------------------- | +| name | String | 属性の名称 | +| kind | String | 属性タイプ (ストレージ (storage) またはリレートエンティティ (relatedEntity)) | +| fieldPos | 数値 | データベーステーブルのフィールド番号 | +| scope | String | 属性のスコープ (公開 (public) に設定されている属性のみ返されます) | +| indexed | String | 属性に **インデックス** が設定されていれば、このプロパティは true を返します。 それ以外の場合には、このプロパティは表示されません。 | +| type | String | 属性タイプ (bool, blob, byte, date, duration, image, long, long64, number, string, uuid, word)、または、N->1 リレーション属性の場合はリレーション先のデータクラス | +| identifying | ブール | 属性がプライマリーキーの場合、プロパティは true を返します。 それ以外の場合には、このプロパティは表示されません。 | +| path | String | relatedEntity または relatedEntities 属性のリレーションパス | + foreignKey|String |relatedEntity 属性の場合、リレート先の属性名| inverseName |String |relatedEntity または relatedEntities 属性の逆方向リレーション名| -| プロパティ | 型 | 説明 | -| -------------- | --- | -------------------------------------------------------------------------------------------------- | -| name | 文字列 | Name of the dataclass | -| collectionName | 文字列 | Name of an entity selection on the dataclass | -| tableNumber | 数値 | Table number in the 4D database | -| scope | 文字列 | Scope for the dataclass (note that only datastore classes whose **Scope** is public are displayed) | -| dataURI | 文字列 | A URI to the data in the dataclass | -### Attribute(s) +### メソッド -Here are the properties for each exposed attribute that are returned: +データクラスに紐づけられたプロジェクトメソッドを定義します (あれば)。 -| プロパティ | 型 | 説明 | -| ----------- | --- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | -| name | 文字列 | Attribute name. | -| kind | 文字列 | Attribute type (storage or relatedEntity). | -| fieldPos | 数値 | Position of the field in the database table). | -| scope | 文字列 | Scope of the attribute (only those attributes whose scope is Public will appear). | -| indexed | 文字列 | If any **Index Kind** was selected, this property will return true. Otherwise, this property does not appear. | -| type | 文字列 | Attribute type (bool, blob, byte, date, duration, image, long, long64, number, string, uuid, or word) or the datastore class for a N->1 relation attribute. | -| identifying | ブール | This property returns True if the attribute is the primary key. Otherwise, this property does not appear. | -| path | 文字列 | Name of the relation for a relatedEntity or relateEntities attribute. | - foreignKey|String |For a relatedEntity attribute, name of the related attribute.| inverseName |String |Name of the opposite relation for a relatedEntity or relateEntities attribute.| -### Method(s) -Defines the project methods asociated to the dataclass, if any. +### プライマリーキー + +key オブジェクトには、データクラスの **プライマリーキー** として定義された属性の **名称 (name プロパティ)** が返されます。 + -### Primary Key -The key object returns the **name** of the attribute defined as the **Primary Key** for the datastore class. ### 例題 -You can retrieve the information regarding a specific datastore class. +特定のデータクラスに関する情報を取得します。 `GET /rest/$catalog/Employee` -**Result**: - - { - name: "Employee", - className: "Employee", - collectionName: "EmployeeCollection", - scope: "public", - dataURI: "http://127.0.0.1:8081/rest/Employee", - defaultTopSize: 20, - extraProperties: { - panelColor: "#76923C", - __CDATA: "\n\n\t\t\n", - panel: { - isOpen: "true", - pathVisible: "true", - __CDATA: "\n\n\t\t\t\n", - position: { - X: "394", - Y: "42" - } +**結果**: + + + +```` +{ + name: "Employee", + className: "Employee", + collectionName: "EmployeeCollection", + scope: "public", + dataURI: "http://127.0.0.1:8081/rest/Employee", + defaultTopSize: 20, + extraProperties: { + panelColor: "#76923C", + __CDATA: "\n\n\t\t\n", + panel: { + isOpen: "true", + pathVisible: "true", + __CDATA: "\n\n\t\t\t\n", + position: { + X: "394", + Y: "42" } + } + }, + attributes: [ + { + name: "ID", + kind: "storage", + scope: "public", + indexed: true, + type: "long", + identifying: true }, - attributes: [ - { - name: "ID", - kind: "storage", - scope: "public", - indexed: true, - type: "long", - identifying: true - }, - { - name: "firstName", - kind: "storage", - scope: "public", - type: "string" - }, - { - name: "lastName", - kind: "storage", - scope: "public", - type: "string" - }, - { - name: "fullName", - kind: "calculated", - scope: "public", - type: "string", - readOnly: true - }, - { - name: "salary", - kind: "storage", - scope: "public", - type: "number", - defaultFormat: { - format: "$###,###.00" - } - }, - { - name: "photo", - kind: "storage", - scope: "public", - type: "image" - }, - { - name: "employer", - kind: "relatedEntity", - scope: "public", - type: "Company", - path: "Company" - }, - { - name: "employerName", - kind: "alias", - scope: "public", - - type: "string", - path: "employer.name", - readOnly: true - }, - { - name: "description", - kind: "storage", - scope: "public", - type: "string", - multiLine: true - }, - ], - key: [ - { - name: "ID" + { + name: "firstName", + kind: "storage", + scope: "public", + type: "string" + }, + { + name: "lastName", + kind: "storage", + scope: "public", + type: "string" + }, + { + name: "fullName", + kind: "calculated", + scope: "public", + type: "string", + readOnly: true + }, + { + name: "salary", + kind: "storage", + scope: "public", + type: "number", + defaultFormat: { + format: "$###,###.00" } - ] - } \ No newline at end of file + }, + { + name: "photo", + kind: "storage", + scope: "public", + type: "image" + }, + { + name: "employer", + kind: "relatedEntity", + scope: "public", + type: "Company", + path: "Company" + }, + { + name: "employerName", + kind: "alias", + scope: "public", + + type: "string", + path: "employer.name", + readOnly: true + }, + { + name: "description", + kind: "storage", + scope: "public", + type: "string", + multiLine: true + }, + ], + key: [ + { + name: "ID" + } + ] +} +```` + diff --git a/website/translated_docs/ja/REST/$compute.md b/website/translated_docs/ja/REST/$compute.md index a1a29a0b54d7e1..0c33f3f80d1e25 100644 --- a/website/translated_docs/ja/REST/$compute.md +++ b/website/translated_docs/ja/REST/$compute.md @@ -3,78 +3,83 @@ id: compute title: '$compute' --- -Calculate on specific attributes (*e.g.*, `Employee/salary/?$compute=sum)` or in the case of an Object attribute (*e.g.*, Employee/objectAtt.property1/?$compute=sum) +指定した属性を対象に計算をおこないます (*例*: `Employee/salary/?$compute=sum`。オブジェクト属性の例: `Employee/objectAtt.property1/?$compute=sum`)。 + ## 説明 -This parameter allows you to do calculations on your data. +このパラメーターを使って、データを対象に計算をおこなうことができます。 + +属性に対して計算をおこなうには、次のように書きます: -If you want to perform a calculation on an attribute, you write the following: + `GET /rest/Employee/salary/?$compute=$all` -`GET /rest/Employee/salary/?$compute=$all` +オブジェクト属性の場合は、プロパティを指定します。 たとえば: -If you want to pass an Object attribute, you must pass one of its property. たとえば: + `GET /rest/Employee/objectAtt.property1/?$compute=$all` -`GET /rest/Employee/objectAtt.property1/?$compute=$all` +次のキーワードが利用可能です: -You can use any of the following keywords: -| Keyword | 説明 | -| ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| $all | A JSON object that defines all the functions for the attribute (average, count, min, max, and sum for attributes of type Number and count, min, and max for attributes of type String | -| average | Get the average on a numerical attribute | -| count | Get the total number in the collection or datastore class (in both cases you must specify an attribute) | -| min | Get the minimum value on a numerical attribute or the lowest value in an attribute of type String | -| max | Get the maximum value on a numerical attribute or the highest value in an attribute of type String | -| sum | Get the sum on a numerical attribute | +| キーワード | 説明 | +| ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| $all | 利用可能なすべての計算を属性に対しておこない、結果を格納した JSON オブジェクトを取得します。数値型の属性については平均 (average)、カウント (count)、最小 (min)、最大 (max)、合計 (sum)、文字列型の属性についてはカウント (count)、最小 (min)、最大 (max) が利用可能です。 | +| average | 数値型属性の平均を取得します。 | +| count | コレクション内の要素数またはデータクラス内のエンティティ数を取得します (どちらの場合も属性を指定する必要があります) | +| min | 数値型属性あるいは文字列型属性の最小値を取得します。 | +| max | 数値型属性あるいは文字列型属性の最大値を取得します。 | +| sum | 数値型属性の合計を取得します。 | ## 例題 -If you want to get all the computations for an attribute of type Number, you can write: +数値型の属性を対象にすべての計算値を取得するには、次のように書きます: -`GET /rest/Employee/salary/?$compute=$all` + `GET /rest/Employee/salary/?$compute=$all` -**Response**: +**レスポンス**: - { - "salary": { - "count": 4, - "sum": 335000, - "average": 83750, - "min": 70000, - "max": 99000 - } +```` +{ + "salary": { + "count": 4, + "sum": 335000, + "average": 83750, + "min": 70000, + "max": 99000 } - +} +```` -If you want to get all the computations for an attribute of type String, you can write: +文字列型の属性を対象にすべての計算値を取得するには、次のように書きます: -`GET /rest/Employee/firstName/?$compute=$all` + `GET /rest/Employee/firstName/?$compute=$all` -**Response**: +**レスポンス**: - { - "salary": { - "count": 4, - "min": Anne, - "max": Victor - } +```` +{ + "salary": { + "count": 4, + "min": Anne, + "max": Victor } - +} +```` -If you want to just get one calculation on an attribute, you can write the following: +属性に対して特定の計算のみをおこなうには、次のように書きます: -`GET /rest/Employee/salary/?$compute=sum` + `GET /rest/Employee/salary/?$compute=sum` -**Response**: +**レスポンス**: `235000` -If you want to perform a calculation on an Object attribute, you can write the following: -`GET /rest/Employee/objectAttribute.property1/?$compute=sum` +オブジェクト属性に対して特定の計算のみをおこなうには、次のように書きます: + + `GET /rest/Employee/objectAttribute.property1/?$compute=sum` -Response: +レスポンス: -`45` \ No newline at end of file +`45` \ No newline at end of file diff --git a/website/translated_docs/ja/REST/$directory.md b/website/translated_docs/ja/REST/$directory.md index abb3f9a431e972..6327feb34edbdd 100644 --- a/website/translated_docs/ja/REST/$directory.md +++ b/website/translated_docs/ja/REST/$directory.md @@ -3,24 +3,24 @@ id: directory title: '$directory' --- -The directory handles user access through REST requests. +ディレクトリは RESTリクエストを介したユーザーアクセスに対応します。 + ## $directory/login -Opens a REST session on your 4D application and logs in the user. +4Dアプリケーション上で RESTセッションを開き、ユーザーをログインします。 ### 説明 +RESTを介して 4Dアプリケーション上でセッションを開き、ユーザーをログインするには、`$directory/login` を使います。 デフォルトの 4Dセッションタイムアウトを変更することもできます。 -Use `$directory/login` to open a session in your 4D application through REST and login a user. You can also modify the default 4D session timeout. - -All parameters must be passed in **headers** of a POST method: +パラメーターはすべて、POST の **ヘッダー** に渡す必要があります: -| Header key | Header value | -| ------------------ | ---------------------------------------------------------------------------- | -| username-4D | User - Not mandatory | -| password-4D | Password - Not mandatory | -| hashed-password-4D | Hashed password - Not mandatory | -| session-4D-length | Session inactivity timeout (minutes). Cannot be less than 60 - Not mandatory | +| ヘッダーキー | ヘッダー値 | +| ------------------ | ------------------------------------- | +| username-4D | ユーザー (任意) | +| password-4D | パスワード (任意) | +| hashed-password-4D | ハッシュ化パスワード (任意) | +| session-4D-length | セッション非アクティブタイムアウト (分単位)。 60 以上の値 (任意) | ### 例題 @@ -35,20 +35,23 @@ $hKey{3}:="session-4D-length" $hValues{1}:="john" $hValues{2}:=Generate digest("123";4D digest) $hValues{3}:=120 -$httpStatus:=HTTP Request(HTTP POST method;"database.example.com:9000";$body_t;$response;$hKey;$hValues) +$httpStatus:=HTTP Request(HTTP POST method;"app.example.com:9000/rest/$directory/login";$body_t;$response;$hKey;$hValues) ``` -**Result**: +**結果**: -If the login was successful, the result will be: +ログインに成功した場合の結果: - { - "result": true - } - +``` +{ + "result": true +} +``` -Otherwise, the response will be: +それ以外の場合の結果: - { - "result": false - } \ No newline at end of file +``` +{ + "result": false +} +``` diff --git a/website/translated_docs/ja/REST/$distinct.md b/website/translated_docs/ja/REST/$distinct.md index d2380bac94dd1a..26bf4029ded842 100644 --- a/website/translated_docs/ja/REST/$distinct.md +++ b/website/translated_docs/ja/REST/$distinct.md @@ -4,23 +4,26 @@ title: '$distinct' --- -Returns the distinct values for a specific attribute in a collection (*e.g.*, `Company/name?$filter="name=a*"&$distinct=true`) +指定した属性について、重複しない値のコレクションを取得します (*例*: `Company/name?$filter="name=a*"&$distinct=true`) + ## 説明 -`$distinct` allows you to return a collection containing the distinct values for a query on a specific attribute. Only one attribute in the dataclass can be specified. Generally, the String type is best; however, you can also use it on any attribute type that could contain multiple values. +`$distinct` を使って、指定した属性における重複しない値を格納したコレクションを取得することができます。 その際、データクラスの属性を一つのみを指定することができます。 通常は文字列型の属性を対象に使用しますが、複数の値を持つ属性であれば、その型に制限はありません。 -You can also use `$skip` and `$top/$limit` as well, if you'd like to navigate the selection before it's placed in an array. +対象となる要素を制限するのに `$skip` および `$top/$limit` も組み合わせて使用することができます。 ## 例題 +"a" で始まる会社名について、重複しない値のコレクションを取得するには、次のように書きます: -In our example below, we want to retrieve the distinct values for a company name starting with the letter "a": + `GET /rest/Company/name?$filter="name=a*"&$distinct=true` -`GET /rest/Company/name?$filter="name=a*"&$distinct=true` +**レスポンス**: -**Response**: +```` +[ + "Adobe", + "Apple" +] +```` - [ - "Adobe", - "Apple" - ] \ No newline at end of file diff --git a/website/translated_docs/ja/REST/$entityset.md b/website/translated_docs/ja/REST/$entityset.md index bce9644b8b1749..c6bb8ce3285910 100644 --- a/website/translated_docs/ja/REST/$entityset.md +++ b/website/translated_docs/ja/REST/$entityset.md @@ -3,63 +3,67 @@ id: entityset title: '$entityset' --- -After [creating an entity set]($method.md#methodentityset) by using `$method=entityset`, you can then use it subsequently. +`$method=entityset` を使って [エンティティセットを作成]($method.md#methodentityset) すると、それを後で再利用することができます。 + + +## 使用可能なシンタックス + +| シンタックス | 例題 | 説明 | +| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | --------------------------------- | +| [**$entityset/{entitySetID}**](#entitysetentitySetID) | `/People/$entityset/0ANUMBER` | 既存のエンティティセットを取得します | +| [**$entityset/{entitySetID}?$operator...&$otherCollection**](#entitysetentitysetidoperatorothercollection) | `/Employee/$entityset/0ANUMBER?$logicOperator=AND &$otherCollection=C0ANUMBER` | 既存エンティティセットの比較から新規エンティティセットを作成します | -## Available syntaxes -| シンタックス | 例題 | 説明 | -| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ------------------------------------------------------------ | -| [**$entityset/{entitySetID}**](#entitysetentitySetID) | `/People/$entityset/0ANUMBER` | Retrieves an existing entity set | -| [**$entityset/{entitySetID}?$operator...&$otherCollection**](#entitysetentitysetidoperatorothercollection) | `/Employee/$entityset/0ANUMBER?$logicOperator=AND &$otherCollection=C0ANUMBER` | Creates a new entity set from comparing existing entity sets | ## $entityset/{entitySetID} -Retrieves an existing entity set (*e.g.*, `People/$entityset/0AF4679A5C394746BFEB68D2162A19FF`) +既存のエンティティセットを取得します(*例*: `People/$entityset/0AF4679A5C394746BFEB68D2162A19FF`) + ### 説明 -This syntax allows you to execute any operation on a defined entity set. +このシンタックスを使って、定義されたエンティティセットに対してあらゆる操作を実行できます。 -Because entity sets have a time limit on them (either by default or after calling `$timeout` with your own limit), you can call `$savedfilter` and `$savedorderby` to save the filter and order by statements when you create an entity set. +エンティティセットには (デフォルトの、または `$timeout` で指定した) タイムリミットが設定されるため、`$savedfilter` や `$savedorderby` を使って、エンティティセットを作成する際に使用したフィルターや並べ替えの詳細を保存しておくこともできます。 -When you retrieve an existing entity set stored in 4D Server's cache, you can also apply any of the following to the entity set: [`$expand`]($expand.md), [`$filter`]($filter), [`$orderby`]($orderby), [`$skip`]($skip.md), and [`$top/$limit`]($top_$limit.md). +4D Server のキャッシュに保存された既存のエンティティセットを取得する際に、次のいずれもエンティティセットに適用することができます: [`$expand`]($expand.md), [`$filter`]($filter), [`$orderby`]($orderby), [`$skip`]($skip.md), [`$top/$limit`]($top_$limit.md)。 ### 例題 -After you create an entity set, the entity set ID is returned along with the data. You call this ID in the following manner: +エンティティセットを作成すると、データとともにエンティティセットIDが返されます。 このIDは次のように使います: -`GET /rest/Employee/$entityset/9718A30BF61343C796345F3BE5B01CE7` + `GET /rest/Employee/$entityset/9718A30BF61343C796345F3BE5B01CE7` -## $entityset/{entitySetID}?$operator...&$otherCollection -Create another entity set based on previously created entity sets +## $entityset/{entitySetID}?$operator...&$otherCollection -| Parameter | 型 | 説明 | -| ---------------- | --- | -------------------------------------------------------------- | -| $operator | 文字列 | One of the logical operators to test with the other entity set | -| $otherCollection | 文字列 | Entity set ID | +複数の既存エンティティセットに基づいて新たなエンティティセットを作成します。 +| 引数 | タイプ | 説明 | +| ---------------- | ------ | ------------------------- | +| $operator | String | 既存のエンティティセットに対して使用する論理演算子 | +| $otherCollection | String | エンティティセットID | -### 説明 -After creating an entity set (entity set #1) by using `$method=entityset`, you can then create another entity set by using the `$entityset/{entitySetID}?$operator... &$otherCollection` syntax, the `$operator` property (whose values are shown below), and another entity set (entity set #2) defined by the `$otherCollection` property. The two entity sets must be in the same datastore class. -You can then create another entity set containing the results from this call by using the `$method=entityset` at the end of the REST request. +### 説明 -Here are the logical operators: +`$method=entityset` を使ってエンティティセット (エンティティセット#1) を作成したあとで、`$entityset/{entitySetID}?$operator... &$otherCollection` シンタックスを使って新たなエンティティセットを作成できます。このとき、`$operator` に指定できる値は後述のとおりで、2つ目のエンティティセット (エンティティセット#2) は `$otherCollection` プロパティに指定します。 2つのエンティティセットは同じデータクラスに属していなければなりません。 -| 演算子 | 説明 | -| --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | -| AND | Returns the entities in common to both entity sets | -| OR | Returns the entities in both entity sets | -| EXCEPT | Returns the entities in entity set #1 minus those in entity set #2 | -| INTERSECT | Returns either true or false if there is an intersection of the entities in both entity sets (meaning that least one entity is common in both entity sets) | +このリクエストの結果を格納するエンティティセットを作成する場合は、RESTリクエストの最後に `$method=entityset` を追加します。 +下記は、論理演算子の一覧です: -> The logical operators are not case-sensitive, so you can write "AND" or "and". +| 演算子 | 説明 | +| --------- | ------------------------------------------------------ | +| AND | 両方のエンティティセットに共通して含まれるエンティティのみを返します。 | +| OR | 両エンティティセットのいずれか、あるいは両方に含まれているエンティティを返します。 | +| EXCEPT | エンティティセット#1 から、エンティティセット#2にも含まれているエンティティを除外した残りを返します。 | +| INTERSECT | 両方のエンティティセットに共通して含まれるエンティティがあれば true、なければ false を返します。 | +> 論理演算子の文字の大小は区別されないため、"AND" とも "and" とも書けます。 -Below is a representation of the logical operators based on two entity sets. The red section is what is returned. +2つのエンティティセットを対象に論理演算子を使用した場合のベン図は下のとおりです。 赤く塗られた部分が返されるものです。 **AND** @@ -73,22 +77,22 @@ Below is a representation of the logical operators based on two entity sets. The ![](assets/en/REST/except.png) -The syntax is as follows: -`GET /rest/dataClass/$entityset/entitySetID?$logicOperator=AND&$otherCollection=entitySetID` +シンタックスは次のとおりです: -### 例題 + `GET /rest/dataClass/$entityset/entitySetID?$logicOperator=AND&$otherCollection=entitySetID` -In the example below, we return the entities that are in both entity sets since we are using the AND logical operator: +### 例題 +次の例では AND論理演算子を使用するため、両方のエンティティセットに共通して含まれるエンティティが返されます: -`GET /rest/Employee/$entityset/9718A30BF61343C796345F3BE5B01CE7?$logicOperator=AND&$otherCollection=C05A0D887C664D4DA1B38366DD21629B` + `GET /rest/Employee/$entityset/9718A30BF61343C796345F3BE5B01CE7?$logicOperator=AND&$otherCollection=C05A0D887C664D4DA1B38366DD21629B` -If we want to know if the two entity sets intersect, we can write the following: +2つのエンティティセットが交差するかどうかを確認するには、次のように書きます: -`GET /rest/Employee/$entityset/9718A30BF61343C796345F3BE5B01CE7?$logicOperator=intersect&$otherCollection=C05A0D887C664D4DA1B38366DD21629B` + `GET /rest/Employee/$entityset/9718A30BF61343C796345F3BE5B01CE7?$logicOperator=intersect&$otherCollection=C05A0D887C664D4DA1B38366DD21629B` -If there is an intersection, this query returns true. Otherwise, it returns false. +共通のエンティティが存在する場合、このクエリは true を返します。 それ以外の場合は false を返します。 -In the following example we create a new entity set that combines all the entities in both entity sets: +次の例では、2つのエンティティセットのいずれかあるいは両方に含まれているエンティティすべてを格納した新しいエンティティセットを作成します: -`GET /rest/Employee/$entityset/9718A30BF61343C796345F3BE5B01CE7?$logicOperator=OR&$otherCollection=C05A0D887C664D4DA1B38366DD21629B&$method=entityset` \ No newline at end of file +`GET /rest/Employee/$entityset/9718A30BF61343C796345F3BE5B01CE7?$logicOperator=OR&$otherCollection=C05A0D887C664D4DA1B38366DD21629B&$method=entityset` diff --git a/website/translated_docs/ja/REST/$expand.md b/website/translated_docs/ja/REST/$expand.md index c677faa841c242..a213acd915fd4b 100644 --- a/website/translated_docs/ja/REST/$expand.md +++ b/website/translated_docs/ja/REST/$expand.md @@ -4,22 +4,22 @@ title: '$expand' --- -Expands an image stored in an Image attribute (*e.g.*, `Employee(1)/photo?$imageformat=best&$expand=photo`) -or -Expands an BLOB attribute to save it. +画像属性に保存されているピクチャーを展開します (*例*: `Employee(1)/photo?$imageformat=best&$expand=photo`)
または
保存するために BLOB属性を展開します。 -> **Compatibility**: For compatibility reasons, $expand can be used to expand a relational attribute (*e.g.*, `Company(1)?$expand=staff` or `Employee/?$filter="firstName BEGIN a"&$expand=employer`). It is however recommended to use [`$attributes`]($attributes.md) for this feature. +> **互換性に関する注記**: 互換性のため、$expand はリレーション属性を展開するのに使用できます (*例*: `Company(1)?$expand=staff` または `Employee/?$filter="firstName BEGIN a"&$expand=employer`)。 しかしながら、これらの場合には [`$attributes`]($attributes.md) を使用するのが推奨されます。 -## Viewing an image attribute -If you want to view an image attribute in its entirety, write the following: -`GET /rest/Employee(1)/photo?$imageformat=best&$version=1&$expand=photo` +## 画像属性の表示 -For more information about the image formats, refer to [`$imageformat`]($imageformat.md). For more information about the version parameter, refer to [`$version`]($version.md). +画像属性の全体像を表示させるには、次のように書きます: -## Saving a BLOB attribute to disk + `GET /rest/Employee(1)/photo?$imageformat=best&$version=1&$expand=photo` -If you want to save a BLOB stored in your datastore class, you can write the following by also passing "true" to $binary: +画像形式についての詳細は [`$imageformat`]($imageformat.md) を参照ください。 version パラメーターについての詳細は [`$version`]($version.md) を参照ください。 -`GET /rest/Company(11)/blobAtt?$binary=true&$expand=blobAtt` \ No newline at end of file +## BLOB属性のディスク保存 + +データクラスに保存されている BLOB をディスクに保存するには、$binary に "true" を渡すことで、次のように書けます: + + `GET /rest/Company(11)/blobAtt?$binary=true&$expand=blobAtt` \ No newline at end of file diff --git a/website/translated_docs/ja/REST/$filter.md b/website/translated_docs/ja/REST/$filter.md index 669ca027ea427a..4d379808c6830f 100644 --- a/website/translated_docs/ja/REST/$filter.md +++ b/website/translated_docs/ja/REST/$filter.md @@ -5,93 +5,97 @@ title: '$filter' -Allows to query the data in a dataclass or method *(e.g.*, `$filter="firstName!='' AND salary>30000"`) +データクラスまたはメソッドが返すデータをフィルターします *(例*: `$filter="firstName!='' AND salary>30000"`) + ## 説明 -This parameter allows you to define the filter for your dataclass or method. +このパラメーターを使って、データクラスまたはメソッドが返すデータに対するフィルターを定義することができます。 -### Using a simple filter +### 単純なフィルターの利用 -A filter is composed of the following elements: +フィルターは次の要素で構成されます: **{attribute} {comparator} {value}** -For example: `$filter="firstName=john"` where `firstName` is the **attribute**, `=` is the **comparator** and `john` is the **value**. +たとえば `$filter="firstName=john"` の場合、`firstName` は **属性 (attribute)**、`=` は **比較演算子 (comparator)**、`john` は **値 (value)** にあたります。 -### Using a complex filter +### 複雑なフィルターの利用 -A more compex filter is composed of the following elements, which joins two queries: +複雑なフィルターは複数の単純なフィルターの組み合わせで構成されます: **{attribute} {comparator} {value} {AND/OR/EXCEPT} {attribute} {comparator} {value}** -For example: `$filter="firstName=john AND salary>20000"` where `firstName` and `salary` are attributes in the Employee datastore class. -### Using the params property +たとえば: `$filter="firstName=john AND salary>20000"` (`firstName` および `salary` は Employee データクラスの属性です)。 -You can also use 4D's params property. +### paramsプロパティの使用 -**{attribute} {comparator} {placeholder} {AND/OR/EXCEPT} {attribute} {comparator} {placeholder}&$params='["{value1}","{value2}"]"'** +4D の paramsプロパティを使うこともできます。 -For example: `$filter="firstName=:1 AND salary>:2"&$params='["john",20000]'` where firstName and salary are attributes in the Employee datastore class. +**{attribute} {comparator} {placeholder} {AND/OR/EXCEPT} {attribute} {comparator} {placeholder}&$params='["{value1}","{value2}"]"'** -For more information regarding how to query data in 4D, refer to the [dataClass.query()](https://doc.4d.com/4Dv18/4D/18/dataClassquery.305-4505887.en.html) documentation. +たとえば: `$filter="firstName=:1 AND salary>:2"&$params='["john",20000]'` (firstName および salary は Employee データクラスの属性です)。 -> When inserting quotes (') or double quotes ("), you must escape them using using their character code: +4D においてデータをクエリする方法についての詳細は、[dataClass.query()](https://doc.4d.com/4Dv18/4D/18/dataClassquery.305-4505887.ja.html) ドキュメンテーションを参照ください。 +> 単一引用符 (') または二重引用符 (") を挿入するには、対応する文字コードを使ってそれらをエスケープする必要があります: > -> - Quotes ('): \u0027 -> - Double quotes ("): \u0022

-> For example, you can write the following when passing a value with a quote when using the *params* property: -> `http://127.0.0.1:8081/rest/Person/?$filter="lastName=:1"&$params='["O\u0027Reilly"]'` -> -> If you pass the value directly, you can write the following: `http://127.0.0.1:8081/rest/Person/?$filter="lastName=O'Reilly"` -> -> ## Attribute -> -> If the attribute is in the same dataclass, you can just pass it directly (*e.g.*, `firstName`). However, if you want to query another dataclass, you must include the relation attribute name plus the attribute name, i.e. the path (*e.g.*, employer.name). The attribute name is case-sensitive (`firstName` is not equal to `FirstName`). -> -> You can also query attributes of type Object by using dot-notation. For example, if you have an attribute whose name is "objAttribute" with the following structure: -> -> { -> prop1: "this is my first property", -> prop2: 9181, -> prop3: ["abc","def","ghi"] -> } -> -> -> You can search in the object by writing the following: -> -> `GET /rest/Person/?filter="objAttribute.prop2 == 9181"` -> -> ## Comparator -> -> The comparator must be one of the following values: -> -> | Comparator | 説明 | -> | ---------- | ------------------------ | -> | = | equals to | -> | != | not equal to | -> | > | greater than | -> | >= | greater than or equal to | -> | < | less than | -> | <= | less than or equal to | -> | begin | begins with | - -> -> ## 例題 -> -> In the following example, we look for all employees whose last name begins with a "j": -> -> GET /rest/Employee?$filter="lastName begin j" -> -> -> In this example, we search the Employee datastore class for all employees whose salary is greater than 20,000 and who do not work for a company named Acme: -> -> GET /rest/Employee?$filter="salary>20000 AND -> employer.name!=acme"&$orderby="lastName,firstName" -> -> -> In this example, we search the Person datastore class for all the people whose number property in the anotherobj attribute of type Object is greater than 50: -> -> GET /rest/Person/?filter="anotherobj.mynum > 50" -> \ No newline at end of file +>
  • 単一引用符 ('): \u0027
  • 二重引用符 ("): \u0022 +> +> たとえば、単一引用符が含まれる値を *params* プロパティに渡すには、次のように書きます: +> `http://127.0.0.1:8081/rest/Person/?$filter="lastName=:1"&$params='["O\u0027Reilly"]'` +> +> 値を直接渡す場合は、次のように書けます: `http://127.0.0.1:8081/rest/Person/?$filter="lastName=O'Reilly"` + +## 属性 + +同じデータクラスに属している属性はそのまま受け渡せます (*例*: `firstName`)。 別のデータクラスをクエリする場合は、リレーション名と属性、つまりパスを渡さなくてはなりません (*例*: employer.name)。 属性名の文字の大小は区別されます (`firstName` と `FirstName` は異なります)。 + +オブジェクト型属性もドット記法によってクエリできます。 たとえば、"objAttribute" という名称のオブジェクト属性が次の構造を持っていた場合: + +``` +{ + prop1: "一つ目のプロパティです", + prop2: 9181, + prop3: ["abc","def","ghi"] +} +``` + +このオブジェクトをクエリするには、次のように書きます: + +`GET /rest/Person/?filter="objAttribute.prop2 == 9181"` + +## 比較演算子 + +以下の比較演算子を使用できます: + +| 比較演算子 | 説明 | +| ----- | ----- | +| = | 等しい | +| != | 等しくない | +| > | 大きい | +| >= | 以上 | +| < | 小さい | +| <= | 以下 | +| begin | 前方一致 | + +## 例題 + +名字が "j" で始まる社員を検索します: + +``` + GET /rest/Employee?$filter="lastName begin j" +``` + +Employee データクラスより、給与が 20,000 超で、かつ Acme という名称の企業で働いていない社員を検索します: + +``` + GET /rest/Employee?$filter="salary>20000 AND + employer.name!=acme"&$orderby="lastName,firstName" +``` + +Person データクラスより、anotherobj オブジェクト属性の number プロパティが 50 より大きい人のデータを検索します: + +``` + GET /rest/Person/?filter="anotherobj.mynum > 50" +``` diff --git a/website/translated_docs/ja/REST/$imageformat.md b/website/translated_docs/ja/REST/$imageformat.md index c3ebab8b1bc240..11668677f0a18b 100644 --- a/website/translated_docs/ja/REST/$imageformat.md +++ b/website/translated_docs/ja/REST/$imageformat.md @@ -3,27 +3,27 @@ id: imageformat title: '$imageformat' --- -Defines which image format to use for retrieving images (*e.g.*, `$imageformat=png`) +画像取得の際に使用する画像形式を指定します (*例*: `$imageformat=png`) ## 説明 -Define which format to use to display images. By default, the best format for the image will be chosen. You can, however, select one of the following formats: +画像の表示に使う形式を指定します。 デフォルトでは、画像に最適な形式が選択されます。 指定する場合は、次の形式が指定できます: -| 型 | 説明 | -| ---- | ------------------------------ | -| GIF | GIF format | -| PNG | PNG format | -| JPEG | JPEG format | -| TIFF | TIFF format | -| best | Best format based on the image | +| タイプ | 説明 | +| ---- | -------- | +| GIF | GIF 形式 | +| PNG | PNG 形式 | +| JPEG | JPEG 形式 | +| TIFF | TIFF 形式 | +| best | 画像に最適な形式 | +画像を完全に読み込むには、形式を指定するだけでなく、画像属性を [`$expand`]($expand.md) に渡す必要があります。 -Once you have defined the format, you must pass the image attribute to [`$expand`]($expand.md) to load the photo completely. - -If there is no image to be loaded or the format doesn't allow the image to be loaded, the response will be empty. +読み込むべき画像がない場合、または指定した形式では画像が読み込めない場合、レスポンスは空になります。 ## 例題 -The following example defines the image format to JPEG regardless of the actual type of the photo and passes the actual version number sent by the server: +photo属性の実際の形式に関わらず、画像形式を JPEG に指定し、サーバーより受け取ったバージョン番号を受け渡している例です: + +`GET /rest/Employee(1)/photo?$imageformat=jpeg&$version=3&$expand=photo` -`GET /rest/Employee(1)/photo?$imageformat=jpeg&$version=3&$expand=photo` \ No newline at end of file diff --git a/website/translated_docs/ja/REST/$info.md b/website/translated_docs/ja/REST/$info.md index 879750d74b79b6..4944d4e67df83f 100644 --- a/website/translated_docs/ja/REST/$info.md +++ b/website/translated_docs/ja/REST/$info.md @@ -3,121 +3,115 @@ id: info title: '$info' --- -Returns information about the entity sets currently stored in 4D Server's cache as well as user sessions +4D Server のキャッシュに保存されているエンティティセットおよびユーザーセッションの情報を返します。 ## 説明 +プロジェクトに対してこのリクエストを送信すると、次のプロパティに情報を取得します: -When you call this request for your project, you retrieve information in the following properties: - -| プロパティ | 型 | 説明 | -| -------------- | ------ | ----------------------------------------------------------------------------------- | -| cacheSize | 数値 | 4D Server's cache size. | -| usedCache | 数値 | How much of 4D Server's cache has been used. | -| entitySetCount | 数値 | Number of entity selections. | -| entitySet | コレクション | A collection in which each object contains information about each entity selection. | -| ProgressInfo | コレクション | A collection containing information about progress indicator information. | -| sessionInfo | コレクション | A collection in which each object contains information about each user session. | - +| プロパティ | タイプ | 説明 | +| -------------- | ------ | ---------------------------------- | +| cacheSize | 数値 | 4D Server のキャッシュサイズ | +| usedCache | 数値 | 4D Server のキャッシュ使用量 | +| entitySetCount | 数値 | エンティティセットの数 | +| entitySet | コレクション | 各エンティティセットの情報が格納されているオブジェクトのコレクション | +| ProgressInfo | コレクション | 進捗インジケーターの情報が格納されているコレクション | +| sessionInfo | コレクション | 各ユーザーセッションの情報が格納されているオブジェクトのコレクション | ### entitySet +4D Server のキャッシュに保存されている各エンティティセットについて、次の情報が返されます: -For each entity selection currently stored in 4D Server's cache, the following information is returned: - -| プロパティ | 型 | 説明 | -| ------------- | --- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| id | 文字列 | A UUID that references the entity set. | -| dataClass | 文字列 | Name of the datastore class. | -| selectionSize | 数値 | Number of entities in the entity selection. | -| sorted | ブール | Returns true if the set was sorted (using `$orderby`) or false if it's not sorted. | -| refreshed | 日付 | When the entity set was created or the last time it was used. | -| expires | 日付 | When the entity set will expire (this date/time changes each time when the entity set is refreshed). The difference between refreshed and expires is the timeout for an entity set. This value is either two hours by default or what you defined using `$timeout`. | +| プロパティ | タイプ | 説明 | +| ------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------- | +| id | String | エンティティセットを参照する UUID | +| dataClass | String | データクラスの名称。 | +| selectionSize | 数値 | エンティティセットに含まれるエンティティの数 | +| sorted | ブール | エンティティセットが (`$orderby` の使用により) 順列ありの場合には true、順列なしの場合は false。 | +| refreshed | 日付 | エンティティセットが最後に使用された日付または作成日。 | +| expires | 日付 | エンティティセットの有効期限 (エンティティセットが更新されるたびに、この日付/時間は変更されます)。 expires と refreshed の差がエンティティセットのタイムアウトです。 デフォルトのタイムアウトは2時間ですが、`$timeout` を使って指定することもできます。 | -For information about how to create an entity selection, refer to `$method=entityset`. If you want to remove the entity selection from 4D Server's cache, use `$method=release`. - -> 4D also creates its own entity selections for optimization purposes, so the ones you create with `$method=entityset` are not the only ones returned. -> -> **IMPORTANT** If your project is in **Controlled Admin Access Mode**, you must first log into the project as a user in the Admin group. +エンティティセットを作成する方法についての詳細は `$method=entityset` を参照ください。 4D Server のキャッシュからエンティティセットを削除したい場合には `$method=release` を使います。 +> 最適化のため、4D は独自のエンティティセットを生成します。つまり、`$method=entityset` で作成した以外のエンティティセットも返されます。 +> **重要** プロジェクトにおいて、4D の **パスワードアクセスシステム** を起動している場合には、Adminグループのユーザーとしてログインしている必要があります。 ### sessionInfo -For each user session, the following information is returned in the *sessionInfo* collection: - -| プロパティ | 型 | 説明 | -| ---------- | --- | ------------------------------------------------------------ | -| sessionID | 文字列 | A UUID that references the session. | -| userName | 文字列 | The name of the user who runs the session. | -| lifeTime | 数値 | The lifetime of a user session in seconds (3600 by default). | -| expiration | 日付 | The current expiration date and time of the user session. | +各ユーザーセッションについては、次の情報が *sessionInfo* コレクションに返されます: +| プロパティ | タイプ | 説明 | +| ---------- | ------ | ------------------------------ | +| sessionID | String | セッションを参照する UUID | +| userName | String | セッションを実行中のユーザー名 | +| lifeTime | 数値 | ユーザーセッションのタイムアウト (デフォルトは 3600) | +| expiration | 日付 | ユーザーセッションの有効期限 | ## 例題 -Retrieve information about the entity sets currently stored in 4D Server's cache as well as user sessions: +4D Server のキャッシュに保存されているエンティティセットおよびユーザーセッションの情報を取得します。 `GET /rest/$info` -**Result**: +**結果**: +``` +{ +cacheSize: 209715200, +usedCache: 3136000, +entitySetCount: 4, +entitySet: [ + { + id: "1418741678864021B56F8C6D77F2FC06", + tableName: "Company", + selectionSize: 1, + sorted: false, + refreshed: "2011-11-18T10:30:30Z", + expires: "2011-11-18T10:35:30Z" + }, { - cacheSize: 209715200, - usedCache: 3136000, - entitySetCount: 4, - entitySet: [ - { - id: "1418741678864021B56F8C6D77F2FC06", - tableName: "Company", - selectionSize: 1, - sorted: false, - refreshed: "2011-11-18T10:30:30Z", - expires: "2011-11-18T10:35:30Z" - }, - { - id: "CAD79E5BF339462E85DA613754C05CC0", - tableName: "People", - selectionSize: 49, - sorted: true, - refreshed: "2011-11-18T10:28:43Z", - expires: "2011-11-18T10:38:43Z" - }, - { - id: "F4514C59D6B642099764C15D2BF51624", - tableName: "People", - selectionSize: 37, - sorted: false, - refreshed: "2011-11-18T10:24:24Z", - expires: "2011-11-18T12:24:24Z" - } - ], - ProgressInfo: [ - { - UserInfo: "flushProgressIndicator", - sessions: 0, - percent: 0 - }, - { - UserInfo: "indexProgressIndicator", - sessions: 0, - percent: 0 - } - ], - sessionInfo: [ - { - sessionID: "6657ABBCEE7C3B4089C20D8995851E30", - userID: "36713176D42DB045B01B8E650E8FA9C6", - userName: "james", - lifeTime: 3600, - expiration: "2013-04-22T12:45:08Z" - }, - { - sessionID: "A85F253EDE90CA458940337BE2939F6F", - userID: "00000000000000000000000000000000", - userName: "default guest", - lifeTime: 3600, - expiration: "2013-04-23T10:30:25Z" + id: "CAD79E5BF339462E85DA613754C05CC0", + tableName: "People", + selectionSize: 49, + sorted: true, + refreshed: "2011-11-18T10:28:43Z", + expires: "2011-11-18T10:38:43Z" + }, + { + id: "F4514C59D6B642099764C15D2BF51624", + tableName: "People", + selectionSize: 37, + sorted: false, + refreshed: "2011-11-18T10:24:24Z", + expires: "2011-11-18T12:24:24Z" } - ] +], +ProgressInfo: [ + { + UserInfo: "flushProgressIndicator", + sessions: 0, + percent: 0 + }, + { + UserInfo: "indexProgressIndicator", + sessions: 0, + percent: 0 } - - -> The progress indicator information listed after the entity selections is used internally by 4D. \ No newline at end of file +], +sessionInfo: [ + { + sessionID: "6657ABBCEE7C3B4089C20D8995851E30", + userID: "36713176D42DB045B01B8E650E8FA9C6", + userName: "james", + lifeTime: 3600, + expiration: "2013-04-22T12:45:08Z" + }, + { + sessionID: "A85F253EDE90CA458940337BE2939F6F", + userID: "00000000000000000000000000000000", + userName: "default guest", + lifeTime: 3600, + expiration: "2013-04-23T10:30:25Z" +} +] +} +``` +> エンティティセットに続く進捗インジケーターの情報は、4Dによって内部的に使用されます。 \ No newline at end of file diff --git a/website/translated_docs/ja/REST/$method.md b/website/translated_docs/ja/REST/$method.md index 6066665ae175c4..579b6bad20f29b 100644 --- a/website/translated_docs/ja/REST/$method.md +++ b/website/translated_docs/ja/REST/$method.md @@ -3,309 +3,329 @@ id: method title: '$method' --- -This parameter allows you to define the operation to execute with the returned entity or entity selection. +このパラメーターは、返されたエンティティまたはエンティティセレクションに対して実行する処理を指定するのに使います。 + +## 使用可能なシンタックス + +| シンタックス | 例題 | 説明 | +| ----------------------------------------------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------ | +| [**$method=delete**](#methoddelete) | `POST /Employee?$filter="ID=11"& $method=delete` | エンティティまたはエンティティセレクションを削除します | +| [**$method=entityset**](#methodentityset) | `GET /People/?$filter="ID>320"& $method=entityset& $timeout=600` | RESTリクエストで定義されたエンティティのコレクションに基づいて、4D Server のキャッシュにエンティティセットを作成します | +| [**$method=release**](#methodrelease) | `GET /Employee/$entityset/?$method=release` | 4D Server のキャッシュからエンティティセットを削除します | +| [**$method=subentityset**](#methodsubentityset) | `GET /Company(1)/staff?$expand=staff& $method=subentityset& $subOrderby=lastName ASC` | RESTリクエストで定義されたリレートエンティティのコレクションに基づいて、エンティティセットを作成します | +| [**$method=update**](#methodupdate) | `POST /Person/?$method=update` | 一つ以上のエンティティを更新または作成します | + -## Available syntaxes -| シンタックス | 例題 | 説明 | -| ----------------------------------------------- | ----------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | -| [**$method=delete**](#methoddelete) | `POST /Employee?$filter="ID=11"& $method=delete` | Deletes the current entity, entity collection, or entity selection | -| [**$method=entityset**](#methodentityset) | `GET /People/?$filter="ID>320"& $method=entityset& $timeout=600` | Creates an entity set in 4D Server's cache based on the collection of entities defined in the REST request | -| [**$method=release**](#methodrelease) | `GET /Employee/$entityset/?$method=release` | Releases an existing entity set stored in 4D Server's cache | -| [**$method=subentityset**](#methodsubentityset) | `GET /Company(1)/staff?$expand=staff& $method=subentityset& $subOrderby=lastName ASC` | Creates an entity set based on the collection of related entities defined in the REST request | -| [**$method=update**](#methodupdate) | `POST /Person/?$method=update` | Updates and/or creates one or more entities | ## $method=delete -Deletes the current entity, entity collection, or entity selection (created through REST) +エンティティまたは (RESTで作成された) エンティティセレクションを削除します + ### 説明 -With `$method=delete`, you can delete an entity or an entire entity collection. You can define the collection of entities by using, for example, [`$filter`]($filter.md) or specifying one directly using [`{dataClass}({key})`](%7BdataClass%7D.html#dataclasskey) *(e.g.*, /Employee(22)). +`$method=delete` を使ってエンティティ、またはエンティティセレクションを削除します。 たとえば、[`$filter`]($filter.md) を使って定義したエンティティセレクションや、[`{dataClass}({key})`](%7BdataClass%7D.html#dataclasskey) *(例*: /Employee(22)) のように直接特定したエンティティが対象です。 -You can also delete the entities in an entity set, by calling [`$entityset/{entitySetID}`]($entityset.md#entitysetentitysetid). +[`$entityset/{entitySetID}`]($entityset.md#entitysetentitysetid) のようにエンティティセットを呼び出して、そこに含まれるエンティティを削除することもできます。 ## 例題 +キーが 22であるエンティティを削除するには、次の RESTリクエストが書けます: + + `POST /rest/Employee(22)/?$method=delete` -You can then write the following REST request to delete the entity whose key is 22: +[`$filter`]($filter.md) を使ったクエリも可能です: -`POST /rest/Employee(22)/?$method=delete` + `POST /rest/Employee?$filter="ID=11"&$method=delete` -You can also do a query as well using $filter: +[`$entityset/{entitySetID}`]($entityset.md#entitysetentitysetid) で呼び出したエンティティセットを削除する場合は次のように書きます: -`POST /rest/Employee?$filter="ID=11"&$method=delete` + `POST /rest/Employee/$entityset/73F46BE3A0734EAA9A33CA8B14433570?$method=delete` -You can also delete an entity set using $entityset/{entitySetID}: +レスポンス: -`POST /rest/Employee/$entityset/73F46BE3A0734EAA9A33CA8B14433570?$method=delete` +``` +{ + "ok": true +} +``` -Response: - { - "ok": true - } - ## $method=entityset -Creates an entity set in 4D Server's cache based on the collection of entities defined in the REST request +RESTリクエストで定義されたエンティティのコレクションに基づいて、4D Server のキャッシュにエンティティセットを作成します ### 説明 -When you create a collection of entities in REST, you can also create an entity set that will be saved in 4D Server's cache. The entity set will have a reference number that you can pass to `$entityset/{entitySetID}` to access it. By default, it is valid for two hours; however, you can modify that amount of time by passing a value (in seconds) to $timeout. +RESTでエンティティのコレクションを作成した場合、これをエンティティセットとして 4D Server のキャッシュに保存することができます。 エンティティセットには参照番号が付与されます。これを `$entityset/{entitySetID}` に渡すと、当該エンティティセットにアクセスできます。 デフォルトで、エンティティセットは 2時間有効です。$timeout に値 (秒単位) を渡すことで、有効時間を変更できます。 -If you have used `$savedfilter` and/or `$savedorderby` (in conjunction with `$filter` and/or `$orderby`) when you created your entity set, you can recreate it with the same reference ID even if it has been removed from 4D Server's cache. +エンティティセットを作成する際に、`$filter` や `$orderby` と同時に`$savedfilter` や `$savedorderby` も使用していた場合には、4D Server のキャッシュからエンティティセットが削除されていても、同じ参照IDで再作成できます。 ### 例題 -To create an entity set, which will be saved in 4D Server's cache for two hours, add `$method=entityset` at the end of your REST request: - -`GET /rest/People/?$filter="ID>320"&$method=entityset` +4D Server のキャッシュに2時間保存されるエンティティセットを作成するには、RESTリクエストの最後に `$method=entityset` を追加します: -You can create an entity set that will be stored in 4D Server's cache for only ten minutes by passing a new timeout to `$timeout`: + `GET /rest/People/?$filter="ID>320"&$method=entityset` -`GET /rest/People/?$filter="ID>320"&$method=entityset&$timeout=600` +保存時間が 10分のエンティティセットを作成するには、次のように `$timeout` に値を渡します: -You can also save the filter and order by, by passing true to `$savedfilter` and `$savedorderby`. + `GET /rest/People/?$filter="ID>320"&$method=entityset&$timeout=600` -> `$skip` and `$top/$limit` are not taken into consideration when saving an entity set. +フィルターや並べ替えの情報を保存するには、`$savedfilter` や `$savedorderby` に true を渡します。 +> エンティティセットを作成する際には、`$skip` および `$top/$limit` は無視されます。 -After you create an entity set, the first element, `__ENTITYSET`, is added to the object returned and indicates the URI to use to access the entity set: +エンティティセットを作成すると、返されるオブジェクトの先頭に `__ENTITYSET` という要素が追加され、エンティティセットにアクセスするための URI を提供します: `__ENTITYSET: "http://127.0.0.1:8081/rest/Employee/$entityset/9718A30BF61343C796345F3BE5B01CE7"` + + + ## $method=release -Releases an existing entity set stored in 4D Server's cache. +4D Server のキャッシュからエンティティセットを削除します。 ### 説明 -You can release an entity set, which you created using [`$method=entityset`](#methodentityset), from 4D Server's cache. +[`$method=entityset`](#methodentityset) によって作成したエンティティセットを、4D Server のキャッシュから削除することができます。 ### 例題 -Release an existing entity set: +既存のエンティティセットを削除します: `GET /rest/Employee/$entityset/4C51204DD8184B65AC7D79F09A077F24?$method=release` -#### Response: - -If the request was successful, the following response is returned: - - { - "ok": true - } - If the entity set wasn't found, an error is returned: - - { - "__ERROR": [ - { - "message": "Error code: 1802\nEntitySet \"4C51204DD8184B65AC7D79F09A077F24\" cannot be found\ncomponent: 'dbmg'\ntask 22, name: 'HTTP connection handler'\n", - "componentSignature": "dbmg", - "errCode": 1802 - } - ] - } - +#### レスポンス: + +リクエストが成功した場合のレスポンス: + +``` +{ + "ok": true +} +エンティティセットが見つからなかった場合には、エラーが返されます + +{ + "__ERROR": [ + { + "message": "Error code: 1802\nEntitySet \"4C51204DD8184B65AC7D79F09A077F24\" cannot be found\ncomponent: 'dbmg'\ntask 22, name: 'HTTP connection handler'\n", + "componentSignature": "dbmg", + "errCode": 1802 + } + ] +} +``` + ## $method=subentityset -Creates an entity set in 4D Server's cache based on the collection of related entities defined in the REST request +RESTリクエストで定義されたリレートエンティティのコレクションに基づいて、4D Server のキャッシュにエンティティセットを作成します + ### 説明 -`$method=subentityset` allows you to sort the data returned by the relation attribute defined in the REST request. +`$method=subentityset` を使うことで、RESTリクエストが定義されたリレーション属性によって返されるデータを並べ替えることができます。 -To sort the data, you use the `$subOrderby` property. For each attribute, you specify the order as ASC (or asc) for ascending order and DESC (desc) for descending order. By default, the data is sorted in ascending order. +データを並べ替えるには `$subOrderby` を使います。 並べ替えの基準とする各属性について、並べ替え順を指定します。ASC ( asc) が昇順、DESC (desc) が降順です。 デフォルトでは、データは昇順に並べ替えられます。 -If you want to specify multiple attributes, you can delimit them with a comma, µ, `$subOrderby="lastName desc, firstName asc"`. +複数の属性を指定するには、カンマ区切りにします (`例`: $subOrderby="lastName desc, firstName asc")。 ### 例題 -If you want to retrieve only the related entities for a specific entity, you can make the following REST request where staff is the relation attribute in the Company dataclass linked to the Employee dataclass: +あるエンティティのリレートエンティティだけを取得したいとき、たとえば Company データクラスの staff リレーション名が Employee データクラスにリンクしている場合には、次の RESTリクエストが書けます: `GET /rest/Company(1)/staff?$expand=staff&$method=subentityset&$subOrderby=lastName ASC` -#### Response: - - { - - "__ENTITYSET": "/rest/Employee/$entityset/FF625844008E430B9862E5FD41C741AB", - "__entityModel": "Employee", - "__COUNT": 2, - "__SENT": 2, - "__FIRST": 0, - "__ENTITIES": [ - { - "__KEY": "4", - "__STAMP": 1, - "ID": 4, - "firstName": "Linda", - "lastName": "Jones", - "birthday": "1970-10-05T14:23:00Z", - "employer": { - "__deferred": { - "uri": "/rest/Company(1)", - "__KEY": "1" - } +#### レスポンス: + +``` +{ + + "__ENTITYSET": "/rest/Employee/$entityset/FF625844008E430B9862E5FD41C741AB", + "__entityModel": "Employee", + "__COUNT": 2, + "__SENT": 2, + "__FIRST": 0, + "__ENTITIES": [ + { + "__KEY": "4", + "__STAMP": 1, + "ID": 4, + "firstName": "Linda", + "lastName": "Jones", + "birthday": "1970-10-05T14:23:00Z", + "employer": { + "__deferred": { + "uri": "/rest/Company(1)", + "__KEY": "1" } - }, - { - "__KEY": "1", - "__STAMP": 3, - "ID": 1, - "firstName": "John", - "lastName": "Smith", - "birthday": "1985-11-01T15:23:00Z", - "employer": { - "__deferred": { - "uri": "/rest/Company(1)", - "__KEY": "1" - } + } + }, + { + "__KEY": "1", + "__STAMP": 3, + "ID": 1, + "firstName": "John", + "lastName": "Smith", + "birthday": "1985-11-01T15:23:00Z", + "employer": { + "__deferred": { + "uri": "/rest/Company(1)", + "__KEY": "1" } } - ] - - } - + } + ] + +} +``` + ## $method=update -Updates and/or creates one or more entities -### 説明 +一つ以上のエンティティを更新または作成します -`$method=update` allows you to update and/or create one or more entities in a single **POST**. If you update and/or create one entity, it is done in an object with each property an attribute with its value, *e.g.*, `{ lastName: "Smith" }`. If you update and/or create multiple entities, you must create a collection of objects. +### 説明 -In any cases, you must set the **POST** data in the **body** of the request. +`$method=update` を使うと、一つの **POST** で一つ以上のエンティティを更新または作成することができます。 エンティティの更新・作成をおこなうには、オブジェクトのプロパティ/値としてエンティティの属性/値を指定します (*例*: `{ lastName: "Smith" }`)。 複数のエンティティを更新・作成するには、各エンティティに対応するオブジェクトをコレクションにまとめます。 -To update an entity, you must pass the `__KEY` and `__STAMP` parameters in the object along with any modified attributes. If both of these parameters are missing, an entity will be added with the values in the object you send in the body of your **POST**. +いずれの場合も、リクエストのボディ (**body**) に **POST** データ **body** を格納します。 -Triggers are executed immediately when saving the entity to the server. The response contains all the data as it exists on the server. +エンティティを更新するには、更新する属性だけでなく、`__KEY` および `__STAMP` パラメーターをオブジェクト内に指定しなくてはなりません。 これらのパラメーターがない場合、**POST** のボディに格納したオブジェクトの値をもとに新規エンティティが追加されます。 -You can also put these requests to create or update entities in a transaction by calling `$atomic/$atonce`. If any errors occur during data validation, none of the entities are saved. You can also use $method=validate to validate the entities before creating or updating them. +エンティティをサーバーに保存すると同時にトリガーが実行されます。 レスポンスにはすべてのデータが、サーバー上に存在するとおりに格納されます。 -If a problem arises while adding or modifying an entity, an error will be returned to you with that information. +`$atomic/$atonce` を使うと、エンティティを作成・更新するリクエストをトランザクション内で実行できます。 データの検証でエラーが発生した場合に、一部のエンティティだけが処理されてしまうのを防げます。 また、`$method=validate` を使うと、作成・更新の前にエンティティを検証することができます。 -> Notes for specific attribute types: +エンティティを追加または更新する際に問題が発生すると、その情報を格納したエラーが返されます。 +> 属性の型に関する注記: > -> * **Dates** must be expressed in JS format: YYYY-MM-DDTHH:MM:SSZ (e.g., "2010-10-05T23:00:00Z"). If you have selected the Date only property for your Date attribute, the time zone and time (hour, minutes, and seconds) will be removed. In this case, you can also send the date in the format that it is returned to you dd!mm!yyyy (e.g., 05!10!2013). -> * **Booleans** are either true or false. -> * Uploaded files using `$upload` can be applied to an attribute of type Image or BLOB by passing the object returned in the following format { "ID": "D507BC03E613487E9B4C2F6A0512FE50"} +> * **日付** は JavaScript 形式で表す必要があります: YYYY-MM-DDTHH:MM:SSZ (例: "2010-10-05T23:00:00Z")。 日付属性のためだけに日付プロパティを指定した場合、タイムゾーンおよび時刻 (時間・分・秒) の情報は削除されます。 この場合、レスポンスの形式 dd!mm!yyyy (例: 05!10!2013) を使って日付を送信することも可能です。 +> * **ブール** は true または false です。 +> * `$upload` を使ってアップロードしたファイルは、{ "ID": "D507BC03E613487E9B4C2F6A0512FE50"} のような形式で返されるオブジェクトを渡すことで、ピクチャー型やBLOB型の属性に適用できます。 ### 例題 -To update a specific entity, you use the following URL: - -`POST /rest/Person/?$method=update` - -**POST data:** - - { - __KEY: "340", - __STAMP: 2, - firstName: "Pete", - lastName: "Miller" - } - - -The firstName and lastName attributes in the entity indicated above will be modified leaving all other attributes (except calculated ones based on these attributes) unchanged. - -If you want to create an entity, you can POST the attributes using this URL: - -`POST /rest/Person/?$method=update` - -**POST data:** - - { - firstName: "John", - lastName: "Smith" - } - - -You can also create and update multiple entities at the same time using the same URL above by passing multiple objects in an array to the POST: - -`POST /rest/Person/?$method=update` - -**POST data:** - - [{ - "__KEY": "309", - "__STAMP": 5, - "ID": "309", - "firstName": "Penelope", - "lastName": "Miller" - }, { - "firstName": "Ann", - "lastName": "Jones" - }] - - -**Response:** - -When you add or modify an entity, it is returned to you with the attributes that were modified. For example, if you create the new employee above, the following will be returned: - - { - "__KEY": "622", - "__STAMP": 1, - "uri": "http://127.0.0.1:8081/rest/Employee(622)", - "__TIMESTAMP": "!!2020-04-03!!", - "ID": 622, - "firstName": "John", - "firstName": "Smith" - } - - -If, for example, the stamp is not correct, the following error is returned: - - { - "__STATUS": { - "status": 2, - "statusText": "Stamp has changed", - "success": false +特定のエンティティを更新するには、次のようなリクエストをします: + + `POST /rest/Person/?$method=update` + +**POST データ:** + +``` +{ + __KEY: "340", + __STAMP: 2, + firstName: "Pete", + lastName: "Miller" +} +``` + +この場合、渡した firstName および lastName 属性だけが変更され、当該エンティティのその他の属性はそのままです (変更した属性に基づいて計算される属性を除く)。 + +エンティティを作成するには、次のように書きます: + + `POST /rest/Person/?$method=update` + +**POST データ:** + +``` +{ + firstName: "John", + lastName: "Smith" +} +``` + +同じ URL を使って、複数のエンティティを作成・更新することもできます。その場合には、POST データに複数オブジェクトのコレクションを渡します: + + `POST /rest/Person/?$method=update` + +**POST データ:** + +``` +[{ + "__KEY": "309", + "__STAMP": 5, + "ID": "309", + "firstName": "Penelope", + "lastName": "Miller" +}, { + "firstName": "Ann", + "lastName": "Jones" +}] +``` + +**レスポンス:** + +エンティティを追加・更新した場合、そのエンティティは変更後の内容で返されます。 たとえば、新規の Employee エンティティを作成した場合、次のようなレスポンスが返されます: + +``` +{ + "__KEY": "622", + "__STAMP": 1, + "uri": "http://127.0.0.1:8081/rest/Employee(622)", + "__TIMESTAMP": "!!2020-04-03!!", + "ID": 622, + "firstName": "John", + "firstName": "Smith" +} +``` + +スタンプが正しくない場合には、次のようなエラーが返されます: + +``` +{ + "__STATUS": { + "status": 2, + "statusText": "Stamp has changed", + "success": false + }, + "__KEY": "1", + "__STAMP": 12, + "__TIMESTAMP": "!!2020-03-31!!", + "ID": 1, + "firstname": "Denise", + "lastname": "O'Peters", + "isWoman": true, + "numberOfKids": 1, + "addressID": 1, + "gender": true, + "imageAtt": { + "__deferred": { + "uri": "/rest/Persons(1)/imageAtt?$imageformat=best&$version=12&$expand=imageAtt", + "image": true + } + }, + "extra": { + "num": 1, + "alpha": "I am 1" + }, + "address": { + "__deferred": { + "uri": "/rest/Address(1)", + "__KEY": "1" + } + }, + "__ERROR": [ + { + "message": "Given stamp does not match current one for record# 0 of table Persons", + "componentSignature": "dbmg", + "errCode": 1263 }, - "__KEY": "1", - "__STAMP": 12, - "__TIMESTAMP": "!!2020-03-31!!", - "ID": 1, - "firstname": "Denise", - "lastname": "O'Peters", - "isWoman": true, - "numberOfKids": 1, - "addressID": 1, - "gender": true, - "imageAtt": { - "__deferred": { - "uri": "/rest/Persons(1)/imageAtt?$imageformat=best&$version=12&$expand=imageAtt", - "image": true - } - }, - "extra": { - "num": 1, - "alpha": "I am 1" + { + "message": "Cannot save record 0 in table Persons of database remote_dataStore", + "componentSignature": "dbmg", + "errCode": 1046 }, - "address": { - "__deferred": { - "uri": "/rest/Address(1)", - "__KEY": "1" - } - }, - "__ERROR": [ - { - "message": "Given stamp does not match current one for record# 0 of table Persons", - "componentSignature": "dbmg", - "errCode": 1263 - }, - { - "message": "Cannot save record 0 in table Persons of database remote_dataStore", - "componentSignature": "dbmg", - "errCode": 1046 - }, - { - "message": "The entity# 1 in the \"Persons\" datastore class cannot be saved", - "componentSignature": "dbmg", - "errCode": 1517 - } - ] - }{} \ No newline at end of file + { + "message": "The entity# 1 in the \"Persons\" dataclass cannot be saved", + "componentSignature": "dbmg", + "errCode": 1517 + } + ] +}{} + +``` diff --git a/website/translated_docs/ja/REST/$orderby.md b/website/translated_docs/ja/REST/$orderby.md index 219269d7fe2e63..5673c0d8d3a00c 100644 --- a/website/translated_docs/ja/REST/$orderby.md +++ b/website/translated_docs/ja/REST/$orderby.md @@ -4,44 +4,48 @@ title: '$orderby' --- -Sorts the data returned by the attribute and sorting order defined (*e.g.*, `$orderby="lastName desc, salary asc"`) +指定した属性と並べ替え順に基づいて、返されたデータを並べ替えます (*例*: `$orderby="lastName desc, salary asc"`) ## 説明 -`$orderby` orders the entities returned by the REST request. For each attribute, you specify the order as `ASC` (or `asc`) for ascending order and `DESC` (`desc`) for descending order. By default, the data is sorted in ascending order. If you want to specify multiple attributes, you can delimit them with a comma, *e.g.*, `$orderby="lastName desc, firstName asc"`. +`$orderby` は RESTリクエストによって返されるエンティティを並べ替えます。 並べ替えの基準とする各属性について、並べ替え順を指定します。`ASC` ( `asc`) が昇順、`DESC` (`desc`) が降順です。 デフォルトでは、データは昇順に並べ替えられます。 複数の属性を指定するには、カンマ区切りにします *例*: `$orderby="lastName desc, firstName asc"`。 + ## 例題 -In this example, we retrieve entities and sort them at the same time: - -`GET /rest/Employee/?$filter="salary!=0"&$orderby="salary DESC,lastName ASC,firstName ASC"` - -The example below sorts the entity set by lastName attribute in ascending order: - -`GET /rest/Employee/$entityset/CB1BCC603DB0416D939B4ED379277F02?$orderby="lastName"` - -**Result**: - - { - __entityModel: "Employee", - __COUNT: 10, - __SENT: 10, - __FIRST: 0, - __ENTITIES: [ - { - __KEY: "1", - __STAMP: 1, - firstName: "John", - lastName: "Smith", - salary: 90000 - }, - { - __KEY: "2", - __STAMP: 2, - firstName: "Susan", - lastName: "O'Leary", - salary: 80000 - }, - // more entities - ] - } \ No newline at end of file +取得と同時にエンティティを並べ替えます: + + `GET /rest/Employee/?$filter="salary!=0"&$orderby="salary DESC,lastName ASC,firstName ASC"` + +下の例では、lastName属性を基準にしてエンティティセットを昇順に並べ替えます: + + `GET /rest/Employee/$entityset/CB1BCC603DB0416D939B4ED379277F02?$orderby="lastName"` + +**結果**: + +``` +{ + __entityModel: "Employee", + __COUNT: 10, + __SENT: 10, + __FIRST: 0, + __ENTITIES: [ + { + __KEY: "1", + __STAMP: 1, + firstName: "John", + lastName: "Smith", + salary: 90000 + }, + { + __KEY: "2", + __STAMP: 2, + firstName: "Susan", + lastName: "O'Leary", + salary: 80000 + }, +// エンティティが続きます + ] +} +``` + diff --git a/website/translated_docs/ja/REST/$querypath.md b/website/translated_docs/ja/REST/$querypath.md index cc0601d406d947..5efba9fc16b713 100644 --- a/website/translated_docs/ja/REST/$querypath.md +++ b/website/translated_docs/ja/REST/$querypath.md @@ -3,106 +3,108 @@ id: querypath title: '$querypath' --- -Returns the query as it was executed by 4D Server (*e.g.*, `$querypath=true`) +4D Server によって実際に実行されたクエリを返します (*例*: `$querypath=true`) ## 説明 -`$querypath` returns the query as it was executed by 4D Server. If, for example, a part of the query passed returns no entities, the rest of the query is not executed. The query requested is optimized as you can see in this `$querypath`. +`$querypath` は、4D Server によって実際に実行されたクエリを返します。 たとえば、クエリの一部がエンティティを返さなかった場合、残りのクエリは実行されません。 `$querypath` で確認されるとおり、クエリリクエストは最適化されます。 -For more information about query paths, refer to [queryPlan and queryPath](genInfo.md#querypath-and-queryplan). +クエリパスについての詳細は [queryPlan と queryPath](genInfo.md#querypath-と-queryplan) を参照ください。 -In the steps collection, there is an object with the following properties defining the query executed: - -| プロパティ | 型 | 説明 | -| ------------- | ------ | --------------------------------------------------------------------------- | -| description | 文字列 | Actual query executed or "AND" when there are multiple steps | -| time | 数値 | Number of milliseconds needed to execute the query | -| recordsfounds | 数値 | Number of records found | -| steps | コレクション | An collection with an object defining the subsequent step of the query path | +実行されたクエリを定義する次のプロパティを格納した steps コレクションが返されます: +| プロパティ | タイプ | 説明 | +| ------------- | ------ | ------------------------------- | +| description | String | 実際に実行されたクエリ、または複数ステップの場合は "AND" | +| time | 数値 | クエリの実行に要した時間 (ミリ秒単位) | +| recordsfounds | 数値 | レコードの検出件数 | +| steps | コレクション | クエリパスの後続ステップを定義するオブジェクトのコレクション | ## 例題 -If you passed the following query: - -`GET /rest/Employee/$filter="employer.name=acme AND lastName=Jones"&$querypath=true` +以下のクエリを渡した場合: -And no entities were found, the following query path would be returned, if you write the following: - -`GET /rest/$querypath` + `GET /rest/Employee/$filter="employer.name=acme AND lastName=Jones"&$querypath=true` -**Response**: - - __queryPath: { - - steps: [ - { - description: "AND", - time: 0, - recordsfounds: 0, - steps: [ - { - description: "Join on Table : Company : People.employer = Company.ID", - time: 0, - recordsfounds: 0, - steps: [ - { - steps: [ - { - description: "Company.name = acme", - time: 0, - recordsfounds: 0 - } - ] - } - ] - } - ] - } - ] - - } - - -If, on the other hand, the first query returns more than one entity, the second one will be executed. If we execute the following query: - -`GET /rest/Employee/$filter="employer.name=a* AND lastName!=smith"&$querypath=true` - -If at least one entity was found, the following query path would be returned, if you write the following: +エンティティが見つからなかった場合に次のように書くと、後述のクエリパスが返されます: `GET /rest/$querypath` -**Respose**: - - "__queryPath": { - "steps": [ - { - "description": "AND", - "time": 1, - "recordsfounds": 4, - "steps": [ - { - "description": "Join on Table : Company : Employee.employer = Company.ID", - "time": 1, - "recordsfounds": 4, - "steps": [ - { - "steps": [ - { - "description": "Company.name LIKE a*", - "time": 0, - "recordsfounds": 2 - } - ] - } - ] - }, - { - "description": "Employee.lastName # smith", - "time": 0, - "recordsfounds": 4 - } - ] - } - ] - } \ No newline at end of file +**レスポンス**: + +``` +__queryPath: { + + steps: [ + { + description: "AND", + time: 0, + recordsfounds: 0, + steps: [ + { + description: "Join on Table : Company : People.employer = Company.ID", + time: 0, + recordsfounds: 0, + steps: [ + { + steps: [ + { + description: "Company.name = acme", + time: 0, + recordsfounds: 0 + } + ] + } + ] + } + ] + } + ] + +} +``` + +最初のクエリが一つ以上のエンティティを返した場合には、二つめのクエリが実行されます。 以下のクエリを実行した場合: + + `GET /rest/Employee/$filter="employer.name=a* AND lastName!=smith"&$querypath=true` + +少なくとも1件のエンティティが見つかった場合に次のように書くと、後述のクエリパスが返されます: + + `GET /rest/$querypath` + +**レスポンス**: + +``` +"__queryPath": { + "steps": [ + { + "description": "AND", + "time": 1, + "recordsfounds": 4, + "steps": [ + { + "description": "Join on Table : Company : Employee.employer = Company.ID", + "time": 1, + "recordsfounds": 4, + "steps": [ + { + "steps": [ + { + "description": "Company.name LIKE a*", + "time": 0, + "recordsfounds": 2 + } + ] + } + ] + }, + { + "description": "Employee.lastName # smith", + "time": 0, + "recordsfounds": 4 + } + ] + } + ] +} +``` diff --git a/website/translated_docs/ja/REST/$queryplan.md b/website/translated_docs/ja/REST/$queryplan.md index 3d5358b9cbaa0a..edfd0a70f8c6c2 100644 --- a/website/translated_docs/ja/REST/$queryplan.md +++ b/website/translated_docs/ja/REST/$queryplan.md @@ -4,40 +4,39 @@ title: '$queryplan' --- -Returns the query as it was passed to 4D Server (*e.g.*, `$queryplan=true`) +4D Server に渡したクエリを返します (*例*: `$queryplan=true`) ## 説明 +$queryplan は、4D Server に渡したクエリプランを返します。 -$queryplan returns the query plan as it was passed to 4D Server. +| プロパティ | タイプ | 説明 | +| -------- | ------ | --------------------------------------- | +| item | String | 渡された実際のクエリ | +| subquery | 配列 | (サブクエリが存在する場合) item プロパティを格納する追加のオブジェクト | -| プロパティ | 型 | 説明 | -| -------- | --- | ------------------------------------------------------------------------------------------- | -| item | 文字列 | Actual query executed | -| subquery | 配列 | If there is a subquery, an additional object containing an item property (as the one above) | - - -For more information about query plans, refer to [queryPlan and queryPath](genInfo.md#querypath-and-queryplan). +クエリプランについての詳細は [queryPlan と queryPath](genInfo.md#querypath-と-queryplan) を参照ください。 ## 例題 - -If you pass the following query: - -`GET /rest/People/$filter="employer.name=acme AND lastName=Jones"&$queryplan=true` - -#### Response: - - __queryPlan: { - And: [ - { - item: "Join on Table : Company : People.employer = Company.ID", - subquery: [ - { - item: "Company.name = acme" - } - ] - }, - { - item: "People.lastName = Jones" - } - ] - } \ No newline at end of file +以下のクエリを渡した場合: + + `GET /rest/People/$filter="employer.name=acme AND lastName=Jones"&$queryplan=true` + +#### レスポンス: + +``` +__queryPlan: { + And: [ + { + item: "Join on Table : Company : People.employer = Company.ID", + subquery: [ + { + item: "Company.name = acme" + } + ] + }, + { + item: "People.lastName = Jones" + } + ] +} +``` diff --git a/website/translated_docs/ja/REST/$savedfilter.md b/website/translated_docs/ja/REST/$savedfilter.md index 5b5110be12c4f7..a0269356a75705 100644 --- a/website/translated_docs/ja/REST/$savedfilter.md +++ b/website/translated_docs/ja/REST/$savedfilter.md @@ -3,24 +3,24 @@ id: savedfilter title: '$savedfilter' --- -Saves the filter defined by $filter when creating an entity set (*e.g.*, `$savedfilter="{filter}"`) +エンティティセット作成時に、$filter に定義したフィルターを保存します (*例*: `$savedfilter="{filter}"`) ## 説明 -When you create an entity set, you can save the filter that you used to create it as a measure of security. If the entity set that you created is removed from 4D Server's cache (due to the timeout, the server's need for space, or your removing it by calling [`$method=release`]($method.md#methodrelease)). +エンティティセットを作成する際に使用したフィルターを念のために保存しておくことができます。 4D Server のキャッシュからエンティティセットが削除されてしまっても (たとえばタイムアウトや容量の問題、[`$method=release`]($method.md#methodrelease) 操作によって) 、同じエンティティセットを取り戻すことができます。 -You use `$savedfilter` to save the filter you defined when creating your entity set and then pass `$savedfilter` along with your call to retrieve the entity set each time. +`$savedfilter` を使用してエンティティセット作成時に使ったフィルターを保存したあとは、エンティティセットを取得する度に `$savedfilter` も受け渡します。 -If the entity set is no longer in 4D Server's cache, it will be recreated with a new default timeout of 10 minutes. The entity set will be refreshed (certain entities might be included while others might be removed) since the last time it was created, if it no longer existed before recreating it. +4D Server のキャッシュからエンティティセットが消えていた場合、10分のデフォルトタイムアウトで再作成されます。 エンティティセットが消えていた場合、再作成されるエンティティセットの内容は更新されたものです (新しくエンティティが追加されていたり、存在していたエンティティが削除されていたりする場合がありえます)。 -If you have used both `$savedfilter` and [`$savedorderby`]($savedorderby.md) in your call when creating an entity set and then you omit one of them, the new entity set, which will have the same reference number, will reflect that. +エンティティセットの作成時に `$savedfilter` と [`$savedorderby`]($savedorderby.md) の両方を使用したにも関わらず、次の呼び出しでは片方を省略すると、返されるエンティティセットは同じ参照番号を持ちながら、この変更を反映します。 ## 例題 -In our example, we first call ``$savedfilter` with the initial call to create an entity set as shown below: +エンティティセットを作成する際に `$savedfilter` を使います: `GET /rest/People/?$filter="employer.name=Apple"&$savedfilter="employer.name=Apple"&$method=entityset` -Then, when you access your entity set, you write the following to ensure that the entity set is always valid: +作成したエンティティセットにアクセスする際、そのエンティティセットが有効なのを確実にしたい場合には、次のように書きます: -`GET /rest/People/$entityset/AEA452C2668B4F6E98B6FD2A1ED4A5A8?$savedfilter="employer.name=Apple"` \ No newline at end of file +`GET /rest/People/$entityset/AEA452C2668B4F6E98B6FD2A1ED4A5A8?$savedfilter="employer.name=Apple"` diff --git a/website/translated_docs/ja/REST/$savedorderby.md b/website/translated_docs/ja/REST/$savedorderby.md index 405041f0f81de6..5d44b03fd511bb 100644 --- a/website/translated_docs/ja/REST/$savedorderby.md +++ b/website/translated_docs/ja/REST/$savedorderby.md @@ -3,22 +3,21 @@ id: savedorderby title: '$savedorderby' --- -Saves the order by defined by `$orderby` when creating an entity set (*e.g.*, `$savedorderby="{orderby}"`) +エンティティセット作成時に、`$orderby` に定義した並べ替え情報を保存します (*例*: `$savedorderby="{orderby}"`) ## 説明 -When you create an entity set, you can save the sort order along with the filter that you used to create it as a measure of security. If the entity set that you created is removed from 4D Server's cache (due to the timeout, the server's need for space, or your removing it by calling [`$method=release`]($method.md#methodrelease)). +エンティティセットを作成する際に使用した並べ替え情報を念のために保存しておくことができます。 4D Server のキャッシュからエンティティセットが削除されてしまっても (たとえばタイムアウトや容量の問題、[`$method=release`]($method.md#methodrelease) 操作によって) 、同じエンティティセットを取り戻すことができます。 -You use `$savedorderby` to save the order you defined when creating your entity set, you then pass `$savedorderby` along with your call to retrieve the entity set each time. +`$savedorderby` を使用してエンティティセット作成時に使った並べ替え情報を保存したあとは、エンティティセットを取得する度に `$savedorderby` も受け渡します。 -If the entity set is no longer in 4D Server's cache, it will be recreated with a new default timeout of 10 minutes. If you have used both [`$savedfilter`]($savedfilter.md) and `$savedorderby` in your call when creating an entity set and then you omit one of them, the new entity set, having the same reference number, will reflect that. +4D Server のキャッシュからエンティティセットが消えていた場合、10分のデフォルトタイムアウトで再作成されます。 エンティティセットの作成時に [`$savedfilter`]($savedfilter.md) と `$savedorderby` の両方を使用したにも関わらず、次の呼び出しでは片方を省略すると、返されるエンティティセットは同じ参照番号を持ちながら、この変更を反映します。 ## 例題 +エンティティセットを作成する際に `$savedorderby` を使います: -You first call `$savedorderby` with the initial call to create an entity set: + `GET /rest/People/?$filter="lastName!=''"&$savedfilter="lastName!=''"&$orderby="salary"&$savedorderby="salary"&$method=entityset` -`GET /rest/People/?$filter="lastName!=''"&$savedfilter="lastName!=''"&$orderby="salary"&$savedorderby="salary"&$method=entityset` +作成したエンティティセットにアクセスする際、そのエンティティセットが有効なのを確実にしたい場合には、($savedfilter と $savedorderby を両方使って) 次のように書きます: -Then, when you access your entity set, you write the following (using both $savedfilter and $savedorderby) to ensure that the filter and its sort order always exists: - -`GET /rest/People/$entityset/AEA452C2668B4F6E98B6FD2A1ED4A5A8?$savedfilter="lastName!=''"&$savedorderby="salary"` \ No newline at end of file +`GET /rest/People/$entityset/AEA452C2668B4F6E98B6FD2A1ED4A5A8?$savedfilter="lastName!=''"&$savedorderby="salary"` diff --git a/website/translated_docs/ja/REST/$skip.md b/website/translated_docs/ja/REST/$skip.md index a2fafb88580157..6d4365901849ad 100644 --- a/website/translated_docs/ja/REST/$skip.md +++ b/website/translated_docs/ja/REST/$skip.md @@ -3,16 +3,17 @@ id: skip title: '$skip' --- -Starts the entity defined by this number in the collection (*e.g.*, `$skip=10`) +エンティティセレクション内で、この数値によって指定されたエンティティから処理を開始します (*例*: `$skip=10`) + ## 説明 -`$skip` defines which entity in the collection to start with. By default, the collection sent starts with the first entity. To start with the 10th entity in the collection, pass 10. +`$skip` はセレクション内のどのエンティティから処理を開始するかを指定します。 デフォルトでは、先頭エンティティから開始します。 10番目のエンティティから開始するには、10を渡します。 -`$skip` is generally used in conjunction with [`$top/$limit`]($top_$limit.md) to navigate through an entity collection. +`$skip` は通常、[`$top/$limit`]($top_$limit.md) との組み合わせで使用され、エンティティセレクション内をナビゲートするのに使います。 ## 例題 -In the following example, we go to the 20th entity in our entity set: +エンティティセットの20番目のエンティティ以降を取得します: -`GET /rest/Employee/$entityset/CB1BCC603DB0416D939B4ED379277F02?$skip=20` \ No newline at end of file + `GET /rest/Employee/$entityset/CB1BCC603DB0416D939B4ED379277F02?$skip=20` \ No newline at end of file diff --git a/website/translated_docs/ja/REST/$timeout.md b/website/translated_docs/ja/REST/$timeout.md index 13ec60efe89c06..420cdb2144442a 100644 --- a/website/translated_docs/ja/REST/$timeout.md +++ b/website/translated_docs/ja/REST/$timeout.md @@ -4,18 +4,18 @@ title: '$timeout' --- -Defines the number of seconds to save an entity set in 4D Server's cache (*e.g.*, `$timeout=1800`) +4D Server のキャッシュにエンティティセットが保存される時間 (秒単位) を指定します (*例*: `$timeout=1800`) ## 説明 -To define a timeout for an entity set that you create using [`$method=entityset`]($method.md#methodentityset), pass the number of seconds to `$timeout`. For example, if you want to set the timeout to 20 minutes, pass 1200. By default, the timeout is two (2) hours. +[`$method=entityset`]($method.md#methodentityset) を使って作成するエンティティセットについてタイムアウトを指定するには任意の秒数を `$timeout` に渡します。 たとえば、20分のタイムアウトを設定するには、1200を渡します。 デフォルトのタイムアウトは 2時間です。 -Once the timeout has been defined, each time an entity set is called upon (by using `$method=entityset`), the timeout is recalculated based on the current time and the timeout. +一旦タイムアウトが定義されると、(`$method=entityset` によって) エンティティセットが呼び出される度に現時刻とタイムアウトに基づいて有効期限が再計算されます。 -If an entity set is removed and then recreated using `$method=entityset` along with [`$savedfilter`]($savedfilter.md), the new default timeout is 10 minutes regardless of the timeout you defined when calling `$timeout`. +一度削除されたエンティティセットが `$method=entityset` と [`$savedfilter`]($savedfilter.md) の組み合わせで再作成された場合、`$timeout` で指定していた数値に関わらず、デフォルトタイムアウトは 10分です。 ## 例題 -In our entity set that we're creating, we define the timeout to 20 minutes: +作成するエンティティセットのタイムアウトを 20分に設定します: `GET /rest/Employee/?$filter="salary!=0"&$method=entityset&$timeout=1200` \ No newline at end of file diff --git a/website/translated_docs/ja/REST/$top_$limit.md b/website/translated_docs/ja/REST/$top_$limit.md index 2252494ca9e984..96962166c7c065 100644 --- a/website/translated_docs/ja/REST/$top_$limit.md +++ b/website/translated_docs/ja/REST/$top_$limit.md @@ -3,16 +3,16 @@ id: top_$limit title: '$top/$limit' --- -Limits the number of entities to return (e.g., `$top=50`) +返されるエンティティの数を制限します (例: `$top=50`) ## 説明 -`$top/$limit` defines the limit of entities to return. By default, the number is limited to 100. You can use either keyword: `$top` or `$limit`. +`$top/$limit` は返されるエンティティの数を制限します。 この数字はデフォルトで 100件です。 `$top` および `$limit` のどちらでも利用できます。 -When used in conjunction with [`$skip`]($skip.md), you can navigate through the entity selection returned by the REST request. +[`$skip`]($skip.md) と組み合わせて使用すると、RESTリクエストによって返されるエンティティセレクション内を移動することができます。 ## 例題 -In the following example, we request the next ten entities after the 20th entity: +エンティティセットから、20番目以降の10件のエンティティを取得します: `GET /rest/Employee/$entityset/CB1BCC603DB0416D939B4ED379277F02?$skip=20&$top=10` \ No newline at end of file diff --git a/website/translated_docs/ja/REST/$upload.md b/website/translated_docs/ja/REST/$upload.md index 8fad814678d2b9..b3b30be08cdef8 100644 --- a/website/translated_docs/ja/REST/$upload.md +++ b/website/translated_docs/ja/REST/$upload.md @@ -4,55 +4,57 @@ title: '$upload' --- -Returns an ID of the file uploaded to the server +サーバーにアップロードしたファイルの ID を返します ## 説明 +サーバーにアップロードしたいファイルがある場合にこのリクエストを POST します。 画像の場合には `$rawPict=true` を渡します。 その他のファイルの場合は `$binary=true` を渡します。 -Post this request when you have a file that you want to upload to the Server. If you have an image, you pass `$rawPict=true`. For all other files, you pass `$binary=true`. +デフォルトのタイムアウトは 120秒ですが、`$timeout` パラメーターに任意の数値を渡してタイムアウトを変更できます。 -You can modify the timeout, which by default is 120 seconds, by passing a value to the `$timeout parameter`. +## 画像アップロードの例 +画像をアップロードする前に、Webアプリケーションからのファイルの使用のための HTML 5 ビルトイン API を使ってクライアント上で対象となるファイルオブジェクトを選択しておく必要があります。 ファイルを適切に扱うため、4D はファイルオブジェクトの MIMEタイプ属性を使います。 -## Image upload example +次に、4D Server に選択した画像をアップロードします: -To upload an image, you must first select the file object on the client using the HTML 5 built-in API for using file from a web application. 4D uses the MIME type attribute of the file object so it can handle it appropriately. + `POST /rest/$upload?$rawPict=true` -Then, we upload the selected image to 4D Server: - -`POST /rest/$upload?$rawPict=true` - -**Result**: +**結果**: `{ "ID": "D507BC03E613487E9B4C2F6A0512FE50" }` -Afterwards, you use this ID to add it to an attribute using [`$method=update`]($method.md#methodupdate) to add the image to an entity: + この画像をエンティティに追加するには、返された ID を使い [`$method=update`]($method.md#methodupdate) で画像属性に保存します: -`POST /rest/Employee/?$method=update` + `POST /rest/Employee/?$method=update` -**POST data**: +**POST データ**: - { - __KEY: "12", - __STAMP: 4, - photo: { "ID": "D507BC03E613487E9B4C2F6A0512FE50" } - } - +```` +{ + __KEY: "12", + __STAMP: 4, + photo: { "ID": "D507BC03E613487E9B4C2F6A0512FE50" } +} +```` -**Response**: +**レスポンス**: -The modified entity is returned: +更新後のエンティティが返されます: +```` +{ + "__KEY": "12", + "__STAMP": 5, + "uri": "http://127.0.0.1:8081/rest/Employee(12)", + "ID": 12, + "firstName": "John", + "firstName": "Smith", + "photo": { - "__KEY": "12", - "__STAMP": 5, - "uri": "http://127.0.0.1:8081/rest/Employee(12)", - "ID": 12, - "firstName": "John", - "firstName": "Smith", - "photo": + "__deferred": { - "__deferred": - { - "uri": "/rest/Employee(12)/photo?$imageformat=best&$version=1&$expand=photo", - "image": true - } - },} \ No newline at end of file + "uri": "/rest/Employee(12)/photo?$imageformat=best&$version=1&$expand=photo", + "image": true + } + },} +```` + diff --git a/website/translated_docs/ja/REST/$version.md b/website/translated_docs/ja/REST/$version.md index 5f4f315355da65..f53c8ea6c77d99 100644 --- a/website/translated_docs/ja/REST/$version.md +++ b/website/translated_docs/ja/REST/$version.md @@ -3,16 +3,16 @@ id: version title: '$version' --- -Image version number +画像のバージョン番号 ## 説明 -`$version` is the image's version number returned by the server. The version number, which is sent by the server, works around the browser's cache so that you are sure to retrieve the correct image. +`$version` はサーバーにより返される画像のバージョン番号です。 サーバーより受け取るバージョン番号は、ブラウザーのキャッシュを回避し、正しい画像を取得できるようにします。 -The value of the image's version parameter is modified by the server. +画像の version パラメーターの値はサーバーによって変更されます。 ## 例題 -The following example defines the image format to JPEG regardless of the actual type of the photo and passes the actual version number sent by the server: +photo属性の実際の形式に関わらず、画像形式を JPEG に指定し、サーバーより受け取ったバージョン番号を受け渡している例です: -`GET /rest/Employee(1)/photo?$imageformat=jpeg&$version=3&$expand=photo` \ No newline at end of file + `GET /rest/Employee(1)/photo?$imageformat=jpeg&$version=3&$expand=photo` \ No newline at end of file diff --git a/website/translated_docs/ja/REST/REST_requests.md b/website/translated_docs/ja/REST/REST_requests.md index 5c292b91f80c80..e6f585fa332781 100644 --- a/website/translated_docs/ja/REST/REST_requests.md +++ b/website/translated_docs/ja/REST/REST_requests.md @@ -1,12 +1,12 @@ --- id: REST_requests -title: About REST Requests +title: RESTリクエストについて --- -The following structures are supported for REST requests: +RESTリクエストでは次の構文がサポートされています: -| URI | Resource | {Subresource} | {Querystring} | +| URI | リソース | {サブリソース} | {クエリ文字列} | | -------------------------------- | --------------------------------------------------------------------------- | -------------------------------------------------------------------------- | --------------------------------------------------------------- | | http://{servername}:{port}/rest/ | [{dataClass}](%7BdataClass%7D.html)/ | [{attribute1, attribute2, ...}](manData.html#selecting-attributes-to-get)/ | | | | [{dataClass}](%7BdataClass%7D.html)/ | [{attribute1, attribute2, ...}](manData.html#selecting-attributes-to-get)/ | [{method}](%7BdataClass%7D.html#dataclassmethod) | @@ -20,38 +20,38 @@ The following structures are supported for REST requests: | | [$info]($info.md) | | | -While all REST requests must contain the URI and Resource parameters, the Subresource (which filters the data returned) is optional. +RESTリクエストには、URI とリソースが必ず含まれていなければなりませんが、返されるデータをフィルダーするサブリソースの使用は任意です。 -As with all URIs, the first parameter is delimited by a “?” and all subsequent parameters by a “&”. たとえば: +すべての URI と同様に、先頭パラメーターは "?" に続けて指定し、それ以降のパラメーターは "&" で区切ります。 たとえば: -`GET /rest/Person/?$filter="lastName!=Jones"&$method=entityset&$timeout=600` + `GET /rest/Person/?$filter="lastName!=Jones"&$method=entityset&$timeout=600` +> 曖昧さ回避のため、値は引用符内に書くことができます。 たとえば、上の例では名字 (lastName) の値を単一引用符内に書けます: "lastName!='Jones'"。 -> You can place all values in quotes in case of ambiguity. For example, in our above example, we could have put the value for the last name in single quotes: "lastName!='Jones'". +パラメーターを利用することで、4Dプロジェクトのデータクラスのデータを操作できます。 `GET` HTTPメソッドを使ってデータを取得する以外にも、`POST` HTTPメソッドを使ってデータクラスのエンティティを追加・更新・削除することが可能です。 -The parameters allow you to manipulate data in dataclasses in your 4D project. Besides retrieving data using `GET` HTTP methods, you can also add, update, and delete entities in a datastore class using `POST` HTTP methods. +JSON の代わりに配列形式でデータを取得するには [`$asArray`]($asArray.md) パラメーターを使います。 -If you want the data to be returned in an array instead of JSON, use the [`$asArray`]($asArray.md) parameter. -## REST Status and Response +## RESTステータスとレスポンス +各 RESTリクエストに対し、サーバーはステータスとレスポンス (エラー付き、またはエラー無し) を返します。 -With each REST request, the server returns the status and a response (with or without an error). +### リクエストステータス +RESTリクエストをおこなうと、レスポンスとともにステータスが返されます。 主なステータスをいくつか紹介します: -### Request Status +| ステータス | 説明 | +| ------------------------- | ------------------------------------- | +| 0 | リクエストは処理されませんでした (サーバー未起動の可能性) | +| 200 OK | リクエストはエラーなく処理されました | +| 401 Unauthorized | 権限エラー (ユーザーのアクセス権限を確認する必要があります) | +| 402 No session | セッションの最大数に達しています | +| 404 Not Found | データクラスが REST に公開されていないか、エンティティが存在しません | +| 500 Internal Server Error | RESTリクエスト処理中にエラーが発生しました | -With each REST request, you get the status along with the response. Below are a few of the statuses that can arise: +### レスポンス -| Status | 説明 | -| ------------------------- | -------------------------------------------------------------------------- | -| 0 | Request not processed (server might not be started). | -| 200 OK | Request processed without error. | -| 401 Unauthorized | Permissions error (check user's permissions). | -| 402 No session | Maximum number of sessions has been reached. | -| 404 Not Found | The data class is not accessible via REST or the entity set doesn't exist. | -| 500 Internal Server Error | Error processing the REST request. | +返されるレスポンス (JSON形式) はリクエストによって変わります。 +エラーが発生した場合、その内容はレスポンスとともに返されるか、サーバーのレスポンスそのものになります。 -### Response + -The response (in JSON format) varies depending on the request. - -If an error arises, it will be sent along with the response from the server or it will be the response from the server. \ No newline at end of file diff --git a/website/translated_docs/ja/REST/authUsers.md b/website/translated_docs/ja/REST/authUsers.md index 4a677b3cab0d98..2d1c502c822587 100644 --- a/website/translated_docs/ja/REST/authUsers.md +++ b/website/translated_docs/ja/REST/authUsers.md @@ -1,36 +1,37 @@ --- id: authUsers -title: Users and sessions +title: ユーザーとセッション --- -## Authenticating users +## ユーザー認証 -As a first step to open a REST session on the 4D server, the user sending the request must be authenticated. +4D Server上で RESTセッションを開くには、まずリクエストを送信するユーザーが認証されなければなりません。 -You log in a user to your application by passing the user's name and password to [`$directory/login`]($directory.md#directorylogin). +アプリケーションにユーザーをログインするには、ユーザー名とパスワードを [`$directory/login`]($directory.md#directorylogin) に送信します。 -Once a user is successfully logged, a session is open. See below to know how to handle the session cookie in subsequent client requests, if necessary. +ユーザーのログインと同時にセッションが開かれます。 以降のクライアントリクエストにおけるセッションcookie の扱い方については、後述を参照ください。 -The session will automatically be closed once the timeout is reached. +セッションは、タイムアウトすると自動終了します。 -## Session cookie +## セッションcookie -Each REST request is handled through a specific session on the 4D server. +4D Server上では、各 RESTリクエストは専用セッションを介して処理されます。 -When a first valid REST request is received, the server creates the session and sends a session cookie named `WASID4D` in the **"Set-Cookie" response header**, containing the session UUID, for example: +最初の有効な RESTリクエストを受信すると、サーバーはセッションを生成し、**"Set-Cookie" レスポンスヘッダー** に、セッションUUID を格納した `WASID4D` という名前のセッションcookie を返します。例: - WASID4D=EA0400C4D58FF04F94C0A4XXXXXX3 - +``` +WASID4D=EA0400C4D58FF04F94C0A4XXXXXX3 +``` -In the subsequent REST requests, make sure this cookie is included in the **"Cookie" request header** so that you will reuse the same session. Otherwise, a new session will be opened, and another license used. +以降の RESTリクエストにおいては、**"Cookie" リクエストヘッダー** にこの cookie を含めるようにします。これにより、同じセッションを利用し続けることができます。 そうしない場合には新規セッションが開かれることとなり、したがってライセンスが別途消費されます。 ### 例題 -The way to handle session cookies actually depends on your HTTP client. This example shows how to extract and resend the session cookie in the context of requests handled through the 4D `HTTP Request` command. +実際のところ、セッションcookie の扱いは HTTPクライアントに寄ります。 この例題では、4D の `HTTP Request` コマンドを使ってリクエストを処理する場合に、セッションcookie を抽出し、再送信する方法を示します: ```4d -// Creating headers +// ヘッダーを作成します ARRAY TEXT(headerNames;0) ARRAY TEXT(headerValues;0) @@ -45,21 +46,21 @@ APPEND TO ARRAY(headerValues;Generate digest("test";4D digest)) C_OBJECT($response) $response:=New object -//This request opens a session for the user "kind user" +// このリクエストは "kind user" というユーザーのセッションを開きます $result:=HTTP Request(HTTP POST method;"127.0.0.1:8044/rest/$directory/login";"";\ $response;headerNames;headerValues;*) -//Build new arrays for headers with only the cookie WASID4D +// 以降のリクエストヘッダー用に cookie WASID4D のみを格納した配列を作成します buildHeader(->headerNames;->headerValues) -//This other request will not open a new session +// 次のリクエストは新規セッションを開きません $result:=HTTP Request(HTTP GET method;"127.0.0.1:8044/rest/$catalog";"";\ $response;headerNames;headerValues;*) ``` ```4d -// buildHeader project method +// buildHeader プロジェクトメソッド C_POINTER($pointerNames;$1;$pointerValues;$2) ARRAY TEXT($headerNames;0) @@ -82,4 +83,7 @@ $headerValues{1}:=$uuid COPY ARRAY($headerNames;$1->) COPY ARRAY($headerValues;$2->) -``` \ No newline at end of file +``` + + + diff --git a/website/translated_docs/ja/REST/configuration.md b/website/translated_docs/ja/REST/configuration.md index 74e38a86a6e29e..d42d8e840c5ec0 100644 --- a/website/translated_docs/ja/REST/configuration.md +++ b/website/translated_docs/ja/REST/configuration.md @@ -1,86 +1,90 @@ --- id: configuration -title: Server Configuration +title: サーバー設定 --- -Using standard HTTP requests, the 4D REST Server allows external applications to access the data of your database directly, *i.e.* to retrieve information about the dataclasses in your project, manipulate data, log into your web application, and much more. +4D の RESTサーバーは、標準の HTTPリクエストを用いて外部アプリケーションがデータベースのデータにアクセスすることを可能にします。つまり、プロジェクトのデータクラス情報を取得したり、データを操作したり、Webアプリケーションにログインしたり、といったことが可能です。 -To start using the REST features, you need to start and configure the 4D REST server. +REST機能を使い始めるまえに、まずは 4D REST サーバーの設定をおこない、これを起動させる必要があります。 -> - On 4D Server, opening a REST session requires that a free 4D client licence is available. -> -> - On 4D single-user, you can open up to three REST sessions for testing purposes. -> You need to manage the [session cookie](authUsers.md#session-cookie) to use the same session for your requesting application. +> - 4D Server上では、開かれる RESTセッションにつき、4D Client ライセンスが1消費されます。
    +> - 4Dシングルユーザーにおいては、テスト用に 3つまでの RESTセッションが開けます。 +> 特定のセッションを継続利用するには [セッションcookie](authUsers.md#セッションcookie) を管理する必要があります。 -## Starting the REST Server -For security reasons, by default, 4D does not respond to REST requests. If you want to start the REST Server, you must check the **Expose as REST server** option in the "Web/REST resource" page of the database settings in order for REST requests to be processed. + +## RESTサーバーを開始する + +セキュリティ上の理由により、デフォルトでは、4D は RESTリクエストに応答しません。 RESTサーバーを開始し、RESTリクエストを処理するには、データベース設定の "Web>RESTリソース" ページにて **RESTサーバーとして公開** オプションを有効化する必要があります。 ![alt-text](assets/en/REST/Settings.png) -> REST services use the 4D HTTP server, so you need to make sure that the 4D Web server is started. +> RESTサービスは 4D の HTTPサーバーを使用するため、4D Webサーバーが開始されていることを確認してください。 + +このオプションが有効化されると、「警告: アクセス権が正しく設定されているか確認してください。」という警告メッセージが表示されます。これは REST接続の認証設定がされていない限り、デフォルトではデータベースオブジェクトに自由にアクセスできてしまうためです。 + + +## アクセス権の設定 -The warning message "Caution, check the access privileges" is displayed when you check this option to draw your attention to the fact that when REST services are activated, by default access to database objects is free as long as the REST accesses have not been configured. +デフォルトでは、REST接続はすべてのユーザーに対してオープンですが、この状態はライセンス管理上もセキュリティ上も推奨されません。 -## Configuring REST access +REST接続は次の方法で制限することができます: +- データベース設定の "Web>RESTリソース" ページにて、RESTサービスに割り当てる **読み込み/書き出し** ユーザーグループを設定します; +- `On REST Authentication` データベースメソッドに、RESTの初期リクエストを処理するコードを書きます。 -By default, REST accesses are open to all users which is obviously not recommended for security reasons, and also to control client licenses usage. +> 上に挙げた 2つの方法を同時に使用することはできません。 `On REST Authentication` データベースメソッドを定義した場合、4D は RESTリクエストの処理を同メソッドに委ねます。つまり、データベース設定の "Web>RESTリソース" ページにて指定した "読み込み/書き出し" の設定は無視されます。 -You can configuring REST accesses with one of the following means: -- assigning a **Read/Write** user group to REST services in the "Web/REST resource" page of the Database Settings; -- writing an `On REST Authentication` database method to intercept and handle every initial REST request. +### データベース設定を使用する -> You cannot use both features simultaneously. Once an `On REST Authentication` database method has been defined, 4D fully delegates control of REST requests to it: any setting made using the "Read/Write" menu on the Web/REST resource page of the Database Settings is ignored. +データベース設定の "Web>RESTリソース" ページにある **読み込み/書き出し** 設定は、RESTクエリを使って 4Dデータベースへのリンクを設立することのできる 4Dユーザーのグループを指定します。 -### Using the Database settings +デフォルトでは、メニューには **** が選択されています。これは、REST接続はすべてのユーザーに対してオープンであるという状態を示しています。 グループを指定すると、そのグループに所属する 4Dユーザーアカウントのみが [RESTリクエストを通して 4D にアクセス](authUsers.md) できるようになります。 このグループに所属していないアカウントの場合、4D はリクエストの送信者に対して認証エラーを返します。 -The **Read/Write** menu in the "Web/REST resource" page of the database settings specifies a group of 4D users that is authorized to establish the link to the 4D database using REST queries. +> この設定を使用するには、`On REST Authentication` データベースメソッドを定義してはいけません。 これが定義されている場合は、データベース設定にて指定したアクセス設定は無視されます。 -By default, the menu displays ****, which means that REST accesses are open to all users. Once you have specified a group, only a 4D user account that belongs to this group may be used to [access 4D by means of a REST request](authUsers.md). If an account is used that does not belong to this group, 4D returns an authentication error to the sender of the request. +### On REST Authentication データベースメソッドを使用する +`On REST Authentication` データベースメソッド は 4D 上で RESTセッションの開始を管理するための方法を提供します。 RESTリクエストによって新規セッションが開始される際、このデータベースメソッドは自動的に呼び出されます。 [RESTセッション開始のリクエスト](authUsers.md) を受信すると、そのリクエストヘッダーには接続の識別子が含まれています。 これらの識別子を評価するために `On REST Authentication` データベースメソッドは呼び出されます。 評価にあたっては、4Dデータベースのユーザーリストを使用することもできますし、独自の識別子のテーブルを使用することもできます。 詳細については `On REST Authentication` データベースメソッドの [ドキュメンテーション](https://doc.4d.com/4Dv18/4D/18/On-REST-Authentication-database-method.301-4505004.ja.html) を参照ください。 -> In order for this setting to take effect, the `On REST Authentication` database method must not be defined. If it exists, 4D ignores access settings defined in the Database Settings. -### Using the On REST Authentication database method -The `On REST Authentication` database method provides you with a custom way of controlling the opening of REST sessions on 4D. This database method is automatically called when a new session is opened through a REST request. When a [request to open a REST session](authUsers.md) is received, the connection identifiers are provided in the header of the request. The `On REST Authentication` database method is called so that you can evaluate these identifiers. You can use the list of users for the 4D database or you can use your own table of identifiers. For more information, refer to the `On REST Authentication` database method [documentation](https://doc.4d.com/4Dv18/4D/18/On-REST-Authentication-database-method.301-4505004.en.html). +## テーブルやフィールドの公開 -## Exposing tables and fields +4Dデータベースの RESTサービスが有効化されると、データストアのすべてのテーブルとフィールドおよび格納データが RESTセッションによってデフォルトでアクセス可能です。 たとえば、データベースに [Employee] テーブルが含まれている場合、次のように書くことができます: -Once REST services are enabled in the 4D database, by default a REST session can access all tables and fields of the datastore, and thus use their data. For example, if your database contains an [Employee] table, it is possible to write: +``` +http://127.0.0.1:8044/rest/Employee/?$filter="salary>10000" - http://127.0.0.1:8044/rest/Employee/?$filter="salary>10000" - - +``` +このリクエストで、salary (給与) フィールドが 10000以上の社員データが取得されます。 -This request will return all employees whose salary field is higher than 10000. +> "非表示" 属性を選択されたテーブルやフィールドも、デフォルトで REST に公開されています。 -> 4D tables and/or fields that have the "Invisible" attribute are also exposed in REST by default. +REST 経由でアクセス可能なデータストアオブジェクトを制限するには、アクセス不可にするテーブルやフィールドについて "RESTリソースとして公開" オプションを選択解除する必要があります。 許可されていないリソースへの RESTリクエストがあった場合、4Dはエラーを返します。 -If you want to customize the datastore objects accessible through REST, you must disable the exposure of each table and/or field that you want to hide. When a REST request attempts to access an unauthorized resource, 4D returns an error. +### テーブルの公開 -### Exposing tables +デフォルトでは、すべてのテーブルが REST に公開されています。 -By default, all tables are exposed in REST. +セキュリティ上の理由から、データベースの一部のテーブルのみを公開したい状況もあるでしょう。 たとえば、[Users] テーブルを作成し、その中にユーザー名とパスワードが保存されている場合、そのテーブルは公開しない方が賢明でしょう。 -For security reasons, you may want to only expose certain tables of your datastore to REST calls. For instance, if you created a [Users] table storing user names and passwords, it would be better not to expose it. +テーブルを公開したくない場合は: -To remove the REST exposure for a table: +1. ストラクチャーエディターにて対象となるテーブルを選択し、右クリックでコンテキストメニューを開いてテーブルプロパティを選択します。 -1. Display the Table Inspector in the Structure editor and select the table you want to modify. +2. **RESTリソースとして公開** オプションの選択を解除します: ![alt-text](assets/en/REST/table.png) 公開設定を変更する各テーブルに対して、この手順を繰り返します。 -2. Uncheck the **Expose as REST resource** option: ![alt-text](assets/en/REST/table.png) Do this for each table whose exposure needs to be modified. -### Exposing fields +### フィールドの公開 -By default, all 4D database fields are exposed in REST. +デフォルトでは、すべての 4Dデータベースフィールドが REST に公開されています。 -You may not want to expose certain fields of your tables to REST. For example, you may not want to expose the [Employees]Salary field. +テーブルの一部のフィールドのみを非公開にしたい状況もあるでしょう。 たとえば、[Employees]Salary のようなフィールドは非公開の方がよいでしょう。 -To remove the REST exposure for a field: +フィールドを非公開にするには: -1. Display the Field Inspector in the Structure editor and select the field you want to modify. +1. ストラクチャーエディターにて対象となるフィールドを選択し、右クリックでコンテキストメニューを開いてフィールドプロパティを選択します。 -2. Uncheck the **Expose as REST resource** for the field. ![alt-text](assets/en/REST/field.png) Repeat this for each field whose exposure needs to be modified. +2. フィールドの **RESTリソースとして公開** オプションの選択を解除します: ![alt-text](assets/en/REST/field.png) 公開設定を変更する各フィールドに対して、この手順を繰り返します。 -> In order for a field to be accessible through REST, the parent table must be as well. If the parent table is not exposed, none of its fields will be, regardless of their status. \ No newline at end of file +> あるフィールドが REST を通してアクセス可能であるためには、その親テーブルも公開されている必要があります。 親テーブルが公開されていない場合、各フィールドの公開設定に関わらず、すべてのフィールドがアクセス不可になります。 diff --git a/website/translated_docs/ja/REST/genInfo.md b/website/translated_docs/ja/REST/genInfo.md index 4eafc4cc7c3fcc..e7f64268abc5aa 100644 --- a/website/translated_docs/ja/REST/genInfo.md +++ b/website/translated_docs/ja/REST/genInfo.md @@ -1,36 +1,36 @@ --- id: genInfo -title: Getting Server Information +title: サーバー情報の取得 --- -You can get several information from the REST server: +RESTサーバーの次の情報を取得することができます: -- the exposed datastores and their attributes -- the REST server cache contents, including user sessions. +- 公開されているデータクラスとデータクラス属性 +- RESTサーバーのキャッシュの中身 (ユーザーセッションを含む) -## Catalog +## カタログ -Use the [`$catalog`]($catalog.md), [`$catalog/{dataClass}`]($catalog.md#catalogdataclass), or [`$catalog/$all`]($catalog.md#catalogall) parameters to get the list of [exposed datastore classes and their attributes](configuration.md#exposing-tables-and-fields). +[公開されているデータクラスとデータクラス属性](configuration.md#テーブルやフィールドの公開) のリストを取得するには [`$catalog`]($catalog.md)、[`$catalog/{dataClass}`]($catalog.md#catalogdataclass)、または [`$catalog/$all`]($catalog.md#catalogall) パラメーターを使います。 -To get the collection of all exposed dataclasses along with their attributes: +公開されている全データクラスとデータクラス属性のコレクションを取得するには: `GET /rest/$catalog/$all` -## Cache info -Use the [`$info`]($info.md) parameter to get information about the entity selections currently stored in 4D Server's cache as well as running user sessions. +## キャッシュ情報 -## queryPath and queryPlan +4D Server のキャッシュに保存されているエンティティセレクション、および実行中のユーザーセッションの情報を取得するには [`$info`]($info.md) パラメーターを使います。 -Entity selections that are generated through queries can have the following two properties: `queryPlan` and `queryPath`. To calculate and return these properties, you just need to add [`$queryPlan`]($queryplan.md) and/or [`$queryPath`]($querypath.md) in the REST request. +## queryPath と queryPlan + +クエリによって生成されたエンティティセレクションは、`queryPlan` と `queryPath` という 2つのプロパティを持ちえます。 これらのプロパティを算出・取得するには、RESTリクエストに [`$queryPlan`]($queryplan.md) および [`$queryPath`]($querypath.md) を追加します。 たとえば: `GET /rest/People/$filter="employer.name=acme AND lastName=Jones"&$queryplan=true&$querypath=true` -These properties are objects that contain information about how the server performs composite queries internally through dataclasses and relations: - -- **queryPlan**: object containing the detailed description of the query just before it was executed (i.e., the planned query). -- **queryPath**: object containing the detailed description of the query as it was actually performed. +これらのプロパティは、データクラスやリレーションに対する複合クエリをサーバーが内部的にどのようにおこなっているかの情報を格納するオブジェクトです: +- **queryPlan**: 実行前のクエリについての詳細な情報 (クエリプラン) を格納するオブジェクト。 +- **queryPath**: 実際に実行されたクエリ処理の詳細な情報 (クエリパス) を格納するオブジェクト。 -The information recorded includes the query type (indexed and sequential) and each necessary subquery along with conjunction operators. Query paths also contain the number of entities found and the time required to execute each search criterion. You may find it useful to analyze this information while developing your application. Generally, the description of the query plan and its path are identical but they can differ because 4D can implement dynamic optimizations when a query is executed in order to improve performance. For example, the 4D engine can dynamically convert an indexed query into a sequential one if it estimates that it is faster. This particular case can occur when the number of entities being searched for is low. \ No newline at end of file +情報には、クエリの種類 (インデックスあるいはシーケンシャル)、必要なサブクエリおよびその連結演算子が含まれます。 クエリパスには、見つかったエンティティの数と各検索条件を実行するににかかった時間も含まれます。 この情報は、アプリケーションの開発中に解析することで有効に活用できます。 一般的には、クエリプランとクエリパスの詳細は同一になるはずですが、4D はパフォーマンスの向上のために、動的な最適化をクエリ実行時に実装することがあるからです。 たとえば、その方が早いと判断した場合には、4Dエンジンはインデックス付きクエリをシーケンシャルなものへと動的に変換することがあります。 これは検索されているエンティティの数が少ないときに起こりえます。 \ No newline at end of file diff --git a/website/translated_docs/ja/REST/gettingStarted.md b/website/translated_docs/ja/REST/gettingStarted.md index ce6f415574fd5c..f0e5837d3bc56c 100644 --- a/website/translated_docs/ja/REST/gettingStarted.md +++ b/website/translated_docs/ja/REST/gettingStarted.md @@ -3,128 +3,136 @@ id: gettingStarted title: はじめに --- -4D provides you with a powerful REST server, that allows direct access to data stored in your 4D databases. +4D は、4Dデータベースに格納されているデータへのダイレクトアクセスを可能にする強力な RESTサーバーを提供しています。 -The REST server is included in the 4D and 4D Server applications, it is automatically available in your 4D databases [once it is configured](configuration.md). +RESTサーバーは 4D および 4D Server アプリケーションに含まれており、[設定完了後は](configuration.md) 4Dデータベースにて自動的に利用可能となります。 -This section is intended to help familiarize you with REST functionality by means of a simple example. We are going to: +この章では、簡単な例題を使用して REST機能を紹介します。 これから、実際に次のことをしてみましょう: +- 簡単な 4Dデータベースを作成し、設定します。 +- 標準のブラウザーを開き、REST を介して 4Dデータベースのデータにアクセスします。 -- create and configure a basic 4D database -- access data from the 4D database through REST using a standard browser. +例題が複雑にならないよう、ここでは 4Dアプリケーションとブラウザーを同じマシン上で使用します。 もちろん、リモートアーキテクチャーを使うことも可能です。 -To keep the example simple, we’re going to use a 4D application and a browser that are running on the same machine. Of course, you could also use a remote architecture. -## Creating and configuring the 4D database -1. Launch your 4D or 4D Server application and create a new database. You can name it "Emp4D", for example. +## 4Dデータベースの作成と設定 -2. In the Structure editor, create an [Employees] table and add the following fields to it: - - - Lastname (Alpha) - - Firstname (Alpha) - - Salary (Longint) +1. 4D または 4D Server アプリケーションを起動し、新規データベースを作成します。 名前は仮に "Emp4D" とします。 + +2. ストラクチャーエディターを開き、[Employees] テーブルを作成して、次のフィールドを追加します: + - Lastname (文字列) + - Firstname (文字列) + - Salary (倍長整数) ![](assets/en/REST/getstarted1.png) -> The "Expose a REST resource" option is checked by default for the table and every field; do not change this setting. +> テーブルおよび各フィールドの "RESTリソースとして公開" オプションはデフォルトで選択されています。これを変更しないでください。 -3. Create forms, then create a few employees: +3. フォームを作成し、何名かの社員レコードを作成します: ![](assets/en/REST/getstarted2.png) -4. Display the **Web/REST resource** page of the Database Settings dialog box and [check the Expose as REST server](configuration.md#starting-the-rest-server) option. - -5. In the **Run** menu, select **Start Web Server** (if necessary), then select **Test Web Server**. - -4D displays the default home page of the 4D Web Server. - -## Accessing 4D data through the browser - -You can now read and edit data within 4D only through REST requests. - -Any 4D REST URL request starts with `/rest`, to be inserted after the `address:port` area. For example, to see what's inside the 4D datastore, you can write: - - http://127.0.0.1/rest/$catalog - - -The REST server replies: - - { - "__UNIQID": "96A49F7EF2ABDE44BF32059D9ABC65C1", - "dataClasses": [ - { - "name": "Employees", - "uri": "/rest/$catalog/Employees", - "dataURI": "/rest/Employees" - } - ] - } - - -It means that the datastore contains the Employees dataclass. You can see the dataclass attributes by typing: - - /rest/$catalog/Employees - - -If you want to get all entities of the Employee dataclass, you write: - - /rest/Employees - - -**Response:** - - { - "__entityModel": "Employees", - "__GlobalStamp": 0, - "__COUNT": 3, - "__FIRST": 0, - "__ENTITIES": [ - { - "__KEY": "1", - "__TIMESTAMP": "2020-01-07T17:07:52.467Z", - "__STAMP": 2, - "ID": 1, - "Lastname": "Brown", - "Firstname": "Michael", - "Salary": 25000 - }, - { - "__KEY": "2", - "__TIMESTAMP": "2020-01-07T17:08:14.387Z", - "__STAMP": 2, - "ID": 2, - "Lastname": "Jones", - "Firstname": "Maryanne", - "Salary": 35000 - }, - { - "__KEY": "3", - "__TIMESTAMP": "2020-01-07T17:08:34.844Z", - "__STAMP": 2, - "ID": 3, - "Lastname": "Smithers", - "Firstname": "Jack", - "Salary": 41000 - } - ], - "__SENT": 3 - } - - -You have many possibilities to filter data to receive. For example, to get only the "Lastname" attribute value from the 2nd entity, you can just write: - - /rest/Employees(2)/Lastname - - -**Response:** - - { - "__entityModel": "Employees", - "__KEY": "2", - "__TIMESTAMP": "2020-01-07T17:08:14.387Z", - "__STAMP": 2, - "Lastname": "Jones" - } - - -The 4D [REST API](REST_requests.md) provides various commands to interact with the 4D database. \ No newline at end of file +4. データベース設定の **Web>RESTリソース** ページを開き、[RESTサーバーとして公開](configuration.md#restサーバーを開始する) オプションを選択します。 + +5. 上部の **実行** メニューから、必要に応じて **Webサーバー開始** を選択し、次に同メニューから **Webサーバーテスト** を選択します。 + +規定のブラウザーが開かれ、4D Webサーバーのデフォルトホームページが表示されます。 + + +## ブラウザーから 4D データにアクセスする + +これで、RESTリクエストを使った 4D のデータの読み込み・編集が可能になりました。 + +4D の REST URL リクエストは必ず、`address:port` エリアの後に入る `/rest` から始まります。 たとえば、4Dデータストアの内容を確認するには、次のように書けます: + +``` +http://127.0.0.1/rest/$catalog +``` + +RESTサーバーの応答です: + +``` +{ + "__UNIQID": "96A49F7EF2ABDE44BF32059D9ABC65C1", + "dataClasses": [ + { + "name": "Employees", + "uri": "/rest/$catalog/Employees", + "dataURI": "/rest/Employees" + } + ] +} +``` + +これは、データストアに Employees データクラスが格納されていることを意味します。 データクラス属性を確認するには、次のように書きます: + +``` +/rest/$catalog/Employees +``` + +また、Employees データクラスの全エンティティを取得するには: + +``` +/rest/Employees +``` + +**レスポンス:** + +``` +{ + "__entityModel": "Employees", + "__GlobalStamp": 0, + "__COUNT": 3, + "__FIRST": 0, + "__ENTITIES": [ + { + "__KEY": "1", + "__TIMESTAMP": "2020-01-07T17:07:52.467Z", + "__STAMP": 2, + "ID": 1, + "Lastname": "Brown", + "Firstname": "Michael", + "Salary": 25000 + }, + { + "__KEY": "2", + "__TIMESTAMP": "2020-01-07T17:08:14.387Z", + "__STAMP": 2, + "ID": 2, + "Lastname": "Jones", + "Firstname": "Maryanne", + "Salary": 35000 + }, + { + "__KEY": "3", + "__TIMESTAMP": "2020-01-07T17:08:34.844Z", + "__STAMP": 2, + "ID": 3, + "Lastname": "Smithers", + "Firstname": "Jack", + "Salary": 41000 + } + ], + "__SENT": 3 +} +``` + +取得するデータを様々な条件でフィルターすることも可能です。 たとえば、2番目のエンティティの "Lastname" 属性値のみを取得するには、次のように書きます: + +``` +/rest/Employees(2)/Lastname +``` + +**レスポンス:** + +``` +{ + "__entityModel": "Employees", + "__KEY": "2", + "__TIMESTAMP": "2020-01-07T17:08:14.387Z", + "__STAMP": 2, + "Lastname": "Jones" +} +``` + +4D の [REST API](REST_requests.md) は、4Dデータベースを操作するためのコマンドを多数提供しています。 diff --git a/website/translated_docs/ja/REST/manData.md b/website/translated_docs/ja/REST/manData.md index 4d71919a92f6d3..a2bdd3732fc088 100644 --- a/website/translated_docs/ja/REST/manData.md +++ b/website/translated_docs/ja/REST/manData.md @@ -1,75 +1,85 @@ --- id: manData -title: Manipulating Data +title: データ操作 --- -All [exposed datastore classes, attributes](configuration.md#exposing-tables-and-fields) and methods can be accessed through REST. Dataclass, attribute, and method names are case-sensitive; however, the data for queries is not. +REST によって、すべての [公開されているデータクラス、属性](configuration.md#テーブルやフィールドの公開)、そしてメソッドにアクセスすることができます。 データクラス、属性、およびメソッド名については、文字の大小が区別されます。クエリのデータについては、文字の大小は区別されません。 -## Querying data +## データのクエリ -To query data directly, you can do so using the [`$filter`]($filter.md) function. For example, to find a person named "Smith", you could write: +データを直接クエリするには [`$filter`]($filter.md) 関数を使います。 たとえば、"Smith" という名前の人を検索するには: `http://127.0.0.1:8081/rest/Person/?$filter="lastName=Smith"` -## Adding, modifying, and deleting entities -With the REST API, you can perform all the manipulations to data as you can in 4D. -To add and modify entities, you can call [`$method=update`]($method.md#methodupdate). Before saving data, you can also validate it beforehand by calling [`$method=validate`]($method.md#methodvalidate). If you want to delete one or more entities, you can use [`$method=delete`]($method.md#methoddelete). -Besides retrieving one attribute in a dataclass using [{dataClass}({key})](%7BdataClass%7D_%7Bkey%7D.html), you can also write a method in your datastore class and call it to return an entity selection (or a collection) by using [{dataClass}/{method}](%7BdataClass%7D.html#dataclassmethod). +## エンティティの追加・編集・削除 -Before returning the collection, you can also sort it by using [`$orderby`]($orderby.md) one one or more attributes (even relation attributes). +REST API を使って、4D内と同等のデータ操作をおこなうことができます。 -## Navigating data +エンティティを追加・編集するには [`$method=update`]($method.md#methodupdate) を呼び出します。 1つ以上のエンティティを削除するには [`$method=delete`]($method.md#methoddelete) を使用します。 -Add the [`$skip`]($skip.md) (to define with which entity to start) and [`$top/$limit`]($top_$limit.md) (to define how many entities to return) REST requests to your queries or entity selections to navigate the collection of entities. +[{dataClass}({key})](%7BdataClass%7D.md#dataclasskey) でデータクラスのいちエンティティを取得する以外にも、DataClassクラスにメソッドを書いて [{dataClass}/{method}](%7BdataClass%7D.md#dataclassmethod) のように使い、エンティティセレクションやコレクションを返すようにすることができます。 -## Creating and managing entity set +戻り値としてコレクションを返す前に、[`$orderby`]($orderby.md) を使って一つ以上の属性 (リレーション属性も可) を基準に並べ替えることもできます。 -An entity set (aka *entity selection*) is a collection of entities obtained through a REST request that is stored in 4D Server's cache. Using an entity set prevents you from continually querying your application for the same results. Accessing an entity set is much quicker and can improve the speed of your application. -To create an entity set, call [`$method=entityset`]($method.md#methodentityset) in your REST request. As a measure of security, you can also use [`$savedfilter`]($savedfilter.md) and/or [`$savedorderby`]($savedorderby.md) when you call [`$filter`]($filter.md) and/or [`$orderby`]($orderby.md) so that if ever the entity set timed out or was removed from the server, it can be quickly retrieved with the same ID as before. +## データのナビゲーション -To access the entity set, you must use `$entityset/{entitySetID}`, for example: +エンティティのコレクションをナビゲートするにあたっては、クエリやエンティティセレクションに次の RESTリクエストを追加することができます: [`$skip`]($skip.md) (開始エンティティの指定)、[`$top/$limit`]($top_$limit.md) (返されるエンティティ数の指定)。 + + + +## エンティティセットの作成と管理 + +エンティティセットとは、*エンティティセレクション* と同等の意味で、RESTリクエストによって取得され、4D Server のキャッシュに保存されるエンティティのコレクションのことです。 エンティティセットを利用することで、同じ結果を得るためにアプリケーションを繰り返しクエリすることが避けられます。 エンティティセットへのアクセスはクエリするよりも速いため、アプリケーション速度の向上にもつながります。 + +エンティティセットを作成するには、RESTリクエスト内で [`$method=entityset`]($method.md#methodentityset) を呼び出します。 エンティティセットがタイムアウトした場合やサーバーから削除されてしまった場合への安全対策として、[`$filter`]($filter.md) や [`$orderby`]($orderby.md) を呼び出す際に [`$savedfilter`]($savedfilter.md) および [`$savedorderby`]($savedorderby.md) を使用することで、以前と同じ ID で再取得することができます。 + +エンティティセットにアクセスするには、`$entityset/{entitySetID}` を使います。例: `/rest/People/$entityset/0AF4679A5C394746BFEB68D2162A19FF` -By default, an entity set is stored for two hours; however, you can change the timeout by passing a new value to [`$timeout`]($timeout.md). The timeout is continually being reset to the value defined for its timeout (either the default one or the one you define) each time you use it. -If you want to remove an entity set from 4D Server's cache, you can use [`$method=release`]($method.md#methodrelease). +デフォルトで、エンティティセットは 2時間保存されます。[`$timeout`]($timeout.md) に新しい値を渡すことで、タイムアウトを変更できます。 エンティティセットを使用するたびに、タイムアウトはデフォルト値または指定値にリセットされます。 + +4D Server のキャッシュからエンティティセットを削除したい場合には [`$method=release`]($method.md#methodrelease) を使います。 + +エンティティセット内のエンティティの属性値を編集すると、それらの値が更新されます。 ただし、エンティティセットの生成に使用したクエリ条件に合致する値から合致しない値に変更したとしても、そのエンティティはエンティティセットから削除されません。 エンティティを削除した場合には、エンティティセットからも削除されます。 + +4D Server のキャッシュからエンティティセットが消えていた場合、10分のデフォルトタイムアウトで再作成されます。 エンティティセットが消えていた場合、再作成されるエンティティセットの内容は更新されたものです (新しくエンティティが追加されていたり、存在していたエンティティが削除されていたりする場合がありえます)。 -If you modify any of the entity's attributes in the entity set, the values will be updated. However, if you modify a value that was a part of the query executed to create the entity set, it will not be removed from the entity set even if it no longer fits the search criteria. Any entities you delete will, of course, no longer be a part of the entity set. +[`$entityset/{entitySetID}?$logicOperator... &$otherCollection`]($entityset.md#entitysetentitysetidoperatorothercollection) を使って、事前に作成した 2つのセンティティセットを統合できます。 両セットの内容を統合する (集合の和) ほか、共通のエンティティのみを返したり (集合の積) 、共通でないエンティティのみを返したり (集合の対称差) することができます。 -If the entity set no longer exists in 4D Server's cache, it will be recreated with a new default timeout of 10 minutes. The entity set will be refreshed (certain entities might be included while others might be removed) since the last time it was created, if it no longer existed before recreating it. +この場合m新規のエンティティセレクションが返されます。RESTリクエストの最後に [`$method=entityset`]($method.md#methodentityset) を追加することで新規のエンティティセットを作成することもできます。 -Using [`$entityset/{entitySetID}?$logicOperator... &$otherCollection`]($entityset.md#entitysetentitysetidoperatorothercollection), you can combine two entity sets that you previously created. You can either combine the results in both, return only what is common between the two, or return what is not common between the two. -A new selection of entities is returned; however, you can also create a new entity set by calling [`$method=entityset`]($method.md#methodentityset) at the end of the REST request. -## Calculating data +## データの計算 -By using [`$compute`]($compute.md), you can compute the **average**, **count**, **min**, **max**, or **sum** for a specific attribute in a dataclass. You can also compute all values with the $all keyword. +[`$compute`]($compute.md) を使って、データクラスの任意の属性について、**average**や **count**、**min**、**max**、**sum** といった計算がおこなえます。 $all キーワードを使えば、全種の値を計算できます。 -For example, to get the highest salary: +たとえば、一番高い給与を取得するには: -`/rest/Employee/salary/?$compute=sum` +`/rest/Employee/salary/?$compute=max` -To compute all values and return a JSON object: +全種の値を計算して JSONオブジェクトとして返すには: `/rest/Employee/salary/?$compute=$all` -## Getting data from methods -You can call 4D project methods that are [exposed as REST Service](%7BdataClass%7D.html#4d-configuration). A 4D method can return in $0: +## メソッドを利用したデータ取得 -- an object -- a collection +[RESTサービスとして公開](%7BdataClass%7D.html#4d-configuration) されている 4Dプロジェクトメソッドを呼び出すことができます。 4Dメソッドは次のものを $0 に返せます: -The following example is a dataclass method that reveives parameters and returns an object: +- オブジェクト +- コレクション + +引数を受け取ってオブジェクトを返すデータクラスメソッドの例です: ```4d -// 4D findPerson method +// 4D findPerson メソッド C_TEXT($1;$firstname;$2;$lastname) $firstname:=$1 $lastname:=$2 @@ -77,11 +87,11 @@ $lastname:=$2 $0:=ds.Employee.query("firstname = :1 and lastname = :2";$firstname;$lastname).first().toObject() ``` -The method properties are configured accordingly on the 4D project side: +4Dプロジェクト側では、下図のとおりメソッドプロパティが設定されています: ![alt-text](assets/en/REST/methodProp_ex.png) -Then you can send the following REST POST request, for example using the `HTTP Request` 4D command: +この場合、次のように `HTTP Request` 4Dコマンドを使って REST POSTリクエストを送信できます: ```4d C_TEXT($content) @@ -92,160 +102,170 @@ $content:="[\"Toni\",\"Dickey\"]" $statusCode:=HTTP Request(HTTP POST method;"127.0.0.1:8044/rest/Employee/findPerson";$content;$response) ``` -Method calls are detailed in the [{dataClass}](%7BdataClass%7D.html#dataclassmethod-and-dataclasskeymethod) section. +メソッドの呼び出しについての詳細は [{dataClass}](%7BdataClass%7D.html#dataclassmethod-と-dataclasskeymethod) を参照ください。 -## Selecting Attributes to get +## 取得する属性の選択 -You can always define which attributes to return in the REST response after an initial request by passing their path in the request (*e.g.*, `Company(1)/name,revenues/`) +RESTレスポンスにどの属性を含めて返してもらうかを指定するには、初期リクエストに属性のパスを追加します (*例*: `Company(1)/name,revenues/`)。 -You can apply this filter in the following ways: +このフィルターは次の方法で適用できます: -| オブジェクト | シンタックス | 例題 | -| ---------------------- | --------------------------------------------------- | ------------------------------------------------------------- | -| Dataclass | {dataClass}/{att1,att2...} | /People/firstName,lastName | -| Collection of entities | {dataClass}/{att1,att2...}/?$filter="{filter}" | /People/firstName,lastName/?$filter="lastName='a@'" | -| Specific entity | {dataClass}({ID})/{att1,att2...} | /People(1)/firstName,lastName | -| | {dataClass}:{attribute}(value)/{att1,att2...}/ | /People:firstName(Larry)/firstName,lastName/ | -| エンティティセレクション | {dataClass}/{att1,att2...}/$entityset/{entitySetID} | /People/firstName/$entityset/528BF90F10894915A4290158B4281E61 | +| オブジェクト | シンタックス | 例題 | +| ------------- | --------------------------------------------------- | ------------------------------------------------------------- | +| データクラス | {dataClass}/{att1,att2...} | /People/firstName,lastName | +| エンティティのコレクション | {dataClass}/{att1,att2...}/?$filter="{filter}" | /People/firstName,lastName/?$filter="lastName='a@'" | +| 特定のエンティティ | {dataClass}({ID})/{att1,att2...} | /People(1)/firstName,lastName | +| | {dataClass}:{attribute}(value)/{att1,att2...}/ | /People:firstName(Larry)/firstName,lastName/ | +| エンティティセレクション | {dataClass}/{att1,att2...}/$entityset/{entitySetID} | /People/firstName/$entityset/528BF90F10894915A4290158B4281E61 | +属性名はコンマ区切りで渡します (*例*: `/Employee/firstName,lastName,salary`)。 ストレージ属性およびリレーション属性を渡すことができます。 -The attributes must be delimited by a comma, *i.e.*, `/Employee/firstName,lastName,salary`. Storage or relation attributes can be passed. ### 例題 +エンティティを取得する際に、レスポンスに含める属性を指定する例をいくつか紹介します。 -Here are a few examples, showing you how to specify which attributes to return depending on the technique used to retrieve entities. - -You can apply this technique to: - -- Dataclasses (all or a collection of entities in a dataclass) -- Specific entities -- Entity sets - -#### Dataclass Example - -The following requests returns only the first name and last name from the People datastore class (either the entire datastore class or a selection of entities based on the search defined in `$filter`). - -`GET /rest/People/firstName,lastName/` - -**Result**: - - { - __entityModel: "People", - __COUNT: 4, - __SENT: 4, - __FIRST: 0, - __ENTITIES: [ - { - __KEY: "1", - __STAMP: 1, - firstName: "John", - lastName: "Smith" - }, - { - __KEY: "2", - __STAMP: 2, - firstName: "Susan", - lastName: "O'Leary" - }, - { - __KEY: "3", - __STAMP: 2, - firstName: "Pete", - lastName: "Marley" - }, - { - __KEY: "4", - __STAMP: 1, - firstName: "Beth", - lastName: "Adams" - } - ] - } - +この方法は次を対象に使用できます: -`GET /rest/People/firstName,lastName/?$filter="lastName='A@'"/` +- データクラス (データクラスの全エンティティまたはエンティティのコレクション) +- 特定のエンティティ +- エンティティセット + +#### データクラスの例 + +次のリクエストは、People データクラス (データクラス全体または `$filter` の定義に応じたエンティティセレクション) から名字 (firstName) と名前 (lastName) 属性のみを取得します。 + + `GET /rest/People/firstName,lastName/` -**Result**: - - { - __entityModel: "People", - __COUNT: 1, - __SENT: 1, - __FIRST: 0, - __ENTITIES: [ - { - __KEY: "4", - __STAMP: 4, - firstName: "Beth", - lastName: "Adams" - } - ] - } - - -#### Entity Example - -The following request returns only the first name and last name attributes from a specific entity in the People dataclass: - -`GET /rest/People(3)/firstName,lastName/` - -**Result**: - - { - __entityModel: "People", - __KEY: "3", - __STAMP: 2, - firstName: "Pete", - lastName: "Marley" - } - - -`GET /rest/People(3)/` - -**Result**: - - { - __entityModel: "People", - __KEY: "3", - __STAMP: 2, - ID: 3, - firstName: "Pete", - lastName: "Marley", - salary: 30000, - employer: { - __deferred: { - uri: "http://127.0.0.1:8081/rest/Company(3)", - __KEY: "3" - } + +**結果**: + +```` +{ + __entityModel: "People", + __COUNT: 4, + __SENT: 4, + __FIRST: 0, + __ENTITIES: [ + { + __KEY: "1", + __STAMP: 1, + firstName: "John", + lastName: "Smith" + }, + { + __KEY: "2", + __STAMP: 2, + firstName: "Susan", + lastName: "O'Leary" + }, + { + __KEY: "3", + __STAMP: 2, + firstName: "Pete", + lastName: "Marley" }, - fullName: "Pete Marley", - employerName: "microsoft" - - } - + { + __KEY: "4", + __STAMP: 1, + firstName: "Beth", + lastName: "Adams" + } + ] +} +```` + + +`GET /rest/People/firstName,lastName/?$filter="lastName='A@'"/` + +**結果**: + +```` +{ + __entityModel: "People", + __COUNT: 1, + __SENT: 1, + __FIRST: 0, + __ENTITIES: [ + { + __KEY: "4", + __STAMP: 4, + firstName: "Beth", + lastName: "Adams" + } + ] +} +```` + + +#### 特定エンティティの例 +次のリクエストは、People データクラスの特定エンティティについて、名字 (firstName) と名前 (lastName) 属性のみを取得します。 + + `GET /rest/People(3)/firstName,lastName/` + +**結果**: + +```` +{ + __entityModel: "People", + __KEY: "3", + __STAMP: 2, + firstName: "Pete", + lastName: "Marley" +} +```` + + + `GET /rest/People(3)/` + +**結果**: + +```` +{ + __entityModel: "People", + __KEY: "3", + __STAMP: 2, + ID: 3, + firstName: "Pete", + lastName: "Marley", + salary: 30000, + employer: { + __deferred: { + uri: "http://127.0.0.1:8081/rest/Company(3)", + __KEY: "3" + } + }, + fullName: "Pete Marley", + employerName: "microsoft" + +} +```` + +#### エンティティセットの例 + +[エンティティセットの作成](#エンティティセットの作成と管理) 後に、どの属性を返すかを指定して、エンティティセットの情報をフィルターできます: -#### Entity Set Example + `GET /rest/People/firstName,employer.name/$entityset/BDCD8AABE13144118A4CF8641D5883F5?$expand=employer -Once you have [created an entity set](#creating-and-managing-entity-set), you can filter the information in it by defining which attributes to return: -`GET /rest/People/firstName,employer.name/$entityset/BDCD8AABE13144118A4CF8641D5883F5?$expand=employer +## 画像属性の表示 -## Viewing an image attribute +画像属性の全体像を表示させるには、次のように書きます: -If you want to view an image attribute in its entirety, write the following: + `GET /rest/Employee(1)/photo?$imageformat=best&$version=1&$expand=photo` -`GET /rest/Employee(1)/photo?$imageformat=best&$version=1&$expand=photo` +画像形式についての詳細は [`$imageformat`]($imageformat.md) を参照ください。 version パラメーターについての詳細は [`$version`]($version.md) を参照ください。 -For more information about the image formats, refer to [`$imageformat`]($imageformat.md). For more information about the version parameter, refer to [`$version`]($version.md). +## BLOB属性のディスク保存 -## Saving a BLOB attribute to disk +データクラスに保存されている BLOB をディスクに保存するには、次のように書きます: -If you want to save a BLOB stored in your dataclass, you can write the following: + `GET /rest/Company(11)/blobAtt?$binary=true&$expand=blobAtt` -`GET /rest/Company(11)/blobAtt?$binary=true&$expand=blobAtt` -## Retrieving only one entity +## 1件のエンティティの取得 -You can use the [`{dataClass}:{attribute}(value)`](%7BdataClass%7D.html#dataclassattributevalue) syntax when you want to retrieve only one entity. It's especially useful when you want to do a related search that isn't created on the dataclass's primary key. たとえば: +エンティティを 1件のみ取得したい場合には [`{dataClass}:{attribute}(value)`](%7BdataClass%7D.html#dataclassattributevalue) シンタックスを利用できます。 これは、データクラスの主キーに基づかないリレーション検索をしたい場合に便利です。 たとえば: -`GET /rest/Company:companyCode("Acme001")` \ No newline at end of file + `GET /rest/Company:companyCode("Acme001")` + + diff --git a/website/translated_docs/ja/REST/{dataClass}.md b/website/translated_docs/ja/REST/{dataClass}.md index 210bc556b769d2..5e676c475239f7 100644 --- a/website/translated_docs/ja/REST/{dataClass}.md +++ b/website/translated_docs/ja/REST/{dataClass}.md @@ -7,299 +7,369 @@ title: -Dataclass names can be used directly in the REST requests to work with entities, entity selections, or methods of the dataclass. +エンティティやセンティティセレクション、データクラスのメソッドを利用するにあたって、RESTリクエスト内にデータクラス名を直接使用することができます。 + +## 使用可能なシンタックス + +| シンタックス | 例題 | 説明 | +| ------------------------------------------------------------------------ | --------------------------- | --------------------------------------------------------------- | +| [**{dataClass}**](#dataClass) | `/Employee` | データクラスの全データ (デフォルトでは先頭の 100エンティティ) を返します | +| [**{dataClass}({key})**](#dataclasskey) | `/Employee(22)` | データクラスのプライマリーキーによって特定されるエンティティのデータを返します | +| [**{dataClass}:{attribute}(value)**](#dataclassattributevalue) | `/Employee:firstName(John)` | 指定した属性値を持つ 1件のエンティティのデータを返します | +| [**{dataClass}/{method}**](#dataclassmethod-と-dataclasskeymethod) | `/Employee/getHighSalaries` | プロジェクトメソッドを実行し、オブジェクトまたはコレクションを返します (プロジェクトメソッドは公開されている必要があります) | +| [**{dataClass}({key})/{method}**](#dataclassmethod-と-dataclasskeymethod) | `/Employee(22)/getAge` | エンティティメソッドに基づいて値を返します | -## Available syntaxes -| シンタックス | 例題 | 説明 | -| -------------------------------------------------------------------------- | --------------------------- | ---------------------------------------------------------------------------------------------------- | -| [**{dataClass}**](#dataClass) | `/Employee` | Returns all the data (by default the first 100 entities) for the dataclass | -| [**{dataClass}({key})**](#dataclasskey) | `/Employee(22)` | Returns the data for the specific entity defined by the dataclass's primary key | -| [**{dataClass}:{attribute}(value)**](#dataclassattributevalue) | `/Employee:firstName(John)` | Returns the data for one entity in which the attribute's value is defined | -| [**{dataClass}/{method}**](#dataclassmethod-and-dataclasskeymethod) | `/Employee/getHighSalaries` | Executes a project method and returns an object or a collection (the project method must be exposed) | -| [**{dataClass}({key})/{method}**](#dataclassmethod-and-dataclasskeymethod) | `/Employee(22)/getAge` | Returns a value based on an entity method | ## {dataClass} -Returns all the data (by default the first 100 entities) for a specific dataclass (*e.g.*, `Company`) +特定のデータクラス (*例:* `Company`) の全データ (デフォルトでは先頭の 100エンティティ) を返します。 ### 説明 -When you call this parameter in your REST request, the first 100 entities are returned unless you have specified a value using [`$top/$limit`]($top_$limit.md). +RESTリクエストにこのパラメーターのみを渡すと、(`$top/$limit` を使って指定しない限り) デフォルトで先頭の 100件のエンティティが返されます。

    -Here is a description of the data returned: +返されるデータの説明です: -| プロパティ | 型 | 説明 | -| ------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| __entityModel | 文字列 | Name of the datastore class. | -| __COUNT | 数値 | Number of entities in the datastore class. | -| __SENT | 数値 | Number of entities sent by the REST request. This number can be the total number of entities if it is less than the value defined by `$top/$limit`. | -| __FIRST | 数値 | Entity number that the selection starts at. Either 0 by default or the value defined by `$skip`. | -| __ENTITIES | コレクション | This collection of objects contains an object for each entity with all its attributes. All relational attributes are returned as objects with a URI to obtain information regarding the parent. | +| プロパティ | タイプ | 説明 | +| ------------- | ------ | ------------------------------------------------------------------------------------------ | +| __entityModel | String | データクラスの名称。 | +| __COUNT | 数値 | データクラスに含まれる全エンティティ数 | +| __SENT | 数値 | RESTリクエストが返すエンティティの数。 総エンティティ数が `$top/$limit` で指定された数より少なければ、総エンティティの数になります。 | +| __FIRST | 数値 | セレクションの先頭エンティティの番号。 デフォルトでは 0; または `$skip` で指定された値。 | +| __ENTITIES | コレクション | エンティティ毎にその属性をすべて格納したオブジェクトのコレクションです。 リレーション属性は、リレーション先の情報を取得するための URI を格納したオブジェクトとして返されます。 | -Each entity contains the following properties: +各エンティティには次のプロパティが含まれます: -| プロパティ | 型 | 説明 | -| ----------- | --- | ---------------------------------------------------------------------------------------------------------- | -| __KEY | 文字列 | Value of the primary key defined for the datastore class. | -| __TIMESTAMP | 日付 | Timestamp of the last modification of the entity | -| __STAMP | 数値 | Internal stamp that is needed when you modify any of the values in the entity when using `$method=update`. | +| プロパティ | タイプ | 説明 | +| ----------- | ------ | -------------------------------------------------- | +| __KEY | String | データクラスにおいて定義されているプライマリーキーの値 | +| __TIMESTAMP | 日付 | エンティティが最後に編集された日時を記録するタイムスタンプ | +| __STAMP | 数値 | `$method=update` を使ってエンティティの属性値を更新するときに必要となる内部スタンプ | -If you want to specify which attributes you want to return, define them using the following syntax [{attribute1, attribute2, ...}](manData.md##selecting-attributes-to-get). たとえば: +取得する属性を指定するには、次のシンタックスを使っておこないます: [{attribute1, attribute2, ...}](manData.md#取得する属性の選択)。 たとえば: `GET /rest/Company/name,address` + + + + ### 例題 -Return all the data for a specific datastore class. +特定のデータクラスの全データを取得します。 `GET /rest/Company` -**Result**: - - { - "__entityModel": "Company", - "__GlobalStamp": 51, - "__COUNT": 250, - "__SENT": 100, - "__FIRST": 0, - "__ENTITIES": [ - { - "__KEY": "1", - "__TIMESTAMP": "2020-04-10T10:44:49.927Z", - "__STAMP": 1, - "ID": 1, - "name": "Adobe", - "address": null, - "city": "San Jose", - "country": "USA", - "revenues": 500000, - "staff": { - "__deferred": { - "uri": "http://127.0.0.1:8081/rest/Company(1)/staff?$expand=staff" - } +**結果**: + + + +```` +{ + "__entityModel": "Company", + "__GlobalStamp": 51, + "__COUNT": 250, + "__SENT": 100, + "__FIRST": 0, + "__ENTITIES": [ + { + "__KEY": "1", + "__TIMESTAMP": "2020-04-10T10:44:49.927Z", + "__STAMP": 1, + "ID": 1, + "name": "Adobe", + "address": null, + "city": "San Jose", + "country": "USA", + "revenues": 500000, + "staff": { + "__deferred": { + "uri": "http://127.0.0.1:8081/rest/Company(1)/staff?$expand=staff" } - }, - { - "__KEY": "2", - "__TIMESTAMP": "2018-04-25T14:42:18.351Z", - "__STAMP": 1, - "ID": 2, - "name": "Apple", - "address": null, - "city": "Cupertino", - "country": "USA", - "revenues": 890000, - "staff": { - "__deferred": { - "uri": "http://127.0.0.1:8081/rest/Company(2)/staff?$expand=staff" - } + } + }, + { + "__KEY": "2", + "__TIMESTAMP": "2018-04-25T14:42:18.351Z", + "__STAMP": 1, + "ID": 2, + "name": "Apple", + "address": null, + "city": "Cupertino", + "country": "USA", + "revenues": 890000, + "staff": { + "__deferred": { + "uri": "http://127.0.0.1:8081/rest/Company(2)/staff?$expand=staff" } - }, - { - "__KEY": "3", - "__TIMESTAMP": "2018-04-23T09:03:49.021Z", - "__STAMP": 2, - "ID": 3, - "name": "4D", - "address": null, - "city": "Clichy", - "country": "France", - "revenues": 700000, - "staff": { - "__deferred": { - "uri": "http://127.0.0.1:8081/rest/Company(3)/staff?$expand=staff" - } + } + }, + { + "__KEY": "3", + "__TIMESTAMP": "2018-04-23T09:03:49.021Z", + "__STAMP": 2, + "ID": 3, + "name": "4D", + "address": null, + "city": "Clichy", + "country": "France", + "revenues": 700000, + "staff": { + "__deferred": { + "uri": "http://127.0.0.1:8081/rest/Company(3)/staff?$expand=staff" } - }, - { - "__KEY": "4", - "__TIMESTAMP": "2018-03-28T14:38:07.430Z", - "__STAMP": 1, - "ID": 4, - "name": "Microsoft", - "address": null, - "city": "Seattle", - "country": "USA", - "revenues": 650000, - "staff": { - "__deferred": { - "uri": "http://127.0.0.1:8081/rest/Company(4)/staff?$expand=staff" - } + } + }, + { + "__KEY": "4", + "__TIMESTAMP": "2018-03-28T14:38:07.430Z", + "__STAMP": 1, + "ID": 4, + "name": "Microsoft", + "address": null, + "city": "Seattle", + "country": "USA", + "revenues": 650000, + "staff": { + "__deferred": { + "uri": "http://127.0.0.1:8081/rest/Company(4)/staff?$expand=staff" } } - .....//more entities here - ] - } - + } +.....//more entities here + ] +} +```` + + + + ## {dataClass}({key}) -Returns the data for the specific entity defined by the dataclass's primary key, *e.g.*, `Company(22) or Company("IT0911AB2200")` +データクラスのプライマリーキーによって特定されるエンティティのデータを返します (*例*: `Company(22)` または Company("IT0911AB2200") など)。 + + ### 説明 -By passing the dataclass and a key, you can retrieve all the public information for that entity. The key is the value in the attribute defined as the Primary Key for your datastore class. For more information about defining a primary key, refer to the **Modifying the Primary Key** section in the **Data Model Editor**. +データクラスとキーを渡すことで、公開されているエンティティの情報を取得することができます。 キー (key) は、データクラスに定義されているプライマリーキーの値です。 プライマリーキーの定義についての詳細は、デザインリファレンスマニュアルの **[主キーを設定、削除する](https://doc.4d.com/4Dv18/4D/18/Table-properties.300-4575566.ja.html#1282230)** を参照ください。 -For more information about the data returned, refer to [{datastoreClass}](#datastoreclass). +返されるデータについての詳細は [{dataClass}](#dataclass) を参照ください。 -If you want to specify which attributes you want to return, define them using the following syntax [{attribute1, attribute2, ...}](manData.md##selecting-attributes-to-get). たとえば: +取得する属性を指定するには、次のシンタックスを使っておこないます: [{attribute1, attribute2, ...}](manData.md#取得する属性の選択)。 たとえば: `GET /rest/Company(1)/name,address` -If you want to expand a relation attribute using `$expand`, you do so by specifying it as shown below: +`$expand` を使ってリレーション属性を展開するには、次のように指示します: `GET /rest/Company(1)/name,address,staff?$expand=staff` + + ### 例題 -The following request returns all the public data in the Company datastore class whose key is 1. +次のリクエストは、Company データクラスで主キーが 1 であるエンティティの公開データをすべて返します。 `GET /rest/Company(1)` -**Result**: - - { - "__entityModel": "Company", - "__KEY": "1", - "__TIMESTAMP": "2020-04-10T10:44:49.927Z", - "__STAMP": 2, - "ID": 1, - "name": "Apple", - "address": Infinite Loop, - "city": "Cupertino", - "country": "USA", - "url": http://www.apple.com, - "revenues": 500000, - "staff": { - "__deferred": { - "uri": "http://127.0.0.1:8081/rest/Company(1)/staff?$expand=staff" - } +**結果**: + + + +```` +{ + "__entityModel": "Company", + "__KEY": "1", + "__TIMESTAMP": "2020-04-10T10:44:49.927Z", + "__STAMP": 2, + "ID": 1, + "name": "Apple", + "address": Infinite Loop, + "city": "Cupertino", + "country": "USA", + "url": http://www.apple.com, + "revenues": 500000, + "staff": { + "__deferred": { + "uri": "http://127.0.0.1:8081/rest/Company(1)/staff?$expand=staff" } } - +} +```` + + + + + ## {dataClass}:{attribute}(value) -Returns the data for one entity in which the attribute's value is defined +指定した属性値を持つ 1件のエンティティのデータを返します + + ### 説明 -By passing the *dataClass* and an *attribute* along with a value, you can retrieve all the public information for that entity. The value is a unique value for attribute, but is not the primary key. +*dataClass* に加えて *attribute (属性)* および *value (値)*を渡すことで、当該エンティティの公開データをすべて取得できます。 指定する値は、その属性において一意のものですが、主キーではありません。 `GET /rest/Company:companyCode(Acme001)` -If you want to specify which attributes you want to return, define them using the following syntax [{attribute1, attribute2, ...}](manData.md##selecting-attributes-to-get). たとえば: +取得する属性を指定するには、次のシンタックスを使っておこないます: [{attribute1, attribute2, ...}](manData.md#取得する属性の選択)。 たとえば: `GET /rest/Company:companyCode(Acme001)/name,address` -If you want to use a relation attribute using [$attributes]($attributes.md), you do so by specifying it as shown below: +[$attributes]($attributes.md) を使ってリレーション属性を使用するには、次のように指示します: `GET /rest/Company:companyCode(Acme001)?$attributes=name,address,staff.name` + + ### 例題 -The following request returns all the public data of the employee named "Jones". +次のリクエストは、名前が "Jones" である社員 (Employee) の公開データをすべて返します。 `GET /rest/Employee:lastname(Jones)` -## {dataClass}/{method} and {dataClass}({key})/{method} -Returns an object or a collection based on a project method. + + +## {dataClass}/{method} と {dataClass}({key})/{method} + +プロジェクトメソッドに基づいて、オブジェクトまたはコレクションを返します. + + ### 説明 -Project methods are called through a dataclass (table) or an entity (record), and must return either an object or a collection. +プロジェクトメソッドは、データクラス (テーブル) またはエンティティ (レコード) を介して呼び出され、オブジェクトまたはコレクションを返さねばなりません。 `POST /rest/Employee/getHighSalaries` `POST /rest/Employee(52)/getFullName` -### 4D Configuration -To be called in a REST request, a method must: -- have been declared as "Available through REST server" in 4D, -- have its master table and scope defined accordingly: - - **Table**: 4D table (i.e. dataclass) on which the method is called. The table must be [exposed to REST](configuration.md#exposing-tables-and-fields). - - **Scope**: This setting is useful when the method uses the 4D classic language and thus, needs to have a database context on the server side. - - **Table** -for methods applied to the whole table (dataclass) - - **Current record** -for methods applied to the current record (entity) using the `{dataClass}(key)/{method}` syntax. - - **Current selection** -for methods applied to the current selection + +### 4D の設定 + +RESTリクエストによってメソッドを呼び出せるようにするには: + +- そのメソッドプロパティの "公開オプション" で RESTサーバーが選択されていなければなりません。 +- そのメソッドのマスターテーブルとスコープが定義されている必要があります: + - **テーブル**: メソッドコールを介する 4D テーブル (データクラス)。 このテーブルも [RESTリソースとして公開](configuration.md#テーブルやフィールドの公開) されている必要があります。 + - **スコープ**: メソッドがクラシックな 4Dランゲージを使用しており、サーバーサイドにおいてデータベースのコンテキストが必要な場合に、この設定が適用されます。 + - **テーブル** - テーブル (データクラス) 全体に対して適用されるメソッドの場合 + - **カレントレコード** - `{dataClass}(key)/{method}` シンタックスを使って、カレントレコード (エンティティ) に対して適用されるメソッドの場合 + - **カレントセレクション** - カレントセレクションに対して適応されるメソッドの場合 ![alt-text](assets/en/REST/MethodProp.png) -### Passing Parameters to a Method -You can also pass parameters to a method in a POST. + + +### メソッドへの引数の渡し方 + +POST を使って、メソッドに引数を渡すことができます。 `POST /rest/Employee/addEmployee` -You can POST data in the body part of the request, for example: +POSTリクエストの本文にデータを含めます。たとえば: ["John","Smith"] + + + + + ### 例題 -#### Table scope -Call of a `getAverage` method: -- on [Employee] table -- with **Table** scope +#### テーブルスコープ + +`getAverage` メソッドをコールします: + +- マスターテーブルは [Employee] +- スコープは **テーブル** + + + ```4d - //getAverage + // getAverage メソッド ALL RECORDS([Employee]) $0:=New object("ageAverage";Average([Employee]age)) ``` + `POST /rest/Employee/getAverage` -Result: +結果: - { - "result": { - "ageAverage": 44.125 - } + +``` +{ + "result": { + "ageAverage": 44.125 } - +} +``` + + + + + + +#### カレントレコードスコープ -#### Current record scope +`getFullName` メソッドをコールします: + +- マスターテーブルは [Employee] +- スコープは **カレントレコード** -Call of a `getFullName` method: -- on [Employee] table -- with **Current record** scope ```4d - //getFullName + // getFullName メソッド $0:=New object("fullName";[Employee]firstname+" "+[Employee]lastname) ``` + `POST /rest/Employee(3)/getFullName` -Result: +結果: - { - "result": { - "fullName": "John Smith" - } + +``` +{ + "result": { + "fullName": "John Smith" } - +} +``` + + + + -#### Current selection scope -Call of a `updateSalary` method: +#### カレントセレクションスコープ + +`updateSalary` メソッドをコールします: + +- マスターテーブルは [Employee] +- スコープは **カレントセレクション** + -- on [Employee] table -- with **Current selection** scope ```4d - //updateSalary + // updateSalary メソッド C_REAL($1;$vCount) READ WRITE([Employee]) $vCount:=0 @@ -314,14 +384,19 @@ UNLOAD RECORD([Employee]) $0:=New object("updates";$vCount) ``` + `POST /rest/Employee/updateSalary/?$filter="salary<1500"` POST data (in the request body): [1.5] -Result: +結果: + + +``` +{ + "result": { + "updated": 42 + } +} +``` - { - "result": { - "updated": 42 - } - } \ No newline at end of file diff --git a/website/translated_docs/ja/Users/handling_users_groups.md b/website/translated_docs/ja/Users/handling_users_groups.md index 4150c3de1456aa..e0baca2a376de5 100644 --- a/website/translated_docs/ja/Users/handling_users_groups.md +++ b/website/translated_docs/ja/Users/handling_users_groups.md @@ -1,151 +1,153 @@ --- id: editing -title: Managing 4D users and groups +title: 4Dユーザー&グループの管理 --- -## Designer and Administrator +## デザイナーと管理者 -4D provides users with certain standard access privileges and certain powers. Once a users and groups system has been initiated, these standard privileges take effect. +4Dは、ユーザーに対して標準的なアクセス権と特定の権限を与えます。 ユーザー&グループシステムが起動されると、これらの標準的な権限が有効になります。 -The most powerful user is named **Designer**. No aspect of the database is closed to the Designer. The Designer can: +最も強力なユーザーは **デザイナー (Designer)** です。 デザイナーは、データベースに関するあらゆる操作をおこなうことができます。 デザイナーは次のことができます: +- 制限なく、すべてのデータベースサーバーにアクセスする。 +- ユーザーやグループを作成する。 +- グループにアクセス権を割り当てる。 +- デザインモードを使用する。 シングルユーザー環境では、常にデザイナーアクセス権が使用されます。 クライアント/サーバー環境においては、デザイナーにパスワードを割り当てることで、4Dユーザーログインダイアログが表示されるようになります。 この環境では、デザインモードは読み取り専用です。 -- access all database servers without restriction, -- create users and groups, -- assign access privileges to groups, -- access the Design environment. In single-user environment, Designer access rights are always used. In client/server environment, assigning a password to the Designer activates the display of the 4D user login dialog. Access to Design environment is read-only. +デザイナーの次に強力なユーザーは **管理者 (Administrator)**であり、通常はパスワードアクセスシステムや管理機能を扱う役割を与えられています。 -After the Designer, the next most powerful user is the **Administrator**, who is usually given the tasks of managing the access system and administration features. +管理者は次のことができます: +- ユーザーやグループを作成する。 +- 4D Server 管理ウィンドウとモニターにアクセスする。 +- バックアップ、復元、サーバーの監視のため、MSC にアクセスする。 -The Administrator can: +管理者は次のことができません: +- デザイナーユーザーを編集する。 +- データベースの保護された領域にアクセスする。 とくにデザインモードが制限されている場合には、管理者はアクセスすることができません。 管理者がデータベース内でアクセス権を得るには、1つ以上のグループに属さなければなりません。 管理者はすべての新規グループに含まれますが、任意のグループから管理者の名前を取り除くことができます。 -- create users and groups, -- access the 4D Server Administration window and monitor -- access the MSC window to monitor backup, restore, or server. +デザイナーと管理者は、すべてのデータベースにおいてデフォルトで利用可能です。 [ユーザー管理のダイアログボックス](#ユーザーエディター)において、デザイナーと管理者のアイコンは、それぞれ赤色と緑色で表示されます: -The Administrator cannot: +- デザイナーアイコン: ![](assets/en/Users/iconDesigner.png) +- 管理者アイコン: ![](assets/en/Users/iconAdmin.png) -- edit the Designer user -- by default, access to protected parts of the database. In particular, the Administrator cannot access to the Design mode if it is restricted. The Administrator must be part of one or more groups to have access privileges in the database. The Administrator is placed in every new group, but you can remove the Administrator’s name from any group. +デザイナーと管理者の名前は変更することができます。 ランゲージにおいて、デザイナーと管理者の ID値は、常に 1 と 2 に設定されます。 -Both the Designer and Administrator are available by default in all databases. In the [user management dialog box](#users-and-groups-editor), the icons of the Designer and Administrator are displayed in red and green respectively: +デザイナーと管理者は、それぞれ 16,000 のグループと 16,000 のユーザーを作成することができます。 -- Designer icon: ![](assets/en/Users/IconDesigner.png) -- Administrator icon: ![](assets/en/Users/IconAdmin.png) -You can rename the Designer and Administrator users. In the language, the Designer ID is always 1 and the Administrator ID is always 2. -The Designer and Administrator can each create up to 16,000 groups and 16,000 users. +## ユーザーエディター -## Users editor - -The editor for users is located in the Toolbox of 4D. +ユーザーのエディターは 4Dのツールボックスにあります。 ![](assets/en/Users/editor.png) -### Adding and modifying users +### ユーザーの追加と変更 + +ユーザーエディターを使用して、ユーザーアカウントの作成やプロパティの設定、各グループへの割り当てをおこないます。 -You use the users editor to create user accounts, set their properties and assign them to various groups. +ユーザーを追加するには: -To add a user from the Toolbox : +1. **デザイン** メニューから **ツールボックス>ユーザー** を選択、または 4Dツールバーの **ツールボックス** ボタンをクリックします。 4Dはユーザーエディターを表示します。 -1. Select **Tool Box > Users** from the **Design** menu or click on the **Tool Box** button of the 4D toolbar. 4D displays the users editor. +ユーザーリストには、[デザイナーと管理者](#デザイナーと管理者) を含むすべてのユーザーが表示されます: -The list of users displays all the users, including the [Designer and the Administrator](#designer-and-administrator). +2. ユーザーリストの下にある追加ボタン ![](assets/en/Users/PlussNew.png) をクリックします。 または
    ユーザーリスト上で右クリックし、コンテキストメニューから **追加** または **複製** を選択する。 -2. Click on the ![](assets/en/Users/PlussNew.png) button located below the list of users. OR Right-click in the list of users and choose **Add** or **Duplicate** in the context menu. +> **複製** コマンドを使用すると、同じ特性を持つ複数のユーザーを素早く作成することができます。 -> The **Duplicate** command can be used to create several users having the same characteristics quickly. +4D は新規ユーザーをリストに追加し、デフォルトとして "新規ユーザーX" という名前を設定します。 -4D adds a new user to the list, named "New userX" by default. +3. 新しいユーザー名を入力します。 この名前は、ユーザーがデータベースを開く際に使用されます。 ユーザー名をいつでも変更することができます。変更するにはコンテキストメニューの **名称変更** コマンドを使用するか、Alt+クリック (Windows) または Option+クリック (macOS) ショートカットを使用、または変更したい名前を 2回クリックします。 -3. Enter the user name. This name will be used by the user to open the database. You can rename a user at any time using the **Rename** command of the context menu, or by using the Alt+click (Windows) or Option+click (macOS) shortcuts, or by clicking twice on the name you want to change. +4. ユーザーのパスワードを設定するには、プロパティエリアで **編集...** ボタンをクリックして、ダイアログボックスの 2つのパスワード欄に同じパスワードをそれぞれ入力します。 パスワードには 15桁までの英数字を使用することができます。 パスワードでは文字の大小が区別されます。 -4. To enter a password for the user, click the **Edit...** button in the user properties area and enter the password twice in the dialog box. You can use up to 15 alphanumeric characters for a password. The password editor is case sensitive. +> データベース設定の "セキュリティ" ページで許可されていれば、ユーザーは自分のパスワードを変更できます。また、パスワードは `CHANGE PASSWORD` コマンドを使って変更することもできます。 -> Users can change their password at any time according to the options in the "Security" page of the database settings, or using the `CHANGE PASSWORD` command. +5. グループメンバー表を用いて、そのユーザーが所属するグループを設定します。 メンバーカラムの該当するオプションをチェックして、選択したユーザーをグループに対して追加・削除することができます。 -5. Set the group(s) to which the user belongs using the "Member of Groups" table. You can add or remove the selected user to/from a group by checking the corresponding option in the Member column. +[グループページ](#グループの設定) を使用して、各グループの所属ユーザーを設定することもできます。 -The membership of users to different groups can also be set by group on the [Groups page](#configuring-access-groups). +### ユーザーの削除 -### Deleting a user +ユーザーを削除するには、そのユーザーを選択してから削除ボタンをクリックするか、またはコンテキストメニューの **削除** コマンドを使用します。 ![](assets/en/Users/MinussNew.png) -To delete a user, select it then click the deletion button or use the **Delete** command of the context menu. ![](assets/en/Users/MinussNew.png) +削除されたユーザー名は、その後ユーザーエディターには表示されません。 削除されたユーザーの ID番号は、新規アカウント作成の際に再度割り当てられるという点に注意してください。 -Deleted user names no longer appear in the Users editor. Note that the IDs for deleted users are reassigned when new user accounts are created. +### ユーザープロパティ -### User properties +- **ユーザーの種類**: "デザイナー"、"管理者"、または (それ以外のすべてのユーザーの場合にあ) "ユーザー" -- **User Kind**: The User Kind field contains "Designer", "Administrator", or (for all other users) "User". +- **開始メソッド**: ユーザーがデータベースを開いたときに自動実行されるメソッドの名称 (任意) このメソッドを使って、たとえばユーザー設定をロードできます。 -- **Startup Method**: Name of an associated method that will be automatically executed when the user opens the database (optional). This method can be used for example to load the user preferences. -## Groups editor +## グループエディター -The editor for groups is located in the Toolbox of 4D. +グループのエディターは 4Dのツールボックスにあります。 -### Configuring groups +### グループの設定 -You use the groups editor to set the elements that each group contains (users and/or other groups) and to distribute access to plug-ins. +グループエディターを使用して、各グループ内に納める要素 (ユーザーや他のグループ) を設定したり、プラグインへのアクセス権を割り当てることができます。 -Keep in mind that once a group has been created, it cannot be deleted. If you want to deactivate a group, you just need to remove any users it contains. +グループは一旦作成されると、削除できないということに留意が必要です。 グループを使用したくない場合は、そのグループの所属ユーザーをすべて取り除きます。 -To create a group: +グループを作成するには: -1. Select **Tool Box > Groups** in the **Design** menu or click on the **Tool Box** button of the 4D toolbar then on the **Groups** button. 4D displays the groups editor window. The list of groups displays all the groups of the database. +1. **デザイン** メニューから **ツールボックス>ユーザーグループ** を選択、または 4Dツールバーの **ツールボックス** ボタンをクリックし、**グループ** ページを開きます。 4D はグループエディターウインドウを表示します: グループリストには、データベースのすべてのグループが表示されます。 -2. Click on the ![](assets/en/Users/PlussNew.png) button located below the list of groups. - OR - Right-click in the list of groups and choose the **Add** or **Duplicate** command in the context menu. +2. グループリストの下にある追加ボタン ![](assets/en/Users/PlussNew.png) をクリックします。 + または + グループリスト上で右クリックし、コンテキストメニューから **追加** または **複製** を選択します。 -> The Duplicate command can be used to create several groups having the same characteristics quickly. +> 複製コマンドを使用すると、同じ特性を持つ複数のグループを素早く作成することができます。 -4D adds a new group to the list, named "New groupX" by default. +4D は新規グループをリストに追加し、デフォルトとして "新規グループX" という名前を設定します。 -3. Enter the name of the new group. The group name can be up to 15 characters long. You can rename a group at any time using the **Rename** command of the context menu, or by using the Alt+click (Windows) or Option+click (macOS) shortcuts, or by clicking twice on the name you want to change. +3. 新しいグループの名前を入力します。 グループ名には 15桁までの文字を使用できます。 グループ名をいつでも変更することができます。変更するにはコンテキストメニューの **名称変更** コマンドを使用するか、Alt+クリック (Windows) または Option+クリック (macOS) ショートカットを使用、または変更したい名前を 2回クリックします。 -### Placing users or groups into groups -You can place any user or group into a group, and you can also place the group itself into several other groups. It is not mandatory to place a user in a group. +### ユーザーやグループをグループに入れる -To place a user or group in a group, you simply need to check the "Member" option for each user or group in the member attribution area: +任意のユーザーやグループをグループ内に配置することができます。さらに、そのグループ自体を他のいくつかのグループ内に入れることも可能です。 必ずしもユーザーをグループに入れる必要はありません。 + +ユーザーやグループをグループに配置するには、当該グループのユーザー/グループ一覧にてメンバーカラムにチェックを入れます: ![](assets/en/Users/groups.png) -If you check the name of a user, this user is added to the group. If you check the name of a group, all the users of the group are added to the new group. The affiliated user or group will then have the same access privileges as those assigned to the new group. +ユーザー名をチェックすると、そのユーザーがグループに追加されます。 グループ名をチェックした場合は、そのグループの全ユーザーがグループへ追加されます。 メンバーの一員となったユーザーやグループには、そのグループに割り当てられたものと同じアクセス権が与えられます。 -Placing groups into other groups lets you create a user hierarchy. The users of a group placed in another group will have the access privileges of both groups. See "[An access hierarchy scheme](#an-access-hierarchy-scheme)" below. +グループを別のグループ内に入れることにより、ユーザーの階層構造が作成されます。 別のグループの配下に入れられたグループのユーザーは、両グループのアクセス権を保持します。 後述の [アクセス権の階層構造](#アクセス権の階層構造) を参照してください。 -To remove a user or group from another group, you just need to deselect the corresponding option in the member attribution area. +ユーザーやグループをグループから取り除くには、ユーザー/グループ一覧でチェックを解除します。 -### Assigning a group to a plug-in or to a server +### プラグインやサーバーにグループを割り当てる -You can assign a group privileges to any plug-ins installed in the database. This includes all the 4D plug-ins and any third-party plug-ins. +データベースにインストールされたプラグインへのアクセス権をグループに割り当てることができます。 これには 4D のプラグインと任意のサードパーティープラグインが含まれます。 -Distributing access to the plug-ins lets you control the use of the licenses you possess for these plug-ins. Any users that do not belong to the access group of a plug-in cannot load this plug-in. +プラグインへのアクセス権を割り当てると、所有するプラグインライセンスの使用を管理できるようになります。 プラグインのアクセスグループに属さないユーザーは、そのプラグインをロードすることができません。 -You can also restrict the use of the 4D Client Web server and SOAP server via the plug-in access area. +また、プラグインアクセスエリアを使用して、4D Client Webサーバーと SOAPサーバーの使用を制限することも可能です。 -The “Plug-in” area on the Groups page of the tool box lists all the plug-ins loaded by the 4D application. To give a group access to a plug-in, you simply need to check the corresponding option. +ツールボックスのグループページにある "プラグイン" エリアには、4Dアプリケーションによりロードされたプラグインがすべて表示されます。 プラグインへのアクセス権をグループに与えるには、該当するオプションをチェックします。 ![](assets/en/Users/plugins.png) -The **4D Client Web Server** and **4D Client SOAP Server** items lets you control the possibility of Web and SOAP (Web Services) publication for each 4D in remote mode. These licenses are considered as plug-in licenses by 4D Server. Therefore, in the same way as for plug-ins, you can restrict the right to use these licenses to a specific group of users. +**4D Client Web Server** や **4D Client SOAP Server** 項目を使用し、リモートモードの 4D がそれぞれ Web および SOAP (Webサービス) 公開をおこなえるかどうかを管理することができます。 これらのライセンスは 4D Server 側ではプラグインライセンスとしてみなされます。 したがって、プラグインと同じ方法で、これらのライセンスの使用権を特定のユーザーグループに限定することができます。 + -### An access hierarchy scheme +### アクセス権の階層構造 -The best way to ensure the security of your database and provide users with different levels of access is to use an access hierarchy scheme. Users can be assigned to appropriate groups and groups can be nested to create a hierarchy of access rights. This section discusses several approaches to such a scheme. +データベースのセキュリティを確保し、ユーザーに異なるアクセスレベルを提供する最も効果的な方法は、アクセス権の階層構造を利用することです。 ユーザーを適切なグループに割り振り、各グループをネストすることで、アクセス権の階層構造を形成できます。 この節では、このような構造の取り扱い方について説明します。 -In this example, a user is assigned to one of three groups depending on their level of responsibility. Users assigned to the Accounting group are responsible for data entry. Users assigned to the Finances group are responsible for maintaining the data, including updating records and deleting outdated records. Users assigned to the General Management group are responsible for analyzing the data, including performing searches and printing analytical reports. +この例題では、ユーザーは担当業務に応じて 3つあるグループの 1つに割り振られます。 データ入力担当のユーザーは、Accounting (会計) グループに割り当てます。 レコードの更新や無効データの削除などデータ管理を担当するユーザーは、Finances (財務) グループに割り当てます。 検索の実行や分析レポートの印刷などデータ分析を担当するユーザーは、General Management (総合管理) グループに割り当てます。 -The groups are then nested so that privileges are correctly distributed to the users of each group. +割り当て完了後は、各グループのユーザーに権限が正しく配分されるようにグループをネストします。 -- The General Management group contains only “high-level” users. ![](assets/en/Users/schema1.png) +- General Managementグループには "高レベル" のユーザーだけが含まれます。 ![](assets/en/Users/schema1.png) -- The Finances group contains data maintenance users as well as General Management users, thus the users in General Management have the privileges of the Finances group as well. ![](assets/en/Users/schema2.png) +- Financesグループには、データ管理ユーザーと General Managementグループが含まれます。したがって、General Managementグループのユーザーは Financesグループの権限も保持します。 ![](assets/en/Users/schema2.png) -- The Accounting group contains data entry users as well as Finances group users, so the users who belong to the Finances group and the General Management group enjoy the privileges of the Accounting group as well. ![](assets/en/Users/schema3.png) +- Accountingグループには、データ入力をおこなうユーザーと Financesグループが含まれます。したがって、Financesグループのユーザーと General Managementグループのユーザーは Accountingグループの権限も利用できます。 ![](assets/en/Users/schema3.png) -You can decide which access privileges to assign to each group based on the level of responsibility of the users it includes. +所属ユーザーの責務に基づいて、各グループに割り当てるアクセス権を決定します。 -Such a hierarchical system makes it easy to remember to which group a new user should be assigned. You only have to assign each user to one group and use the hierarchy of groups to determine access. \ No newline at end of file +このような階層システムを使用すると、新規ユーザーに割り当てるべきグループがわかりやすくなります。 各ユーザーを 1つのグループに割り当てるだけで、グループの階層を介してアクセス権を決定できます。 diff --git a/website/translated_docs/ja/Users/overview.md b/website/translated_docs/ja/Users/overview.md index 6bd6a533cfca54..0aa670a64a0ba2 100644 --- a/website/translated_docs/ja/Users/overview.md +++ b/website/translated_docs/ja/Users/overview.md @@ -3,57 +3,69 @@ id: overview title: 概要 --- -If more than one person uses a database, which is usually the case in client-server architecture or Web interfaces, you need to control access or provide different features according to the connected users. It is also essential to provide security for sensitive data. You can provide this security by assigning passwords to users and creating access groups that have different levels of access to information in the database or to database operations. +クライアントサーバーアーキテクチャーや Webインターフェースなど、複数のユーザーがデータベースを使用する場合は、アクセスを制御したり、接続ユーザーに応じて異なる機能を提供したりする必要が生じます。 機密性の高いデータを保護することは重要です。 ユーザーにパスワードを割り当て、データやデータベース操作へのアクセスレベルが異なるアクセスグループを作成することで、これらのデータを保護することができます。 -> For an overview of 4D's security features, see the [4D Security guide](https://blog.4d.com/4d-security-guide/). +> 4Dのセキュリティ機能の概要については、[4D Security guide](https://blog.4d.com/4d-security-guide/) をご覧ください。 -## Assigning group access -4D’s password access system is based on users and groups. You create users and assign passwords, put users in groups, and assign each group access rights to appropriate parts of the database. -Groups can then be assigned access privileges to specific parts or features of the database (Design access, HTTP server, SQL server, etc.), or any custom part. -The following example shows Design and Runtime explorer access rights being assigned to the "Devs" group: + +## 権限を割り当てる + +4D のパスワードアクセスシステムは、ユーザーとグループに基づいています。 ユーザーを作成してパスワードを割り当てたり、ユーザーをグループに入れて、各グループに対しデータベースの適切な部分へのアクセス権を割り当てます。 + +グループには、アクセス可能なメソッドや、HTTPサーバー、SQLサーバーなど、任意の機能へのアクセス権が割り当てられます。 + +次の図は、デザインおよびランタイムエクスプローラーアクセス権を "Devs" グループに割り当てている様子を表しています (データベース設定の "セキュリティ" タブ): ![](assets/en/Users/Access1.png) -## Activating access control -You initiate the 4D password access control system in client-server by **assigning a password to the Designer**. -Until you give the Designer a password, all database access are done with the Designer's access rights, even if you have set up users and groups (when the database opens, no ID is required). Any part of the database can be opened. +## アクセスシステムを起動する + +クライアントサーバーにおいて、4D のパスワードアクセスシステムを起動するには、**デザイナー (Designer) にパスワードを割り当て** ます。 + +ユーザー&グループを作成したとしても、デザイナーにパスワードが指定されるまでは、すべてのデータベースアクセスがデザイナーアクセス権でおこなわれます (データベースを開く際に ID を求められません)。 つまり、4Dデータベースのあらゆる部分を開くことができます。 -When a password is assigned to the Designer, all the access privileges take effect. In order to connect to the database, remote users must enter a password. +デザイナーにパスワードが指定されると、すべてのアクセス権が有効になります。 リモートユーザーがデータベースを開くには、パスワードを入力しなければなりません。 -To disable the password access system, you just need to remove the Designer password. +パスワードアクセスシステムを無効にするには、デザイナーのパスワードを削除します。 + + +## プロジェクトアーキテクチャーにおけるユーザー&グループ + +プロジェクトデータベース (.4DProject および .4dz ファイル) では、シングルユーザーおよびクライアントサーバー環境の両方でユーザーとグループを設定することができます。 ただし、アクセスシステムは 4D Server データベースにおいてのみ有効です。 次の表は、主なユーザーとグループの機能と、それらが利用かどうかを一覧に示します: + +| | 4D Developer (シングルユーザー) | 4D Server | +| ---------------------------- | ----------------------- | --------- | +| ユーザーとグループの追加/編集 | ◯ | ◯ | +| ユーザー/グループにサーバーアクセスを割り振る | ◯ | ◯ | +| ユーザー認証 | × (すべてのユーザーがデザイナーです) | ◯ | +| デザイナーへのパスワード設定によるアクセスシステムの起動 | × (すべてのアクセスがデザイナーです) | ◯ | -## Users and groups in project architecture -In project databases (.4DProject or .4dz files), 4D users and groups can be configured in both single-user and client-server environments. However, access control is only effective in 4D Server databases. The following table lists the main users and groups features and their availability: -| | 4D Developer (single-user) | 4D Server | -| ------------------------------------------------------------- | ---------------------------- | --------- | -| Adding/editing users and groups | yes | yes | -| Assigning user/group access to servers | yes | yes | -| User identification | no (all users are Designer) | yes | -| Access control once the Designer has been assigned a password | no (all access are Designer) | yes | ## ツールボックス -The editors for users and groups are located in the toolbox of 4D. These editors can be used to create both users and groups, assign passwords to users, place users in groups, etc. +ユーザーとグループのエディターは 4Dのツールボックスにあります。 ユーザーとグループを作成し、ユーザーにパスワードを設定し、ユーザーをグループに所属させるといった操作はこのエディターにて可能です。 ![](assets/en/Users/editor.png) -> Users and groups editor can be displayed at runtime using the [EDIT ACCESS](https://doc.4d.com/4Dv18/4D/18/EDIT-ACCESS.301-4504687.en.html) command. +> ランタイムにおいてユーザーとグループのエディターを表示させるには [EDIT ACCESS](https://doc.4d.com/4Dv18/4D/18/EDIT-ACCESS.301-4504687.ja.html) コマンドを使用します。 + + -## Directory.json file +## Directory.json ファイル -Users, groups, as well as their access rights are stored in a specific database file named **directory.json**. +ユーザー、グループ、およびそれらのアクセス権は、**directory.json** という名称の専用データベースファイルに保存されます。 -This file can be stored at the following locations: +このフォルダーは次の場所に保存することができます: -- in the user database settings folder, i.e. in the "Settings" folder at the same level as the "Project" folder. These settings are used by default for the database. -- in the data settings folder, i.e. in the "Settings" folder in the "Data" folder. If a directory.json file is present at this location, it takes priority over the file in the user database settings folder. This feature allows you to define custom/local Users and Groups configurations. The custom configuration will left untouched by a database upgrade. +- ユーザーデータベース設定フォルダー (つまり "Project" フォルダーと同階層にある "Settings" フォルダー) 内。 これらの設定はデータベースによりデフォルトで使用されます。 +- データ設定フォルダー (つまり "Data" フォルダーの中の "Settings" フォルダー) 内。 directory.json ファイルがこの場所に保存されている場合、ユーザーデータベース設定フォルダーのファイルよりも優先されます。 この機能により、カスタム/ローカルなユーザー&グループ設定を定義することができます。 データベースをアップグレードしても、カスタム設定はそのままです。 -> If users and groups management is not active, the directory.json is not created. \ No newline at end of file +> ユーザーとグループの管理が有効化されていない場合、directory.json ファイルは生成されません。 diff --git a/website/translated_docs/pt/Backup/backup.md b/website/translated_docs/pt/Backup/backup.md index e19eed131c5eaf..d1f70544211ac3 100644 --- a/website/translated_docs/pt/Backup/backup.md +++ b/website/translated_docs/pt/Backup/backup.md @@ -4,92 +4,94 @@ title: Backup --- -## Starting a backup +## Começando um backup -A backup can be started in three ways: +Uma cópia de segurança pode ser iniciada de três maneiras: -- Manually, using the **Backup...** item of the 4D **File** menu or the **Backup** button of the [Maintenance and Security Center](MSC/backup.md). -- Automatically, using the scheduler that can be set in the Database Settings, -- Programmatically, using the `BACKUP` command. +- Manualmente, utilizando o comando **Cópia de segurança...** do menu 4D **Arquivo** ou o botão **Cópia de segurança** de [Centro de manutenção e segurança](MSC/backup.md). +- Automaticamente, usando o agendamento que pode ser estabelecido em Configurações de Banco de Dados +- Por programação, utilizando o comando `BACKUP`. -> 4D Server: A backup can be started manually from a remote machine using a method that calls the `BACKUP` command. The command will be executed, in all cases, on the server. +> 4D Server: é possível iniciar uma cópia de segurança manualmente desde uma máquina remota mediante um método que chama ao comando `BACKUP`. O comando será executado, em todos os casos, no servidor. -### Manual backup +### Cópia de segurança manual -1. Select the **Backup...** command in the 4D **File** menu. - The backup window appears: ![](assets/en/Backup/backup01.png) You can see the location of the backup folder using the pop-up menu next to the "Backup destination" area. This location is set on the **Backup/Configuration** page of the Database Settings. +1. O estado da última cópia de segurança (correta ou com erro) é armazenada na área de informação da [página de cópias de segurança em CSM](MSC/backup.md) ou na **página de manutenção** de 4D Server. Também se registra no banco de dados **Backup journal.txt**. -- You can also open the [Maintenance and Security Center](MSC/overview.md) of 4D and display the [Backup page](MSC/backup.md). +- Também pode abrir o [Centro de manutenção e segurança](MSC/overview.md) de 4D e mostrar a [página de cópias de segurança](MSC/backup.md). -The **Database properties...** button causes the Backup/Configuration page of the Database Settings to be displayed. +O botão **Propriedades de Banco de Dados...** faz com que seja exibida a página Backup/Configuration das Configurações do Banco de Dados. -2. Click **Backup** to start the backup using current parameters. + 2. Clique em **Backup/Cópia de segurança** para iniciar a cópia de segurança utilizando os parâmetros atuais. -### Scheduled automatic backup -Scheduled backups are started automatically. They are configured in the **Backup/Scheduler** page of the **Database Settings**. +### Backup automático periódico -Backups are automatically performed at the times defined on this page without any type of user intervention. For more information on using this dialog box, refer to [Scheduler in backup settings](settings.md#scheduler). +As cópias de segurança programadas são iniciadas automaticamente. São configurados na página **Backup/Scheduler** em **Database Settings**. -### BACKUP command +As cópias de segurança são feitas automaticamente na hora definida nessa página sem nenhum tipo de intervenção do usuário. Para saber mais sobre o uso desta caixa de diálogo, consulte [Definir as cópias de segurança periódicas](settings.md#scheduler). -When the `BACKUP` 4D language command is executed from any method, the backup starts using the current parameters as defined in the Database settings. You can use the `On Backup Startup` and `On Backup Shutdown` database methods for handling the backup process (see the *4D Language Reference* manual). -## Managing the backup processing +### Comando BACKUP -Once a backup is started, 4D displays a dialog box with a thermometer indicating the progress of the backup: +Quando o comando de linguagem `BACKUP` 4D for executado a partir de qualquer método, o backup começa usando os parâmetros atuais como definidos nas configurações Banco de Dados. Pode utilizar os métodos `On Backup Startup` e `On Backup Shutdown` para controlar o processo de cópia de segurança (consulte o manual *Linguagem, de 4D*). + + +## Gerenciar o processo de backup + +Quando iniciar o backup, 4D exibe uma caixa de diálogo com um termômetro indicando o progresso da cópia de segurança: ![](assets/en/Backup/backupProgress.png) -This thermometer is also displayed on the [Backup page of the MSC](MSC/backup.md) if you have used this dialog box. +Esse termômetro também é mostrado na página [Backup de CSM](MSC/backup.md) se utilizou esta caixa de diálogo. -The **Stop** button lets the user interrupt the backup at any time (refer to [Handling backup issues](backup.md#handling-backup-issues) below). +O botão **Parar** permite ao usuário interromper a cópia de segurança em qualquer momento (consulte [Manejar os problemas da cópia de segurança](backup.md#handling-backup-issues) mais adiante). -The status of the last backup (successful or failed) is stored in the Last Backup Information area of the [Backup page in the MSC](MSC/backup.md) or in the **Maintenance page** of 4D Server. It is also recorded in the database **Backup journal.txt**. +O estado da última cópia de segurança (correta ou com erro) é armazenada na área de informação da [página de cópias de segurança em CSM](MSC/backup.md) ou na **página de manutenção** de 4D Server. Também se registra no banco de dados **Backup journal.txt**. -### Accessing the database during backup +### Acesso do banco de dados durante o backup -During a backup, access to the database is restricted by 4D according to the context. 4D locks any processes related to the types of files included in the backup: if only the project files are being backed up, access to the structure is not possible but access to the data will be allowed. +Durante a cópia de segurança, acesso ao banco de dados é restrito por 4D dependendo do contexto. 4D bloqueia os processos relacionados com os tipos de arquivos incluídos na cópia de segurança: se só fizer uma cópia de segurança dos arquivos do projeto, não se poderá acessar à estrutura mas sim aos dados. -Conversely, if only the data file is being backed up, access to the structure is still allowed. In this case, the database access possibilities are as follows: +Pelo contrário, se só fizer uma cópia de segurança do arquivo de dados, o acesso à estrutura continua sendo permitido. Nesse caso, as possibilidades de acesso ao banco de dados são as seguintes: -- With the 4D single-user version, the database is locked for both read and write; all processes are frozen. No actions can be performed. -- With 4D Server, the database is only write locked; client machines can view data. If a client machine sends an add, remove or change request to the server, a window appears asking the user to wait until the end of the backup. Once the database is saved, the window disappears and the action is performed. To cancel the request in process and not wait for the end of the backup, simply click the **Cancel operation** button. However, if the action waiting to be executed comes from a method launched prior to the backup, you should not cancel it because only operations remaining to be performed are cancelled. Also, a partially executed method can cause logical inconsistencies in the database. > When the action waiting to be executed comes from a method and the user clicks the **Cancel operation** button, 4D Server returns error -9976 (This command cannot be executed because the database backup is in progress). +- Com a versão 4D monousuário, o banco de dados é trancado tanto para leitura quanto escrita, todos os processos são congelados. Nenhuma ação é realizada. +- Com 4D Server, o banco de dados está bloqueado só para escrita; as máquinas clientes podem ver os dados. Se uma máquina cliente enviar uma petição de adição, eliminação ou mudança ao servidor, uma janela aparece pedindo ao usuário que espere até o final da cópia de segurança. Quando o banco de dados for salvo, a janela desaparece a ação é ralizada Quando o banco de dados for salvo, a janela desaparece a ação é ralizada Quando o banco de dados for salvo, a janela desaparece a ação é ralizada Para cancelar a petição em processo e não esperar a que finalize a cópia de segurança, basta dar um clique no botão **Cancelar a operação**. Entretanto, se a ação que espera ser executada vem de um método lançado antes da cópia de segurança, não deve cancelar a ação porque só são canceladas as operações restantes. Além disso, um método parcialmente executado pode causar inconsistências lógicas no banco de dados. > Quando a ação que espera ser executada vir de um método e o usuário clicar no botão **Cancelar operação**, 4D Server devolve o erro -9976 (Este comando não pode ser executardo porque a copia de segurança está em progresso). -### Handling backup issues +### Gestão dos problemas das cópias de segurança -It may happen that a backup is not executed properly. There may be several causes of a failed backup: user interruption, attached file not found, destination disk problems, incomplete transaction, etc. 4D processes the incident according to the cause. +Pode acontecer que uma cópia de segurança não seja executada corretamente. Pode haver várias causas de falha na cópia de segurança: interrupção do usuário, arquivo adjunto não encontrado, problemas no disco de destino, transação incompleta, etc. 4D processa a incidência segundo a causa. -In all cases, keep in mind that the status of the last backup (successful or failed) is stored in the Last Backup Information area of the [Backup page in the MSC](MSC/backup.md) or in the **Maintenance page** of 4D Server, as well as in the database **Backup journal.txt**. displayed in the Last Backup Information area of the Backup page in the MSC or in GRAPH SETTINGS of 4D Server, as well as in the Backup journal of the database. +Em todos os casos, lembre que o estado da última copia de segurança (correta ou com falha) se armazena na área de informação da [página de cópias de segurança em CSM](MSC/backup.md) ou na **página de manutenção** de 4D Server, assim como no banco de dados **Backup journal.txt**. -- **User interruption**: The **Stop** button in the progress dialog box allows users to interrupt the backup at any time. In this case, the copying of elements is stopped and the error 1406 is generated. You can intercept this error in the `On Backup Shutdown` database method. -- **Attached file not found**: When an attached file cannot be found, 4D performs a partial backup (backup of database files and accessible attached files) and returns an error. -- **Backup impossible** (disk is full or write-protected, missing disk, disk failure, incomplete transaction, database not launched at time of scheduled automatic backup, etc.): If this is a first-time error, 4D will then make a second attempt to perform the backup. The wait between the two attempts is defined on the **Backup/Backup & Restore** page of the Database Settings. If the second attempt fails, a system alert dialog box is displayed and an error is generated. You can intercept this error in the `On Backup Shutdown` database method. +- **Interrupção de Usuário**: The **Botão Parar** na caixa de diálogo de progresso permite aos usuários interromper o processo de cópia de segurança a qualquer momento. Nesse caso, a cópia de elementos para e é gerado o erro 1406. Pode interceptar esse erro no método database `On Backup Shutdown`. +- **Arquivo anexo não encontrado**: quando não encontrar um arquivo adjunto, 4D realiza uma cópia de segurança parcial (cópia de segurança dos arquivos do banco de dados e dos arquivos adjuntos acessíveis) e devolve um erro. +- **Backup impossível** (disco está cheio ou é protegido contra escrita, disco não encontrado, falha de disco, transação incompleta, banco de dados não lançado no momento do backup automático programado, etc): se essa é a primeira vez do erro, 4D vai fazer uma segunda tentativa de realizar o backup A espera entre duas tentativas é definida na página **Backup/Backup & Restore** nas Propriedades do banco de dados. A espera entre duas tentativas é definida na página **Backup/Backup & Restore** nas Propriedades do banco de dados. Se a segunda tentativa falhar, um diálogo de alerta de sistema é exibido e um erro é gerado. Pode interceptar esse erro no método database `On Backup Shutdown`. -## Backup Journal +## Histórico de cópias de segurança (Backup Journal) -To make following up and verifying database backups easier, the backup module writes a summary of each operation performed in a special file, which is similar to an activity journal. Like an on-board manual, all database operations (backups, restores, log file integrations) are logged in this file whether they were scheduled or performed manually. The date and time that these operations occurred are also noted in the journal. +Para facilitar o acompanhamento e a verificação das cópias de segurança ou backups do banco de dados, o módulo de backup escreve um resumo em um arquivo especial de cada operação, similar a um diário de atividades. Da mesma forma que no manual de bordo, todas as operações (backups, restaurações, integrações de histórico) são escritas nesse arquivo, não importa se a operação foi programada ou manual. A data e hora em que essas operações acontecem também é anotada no histórico. -The backup journal is named "Backup Journal[001].txt" and is placed in the "Logs" folder of the database. The backup journal can be opened with any text editor. +O histórico de cópia de segurança é chamado "Backup Journal[001].txt" e fica na pasta "Logs" do banco de dados. O histórico de cópias de segurança pode ser aberto com o editor de texto. -#### Management of backup journal size +#### Gerenciamento do tamanho de histórico de cópias de segurança. + +Em determinadas estratégias de copia de segurança (por exemplo, no caso de que se realizem copias de segurança de numerosos arquivos anexos), o histórico de cópias de segurança pode alcançar rapidamente um grande tamanho. Dois mecanismos podem ser usados para controlar este tamanho: + +- **Copia de segurança automática**: antes de cada copia de segurança, a aplicação examina o tamanho do arquivo historial de cópia de segurança atual. Se for superior a 10 MB, se arquiva o arquivo atual e é criado um arquivo com o número [xxx] incrementado, por exemplo "Backup Journal[002].txt”. Quando o arquivo número 999 for alcançado, a numeração volta para 1 e os arquivos existentes começam a ser substituídos. +- **Possibilidade de reduzir a quantidade de informação gravada **: Para fazer isso, modifique o valor da chave `VerboseMode` no arquivo *Backup.4DSettings* do banco de dados. Como padrão, essa chave é definida como True. Se mudar o valor desta chave a False, só se armazenará no diário de copias de segurança a informação principal: data e hora de inicio da operação e os erros encontrados. As chaves XML relativas a configuração da cópia de segurança são descritos no manual *Backup das chaves XML 4D*. -In certain backup strategies (for example, in the case where numerous attached files are being backed up), the backup journal can quickly grow to a large size. Two mechanisms can be used to control this size: -- **Automatic backup**: Before each backup, the application examines the size of the current backup journal file. If it is greater than 10 MB, the current file is archived and a new file is created with the [xxx] number incremented, for example "Backup Journal[002].txt”. Once file number 999 is reached, the numbering begins at 1 again and the existing files will be replaced. -- **Possibility of reducing the amount of information recorded**: To do this, simply modify the value of the `VerboseMode` key in the *Backup.4DSettings* file of the database. By default, this key is set to True. If you change the value of this key to False, only the main information will be stored in the backup journal: date and time of start of operation and any errors encountered. The XML keys concerning backup configuration are described in the *4D XML Keys Backup* manual. ## backupHistory.json -All information regarding the latest backup and restore operations are stored in the database's **backupHistory.json** file. It logs the path of each saved file (including attachments) as well as number, date, time, duration, and status of each operation. To limit the size of the file, the number of logged operations is the same as the number of available backups ("Keep only the last X backup files") defined in the backup settings. +Toda a informação relativa às últimas operações de cópia de segurança e restauração se armazena no arquivo **backupHistory.json** do banco de dados. Registra a rota de cada arquivo guardado (incluídos os anexos), assim como o número, a data, a hora, a duração e o estado de cada operação. Para limitar o tamanho do arquivo, o número de operações registradas é o mesmo que o número de backups disponíveis ("Keep only the last X backup files") definido nas configurações de backup. -The **backupHistory.json** file is created in the current backup destination folder. You can get the actual path for this file using the following statement: +O arquivo **backupHistory.json** é criado na pasta de destino do backup atual. Pode obter a rota para esse arquivo usando a declaração abaixo: ```4d -$backupHistory:=Get 4D file(Backup history file) +$backupHistory:=Get 4D file(arquivo histórico Backup) ``` - -> **WARNING** -> Deleting or moving the **backupHistory.json** file will cause the next backup number to be reset. -> -> The **backupHistory.json** file is formatted to be used by the 4D application. If you are looking for a human-readable report on backup operations, you might find the Backup journal more accurate. \ No newline at end of file +> **AVISO** +> Apagar ou mover o arquivo **backupHistory.json** faz com que o próximo número de backup seja resetado. +> O arquivo **backupHistory.json** é formatado para ser usado pela aplicação 4D. Se estiver procurando por um relatório que possa ser lido por olhos humanos, o diário de Backup journal é mais preciso. diff --git a/website/translated_docs/pt/Backup/log.md b/website/translated_docs/pt/Backup/log.md index be4cb892827502..0d2681762962ba 100644 --- a/website/translated_docs/pt/Backup/log.md +++ b/website/translated_docs/pt/Backup/log.md @@ -1,77 +1,80 @@ --- id: log -title: Log file (.journal) +title: Arquivo de Log (.journal) --- -A continuously-used database is always record changes, additions or deletions. Performing regular backups of data is important but does not allow (in case of incident) restoring data entered since the last backup. To respond to this need, 4D now offers a specific tool: the log file. This file allows ensuring permanent security of database data. +Um banco de dados de uso continuo sempre registra mudanças, adições ou apagamentos. Realizar backups ou cópias de segurança regularmente é importante mas lembre que não permite (em caso de problemas) restaurar os dados registrados depois do último backup. Para responder à essa necessidade, 4D oferece agora uma ferramenta específica: o arquivo de log. Este arquivo permite garantir a segurança permanente dos dados do banco de dados. Este arquivo permite garantir a segurança permanente dos dados do banco de dados. -In addition, 4D works continuously with a data cache in memory. Any changes made to the data of the database are stored temporarily in the cache before being written to the hard disk. This accelerates the operation of applications; in fact, accessing memory is faster than accessing the hard disk. If an incident occurs in the database before the data stored in the cache could be written to the disk, you must include the current log file in order to restore the database entirely. +Além disso, 4D trabalha constantemente com dados cache em memória. Todas as mudanças realizadas nos dados do banco de dados são armazenados temporariamente na cache antes de serem escritas no disco rígido. Isso acelera a operação das aplicações; na verdade, acessar a memória é mais rápido que acessar o disco rígido. Se acontecer algo no banco de dados antes que armazenagem dos dados na cache possa ser gravada no disco rígido, precisa incluir o arquivo de histórico atual para poder restaurar o banco de dados por completo. -Finally, 4D has functions that analyze the contents of the log file, making it possible to rollback the operations carried out on the data of the database. These functions area available in the MSC: refer to the [Activity analysis](MSC/analysis.md) page and the [Rollback](MSC/rollback.md) page. +Por último, 4D possui funções que analisam os conteúdos do arquivo de histórico, tornando possível reverter as operações realizadas sobre os dados do banco de dados. Essa funções estão disponíveis no MSC: veja a página de[Análise de atividade](MSC/analysis.md) e a página [Rollback](MSC/rollback.md). -## How the log file works +## como o arquivo de histórico funciona -The log file generated by 4D contains a descrption of all operations performed on the data of journaled tables of the database, which are logged sequentially. By default, all the tables are journaled, i.e. included in the log file, but you can deselect individual tables using the **Include in Log File** table property. +O arquivo de histórico gerado por 4D contém uma descrição de todas as operações realizadas nos dados das tbelas registradas no diário do banco de dados, as quais são registradas de forma sequencial. Como padrão, todas as tabelas são registradas, ou seja, incluidas no arquivo de histórico, mas pode desmarcar as tabelas individuais usando a propriedade de tabela **Incluir no arquivo de histórico**. -As such, each operation performed by a user causes two simultaneous actions: the first one in the database (instruction is executed normally) and the second one in the log file (the description of the operation is recorded). The log file is created independently without disturbing or slowing down the work of the user. A database can only work with one log file at a time. The log file records the following action types: +Dessa forma, cada operação realizada por um usuário causa duas ações simultâneas: a primeira no banco de dados (instrução é realizada normalmente) e a segunda ação no arquivo de histórico (a descrição da ação é registrada). O arquivo de historial se cria de forma independente, sem perturbar nem ralentar o trabalho do usuário. O arquivo de historial se cria de forma independente, sem perturbar nem ralentar o trabalho do usuário. O arquivo de historial registra os seguintes tipos de ações: -- Opening and closing of the data file, -- Opening and closing of the process (contexts), -- Adding of records or BLOBs, -- Modifying of records, -- Deleting of records, -- Creating and closing of transactions. +- Abertura e fechamento de arquivos de dados, +- Abertura e fechamento de processos (contextos), +- Adição de registros ou BLOBs, +- Modificação de registros, +- Eliminação de registros, +- Criar ou fechar as transações. -For more information about these actions, refer to the [Activity analysis](MSC/analysis.md) page of the MSC. +Para saber mais sobre essas ações, consulte a página [Análise de atividades](MSC/analysis.md) do CSM. -4D manages the log file. It takes into account all operations that affect the data file equally, regardless of any manipulations performed by a user, a 4D method, the SQL engine, plug-ins, or from a Web browser or a mobile applicaton. +4D gerencia o arquivo de historial. Leva em consideração todas as operações que afetam o arquivo de dados por igual, independente das manipulações realizadas pelo usuário, métodos 4D, o motor SQL, os plug-ins, ou um navegador web ou uma aplicação móvel. -The following illustration sums up how the log file works: +A instrução abaixo resume o funcionamento do arquivo de historial: ![](assets/en/Backup/backup05.png) -The current log file is automatically saved with the current data file. This mechanism has two distinct advantages: -- Its avoids saturating the disk volume where the log file is stored. Without a backup, the log file would get bigger and bigger with use, and would eventually use all available disk space. For each data file backup, 4D or 4D Server closes the current log file and immediately starts a new, empty file, thereby avoiding the risk of saturation. The old log file is then archived and eventually destroyed depending on the mechanism for managing the backup sets. -- It keeps log files corresponding to backups in order to be able to parse or repair a database at a later point in time. The integration of a log file can only be done in the database to which it corresponds. It is important, in order to be able to properly integrate a log file into a backup, to have backups and log files archived simultaneously. +O arquivo de historial atual se guarda automaticamente com o arquivo de dados atual. Este mecanismo tem duas vantagens distintas: -## Creating the log file +- Evitar a saturação do volume de disco onde se armazena o arquivo de historial. Sem uma cópia de segurança, o arquivo de histórico ficaria cada vez maior com o uso, e acabaria utilizando todo o espaço disponível no disco. Para cada cópia de segurnça do arquivo de dados, 4D ou 4D Server fecha o arquivo de histórico atual e imediatamente inicia um novo arquivo vazio, evitando assim o riesco de saturação. A continuação, o arquivo de historial antigo se arquiva e, finalmente, se destrói em função do mecanismo de gestão dos conjuntos de cópias de seguriança. +- Conserva os arquivos de histórico correspondentes às cópias de segurança para poder analisar ou reparar um banco de dados em um momento posterior. A integração de um arquivo de histórico só pode ser realizada no banco de dados ao qual corresponde. Para poder integrar corretamente um arquivo de historial em uma cópia de segurança, é importante que as cópias de segurança e os arquivos de historial se arquivem simultaneamente. -By default, any database created with 4D uses a log file (option set in the **General** page of the Preferences). The log file is named *data.journal* and is placed in the Data folder. -You can find out if your database uses a log file at any time: just check whether the **Use Log** option is selected on the **Backup/Configuration** page of the Database Settings. If you deselected this option, or if you use a database without a log file and wish to set up a backup strategy with a log file, you will have to create one. +## Criar o arquivo de histórico -To create a log file: +Como padrão, todo banco de dados criado com 4D utiliza um arquivo de histórico (opção definida na página **Geral** das Preferências). O arquivo de histórico é chamado *data.journal* e está na pasta Data. -1. On the **Backup/Configuration** page of the Database Settings, check the **Use Log** option. The program displays a standard open/new file dialog box. By default, the log file is named *data.journal*. +Pode averiguar se seu banco de dados utiliza um arquivo de histórico a qualquer momento: só precisa comprovar se a opção **Utilizar o arquivo de histórico** estiver selecionada na página **Backup/Configuración** das Propriedades do banco. Se desmarcar essa opção, ou se usar um banco de dados sem arquivo de histórico, e quiser estabelecer uma estratégia de backup com um arquivo de histórico, vai precisar criar um. -2. Keep the default name or rename it, and then select the file location. If you have at least two hard drives, it is recommended that you place the log file on a disk other than the one containing the database. If the database hard drive is lost, you can still recall your log file. +Para criar um arquivo de histórico: -3. Click **Save**. The disk and the name of the open log file are now displayed in the **Use Log** area of the dialog box. You can click on this area in order to display a pop-up menu containing the log path on the disk. +1. Na página **Cópia de segurança/Configuração** das Propriedades do banco de dados, marque a opção **Utilizar o arquivo de histórico**. O programa exibe um caixa de diálogo abrir/novo arquivo. Como padrão, o nome arquivo é chamado *data.journal*. -4. Validate the Database Settings dialog box. +2. Mantém o nome padrão ou renomeia, e daí seleciona o local do arquivo. Se tiver pelo menos dois discos rígidos, é recomendado que coloque o arquivo de histórico no disco que não tenha seu banco de dados. Se perder o disco rígido do banco de dados, poderá então recuperar o arquivo de histórico. -In order for you to be able to create a log file directly, the database must be in one of the following situations: +3. Clique **Salvar**. O disco e o nome do arquivo de histórico aberto agora estão exibidos na área **Use Log** da caixa de diálogo. Pode clicar nessa área para exibir um menu pop-up contendo a rota de histórico no disco. -- The data file is blank, -- You just performed a backup of the database and no changes have yet been made to the data. +4. Valide a caixa de diálogo das Propriedades do banco de dados. -In all other cases, when you validate the Database Settings dialog box, an alert dialog box will appear to inform you that it is necessary to perform a backup. If you click **OK**, the backup begins immediately, then the log file is activated. If you click **Cancel**, the request is saved but the creation of the log file is postponed and it will actually be created only after the next backup of the database. This precaution is indispensable because, in order to restore a database after any incidents, you will need a copy of the database into which the operations recorded in the log file will be integrated. +Para poder criar um arquivo de histórico diretamente, o banco de dados deve estar em uma das situações abaixo: -Without having to do anything else, all operations performed on the data are logged in this file and it will be used in the future when the database is opened. +- O arquivo de dados está em branco, +- Acaba de realizar uma cópia de segurança do banco de dados e ainda não foram realizadas mudanças nos dados. -You must create another log file if you create a new data file. You must set or create another log file if you open another data file that is not linked to a log file (or if the log file is missing). +Em todos os outros casos, quando validar a caixa de diálogo Propriedades de Banco de Dados, um diálogo de alerta informará que é necessário fazer um backup. Se clicar em **Aceitar**, a cópia de segurança começa imediatamente, e depois se ativa o arquivo de histórico. Si clicar em **Cancelar**, a solicitação é salva mas a criação do arquivo de histórico é adiada e só criará depois da próxima cópia de segurança do banco de dados. Essa precaução é indispensável porque, para restaurar o banco de dados depois de um incidente, é preciso uma cópia do banco de dados na qual se integrarão às operações registradas no arquivo de histórico. -## Stopping a log file +Sem ter que fazer nada a mais, todas as operações realizadas sobre os dados são registradas nesse arquivo, e são usadas no futuro quando abrir o banco de dados. -If you would like to stop logging operations to the current log file, simply deselect the **Use Log** option on the **Backup/Configuration** page of the Database Settings. +Precisa criar outro arquivo de histórico se criar um novo arquivo de dados. Precisa estabelecer ou criar outro arquivo de shitórico se abrir outro arquivo de dados que não estiver linnkado a um arquivo de histórico (ou se o arquivo de histórico estiver faltando). -4D then displays an alert message to remind you that this action prevents you from taking advantage of the security that the log file provides: + +## Parar um arquivo de histórico + +Se quiser parar as operações de registro no arquivo de histórico atual, apenas desmarque a opção **Use Log|Usar o arquivo de histórico ** na página **Backup/Configuration** das Propriedades do banco de dados. + +4D então exibe uma mensagem de alerta para avisar que a ação evita de aproveitar as vantagens de segurança de ter um arquivo de histórico: ![](assets/en/Backup/backup06.png) -If you click **Stop**, the current log file is immediately closed (the Database Settings dialog box does not need to be validated afterwards). +Se clicar **Stop**, o arquivo de histórico é imediatamente fechado (a caixa de diálogo Propriedades do banco de dados não precisa ser validada depois). -If you wish to close the current log file because it is too large, you might consider performing a data file backup, which will cause the log file to be backed up as well. +Se quiser fechar o arquivo de histórico atual porque é muito grande, pode considerar realizar um backup de arquivo de dados, o que vai fazer com que também se crie uma cópia de segurança do arquivo de histórico -> **4D Server:** The `New log file` command automatically closes the current log file and starts a new one. If for some reason the log file becomes unavailable during a working session, error 1274 is generated and 4D Server does not allow users to write data anymore. When the log file is available again, it is necessary to do a backup. \ No newline at end of file +> **4D Server:** O comando `New log file` fecha automaticamente o arquivo de histórico atual e começa um novo. Se por alguma razão o arquivo de histórico ficar indisponível durante uma sessão de trabalho, o erro 1274 é gerado e o servidor 4D não permimte que o usuários escrevam mais dados. Quando o arquivo de histórico estiver disponível novamente, é preciso fazer um backup. diff --git a/website/translated_docs/pt/Backup/overview.md b/website/translated_docs/pt/Backup/overview.md index ddfd2050b102c8..841ccf8b0d4f66 100644 --- a/website/translated_docs/pt/Backup/overview.md +++ b/website/translated_docs/pt/Backup/overview.md @@ -1,20 +1,21 @@ --- -id: overview -title: Overview +id: visão Geral +title: Visão Geral --- -4D includes a full database backup and restore module. +4D inclui um backup completo e restauração do banco de dados. -This module allows backing up a database currently in use without having to exit it. Each backup can include the project folder, the data file and any additional files or folders. These parameters are first set in the Database Settings. +Esse módulo permite a cópia de segurança do banco de dados atualmente em uso sem ter que sair dele. Cada cópia de segurança ou backup inclui a pasta de projeto, o arquivo de dados e qualquer arquivo ou pastas adicionais. Esses parâmetros são primeiro estabelecidos nas configurações de banco de dados. -Backups can be started manually or automatically at regular intervals without any user intervention. Specific language commands, as well as specific database methods, allow integrating backup functions into a customized interface. +Cópias de segurança ou backups podem ser começadas de forma manual ou de forma automatica em intervalores regulares sem qualquer intervenção do usuário. Comandos específicos da linguagem, assim como métodos de bancos de dados específicos, permitem integrar funções de backup em uma interface personalizada. -Databases can be restored automatically when a damaged database is opened. +Bancos de dados podem ser restaurados automaticamente quando um banco de dados danificado for aberto. -Also, the integrated backup module can take advantage of the .journal file ([database log file](log.md)). This file keeps a record of all operations performed on the data and also ensures total security between two backups. In case of problems with a database in use, any operations missing in the data file are automatically reintegrated the next time the database is opened. You can view the journal file contents at any time. +Além disso, o módulo de cópia de segurança integrada pode aproveitar o arquivo .journal ([de histórico](log.md)). Esse arquivo mantém um registro de todas as operações realizadas nos dados e também assegura a segurança total entre dois backups. No caso de problemas com um banco de dados em uso, qualquer operação faltando no arquivo de dados são reintegrados automaticamente na próxima vez que o banco de dados for aberto. Pode ver os conteúdos do arquivo journal a qualquer momento. -> You can also implement alternative solutions for replicating and synchronizing data in order to maintain identical versions of databases for backup purposes. These solutions can be based on the following mechanisms and technologies: -> - Setting up a logical mirror with 4D Server (using the integrated backup module mechanisms) -> - Synchronization using SQL - Synchronization using HTTP (/rest/url) -> -> For a general overview of 4D's security features, see the [4D Security guide](https://blog.4d.com/4d-security-guide/). \ No newline at end of file +> Pode implementar também soluções alternativas para replicar e sincronizar dados para manter versões idênticas de bancos de dados por razões de backup. Estas soluções podem se baseas nos mecanismos e tecnologias abaixo: +> - Configuração de uma réplica lógica com 4D Server (utilizando os mecanismos do módulo de cópia de segurança integrado) +> - Sincronização utilizando SQL - Sincronização utilizando HTTP (/rest/url) + + +> Para uma visão geral das funções de segurança de 4D, consulte o [Guia de segurança de 4D](https://blog.4d.com/4d-security-guide/). diff --git a/website/translated_docs/pt/Backup/restore.md b/website/translated_docs/pt/Backup/restore.md index 62fba87941bae5..8b1c4edfc6ff79 100644 --- a/website/translated_docs/pt/Backup/restore.md +++ b/website/translated_docs/pt/Backup/restore.md @@ -1,48 +1,49 @@ --- -id: restore -title: Restore +id: restaurar +title: Restaurar --- -4D allows you to restore entire sets of database data in case of any incidents, regardless of the cause of the incident. Two primary categories of incidents can occur: +4D lhe permite restaurar conjuntos inteiros de dados de um banco de dados no caso de que se apresente um incidente, independentemente da causa do mesmo. Podem ocorrer dois tipos principais de incidentes: -- The unexpected stoppage of a database while in use. This incident can occur because of a power outage, system element failure, etc. In this case, depending on the current state of the data cache at the moment of the incident, the restore of the database can require different operations: - - - If the cache was empty, the database opens normally. Any changes made in the database were recorded. This case does not require any particular operation. - - If the cache contains operations, the data file is intact but it requires integrating the current log file. - - If the cache was in the process of being written, the data file is probably damaged. The last backup must be restored and the current log file must be integrated. -- The loss of database file(s). This incident can occur because of defective sectors on the disk containing the database, a virus, manipulation error, etc. The last backup must be restored and then the current log file must be integrated. To find out if a database was damaged following an incident, simply relaunch the database using 4D. The program performs a self-check and details the necessary restore operations to perform. In automatic mode, these operations are performed directly without any intervention on the part of the user. If a regular backup strategy was put into place, the 4D restore tools will allow you to recover (in most cases) the database in the exact state it was in before the incident. +- A parada inesperada do banco enquanto estiver em uso. Esse incidente pode ocorrer por causa de uma falha de energia, erro em um elemento do sistema, etc. Esse incidente pode ocorrer por causa de uma falha de energia, erro em um elemento do sistema, etc. Esse incidente pode ocorrer por causa de uma falha de energia, erro em um elemento do sistema, etc. Esse incidente pode ocorrer por causa de uma falha de energia, erro em um elemento do sistema, etc. Nesse caso, dependendo do estado atual da cache de dados no momento do incidente, a restauração do banco de dados pode requerer diferentes operações: + - Se a cache estiver vazia, o banco de dados abre normalmente. Quaisquer mudanças feitas no banco de dados foram registradas. Este caso não exige nenhuma operação particular + - Se a cache conter operações, o arquivo de dados está intacto mas exige integrar o arquivo de histórico atual. + - Se a cache estiver no processo de ser escrita, o arquivo de dados está provavelmente danificado. O último backup deve ser restaurado e o arquivo de histórico atual deve ser integrado. -> 4D can launch procedures automatically to recover databases following incidents. These mechanisms are managed using two options available on the **Backup/Backup & Restore** page of the Database Settings. For more information, refer to the [Automatic Restore](settings.md#automatic-restore) paragraph. -> If the incident is the result of an inappropriate operation performed on the data (deletion of a record, for example), you can attempt to repair the database using the "rollback" function in the log file. This function is available on the [Rollback](MSC/rollback.md) page of the MSC. +- A perda de um ou mais arquivos do banco de dados. Esse incidente poderia produzir por setores defeituosos no disco que contenham o banco de dados, um vírus, um erro de manipulação, etc. O último backup deve ser restaurado e o arquivo de histórico atual deve ser integrado. O último backup deve ser restaurado e o arquivo de histórico atual deve ser integrado. Para saber se um banco de dados foi danificado depois de um incidente, basta relançar o banco de dados com 4D. O programa realiza um autodiagnóstico e detalha as operações de restauração necessárias. Em modo automático, essas operações são realizadas diretamente sem precisar de ajuda da parte do usuário. Se usar uma estratégia de backup regulares, as ferramentas de restauração de 4D permite recuperar (na maioria dos casos) o banco de dados na mesma situação que estava antes do incidente. -## Manually restoring a backup (standard dialog) +> 4D pode lançar procedimentos automaticamente para recuperar os bancos de dados depois de um incidente. Estes mecanismos são gerenciados mediante duas opções disponíveis na página **Backup/Backup e Restauração** das Propriedades do banco de dados. Para mais informações, veja o parágrafo [Restauração Automatica ](settings.md#automatic-restore). +> Se o incidente for resultado de uma operação inadequada realizadas nos dados (eliminação de um registro, por exemplo) pode tentar reparar o banco de dados usando a função "rollback" do arquivo de histórico. Essa função está disponível na página [Rollback](MSC/rollback.md) do MSC. -You can restore the contents of an archive generated by the backup module manually. A manual restore may be necessary, for instance, in order to restore the full contents of an archive (project files and enclosed attached files), or for the purpose of carrying out searches among the archives. The manual restore can also be performed along with the integration of the current log file. -The manual restore of backups can be carried out either via the standard Open document dialog box, or via the [Restore](MSC/restore) page of the MSC. Restoring via the MSC provides more options and allows the archive contents to be previewed. On the other hand, only archives associated with the open database can be restored. +## Restaurar manualmente o backup (diálogo padrão) -To restore a database manually via a standard dialog box: +Pode restaurar manualmente os conteúdos de um arquivo gerado pelo módulo de cópia de segurança. Uma restauração manual pode ser necessária, por exemplo, para restaurar os conteúdos completos de um arquivo (arquivos projetos e arquivos anexos) ou, para o propósito de realizar pesquisas entre os arquivos. A restauração manual pode também ser realizada junto com a integração do arquivo de histórico atual. -1. Choose **Restore...** in the 4D application **File** menu. It is not mandatory that a database be open. OR Execute the `RESTORE` command from a 4D method. A standard Open file dialog box appears. -2. Select a backup file (.4bk) or a log backup file (.4bl) to be restored and click **Open**. A dialog box appears, which allows you to specify the location where files will be restored. By default, 4D restores the files in a folder named *Archivename* (no extension) located next to the archive. You can display the path: +A restauração manual de backups pode ser realizada via a caixa de diálogo de Abertura de documento ou através da página [Restore](MSC/restore) do MSC. A restauração através do MSC oferece mais opções e permite pré-visualizar os conteúdos dos arquivos. Por outro lado, só podem ser restaurados os arquivos associados ao banco de dados aberto. + +Para restaurar um banco de dados manualmente via uma caixa de diálogo padrão: + +1. Escolha **Restaurar...** no menu da aplicação 4D **File**. Não é obrigatório que um banco de dados seja aberto. OU execute o comando `RESTORE` desde um método 4D. Uma caixa de diálogo de abertura de arquivos vai aparecer. +2. Selecione um arquivo de backup (.4bk) ou um arquivo de backup de histórico (.4bl) para ser restaurado e clique **Abrir**. Aparece um diálogo que permite especificar o local onde os arquivos serão restaurados. Como padrão 4D restaura os arquivos em uma pasta chamada *Archivename* (sem extensão) que fica do lado do arquivo. Pode exibir a rota: ![](assets/en/Backup/backup07.png) -You can also click on the **[...]** button to specify a different location. +Também pode clicar no botão **[...]** para especificar um local diferente. +3. Clique no botão **Restaurar**. 4D extrai todos os arquivos de backup do local especificado. Se o arquivo de histórico atual ou um arquivo de histórico de backup com o mesmo número que o arquivo de cópia de segurança for armazenado na mesma pasta, 4D examina seus conteúdos. Se conter operações não presentes no arquivo de dados, o programa vai perguntar se deseja integrar essas operações. A integração é feita automaticamente se a opção **Integrar último arquivo de histórico...** for marcada (ver [Restauração automática](settings.md#automatic-restore)). 4.(Opcional) Clique em **OK** para integrar o arquivo de histórico no banco de dados restaurado. Se a restauração e integração forem realizadas corretamente, 4D exibe uma caixa de diálogo indicando que a operação foi feita com sucesso. +5. Clique **OK**. A pasta de destino é mostrada. Durante a restauração, 4D coloca todos os arquivos de backup nessa pasta, independente da posição dos arquivos originais no disco quando o backup começou. Dessa forma seus arquivos serão mais fáceis de encontrar. -3. Click on the **Restore** button. 4D extracts all backup files from the specified location. If the current log file or a log backup file with the same number as the backup file is stored in the same folder, 4D examines its contents. If it contains operations not present in the data file, the program asks you if you want to integrate these operations. Integration is done automatically if the **Integrate last log file...** option is checked (see [Automatic Restore](settings.md#automatic-restore)). 4.(Optional) Click **OK** to integrate the log file into the restored database. If the restore and integration were carried out correctly, 4D displays a dialog box indicating that the operation was successful. -4. Click **OK**. The destination folder is displayed. During the restore, 4D places all backup files in this folder, regardless of the position of the original files on the disk when the backup starts. This way your files will be easier to find. +## Restaurar manualmente a cópia de segurança (MSC) -## Manually restoring a backup (MSC) +Pode restaurar manualmente um arquivo do banco de dados atual utilizando a página [Restauração](MSC/restore.md) do Centro de Manutenção e Segurança (CMS). -You can manually restore an archive of the current database using the [Restore page](MSC/restore.md) of the Maintenance and Security Center (MSC). -## Manually integrating the log +## Integração manual do histórico -If you have not checked the option for the automatic integration of the log file on the Restore page of the MSC (see [Successive integration of several log files](MSC/restore.md#successive-intergration-of-several-data-log-files)), a warning dialog box appears during the opening of the database when 4D notices that the log file contains more operations than have been carried out in the database. +Se não tiver marcado a opção de integração automática de arquivo de histórico na página Restaurar do CSM (ver [Integração sucessiva de vários arquivos de histórico](MSC/restore.md#successive-intergration-of-several-data-log-files)), aparece uma caixa de diálogo de advertência durante a abertura do banco quando 4D advertir que o arquivo de histórico conter mais operações do que as que foram realizadas no banco de dados. ![](assets/en/Backup/backup08.png) -> In order for this mechanism to work, 4D must be able to access the log file in its current location. +> Para que esse mecanismo funcione, 4D deve poder acessar o arquivo de histórico em seu local atual. -You can choose whether or not to integrate the current log file. Not integrating the current log file allows you to avoid reproducing errors made in the data. \ No newline at end of file +Pode escolher se quer ou não integrar o arquivo de histórico atual. Não integrar o arquivo de histórico atual permite evitar reproduzir erros feitos nos dados. diff --git a/website/translated_docs/pt/Backup/settings.md b/website/translated_docs/pt/Backup/settings.md index 57377e4a302a6f..f221f002783f45 100644 --- a/website/translated_docs/pt/Backup/settings.md +++ b/website/translated_docs/pt/Backup/settings.md @@ -1,127 +1,124 @@ --- id: settings -title: Backup Settings +title: Parâmetros da cópia de segurança --- -Backup settings are defined through three pages in the Database Settings dialog box. You can set: +Os parâmetros da cópia de segurança são definidas através de três páginas na caixa de diálogo Propriedades do banco de dados. Pode estabelecer: -- the scheduler for automatic backups -- the files to include in every backup -- the advanced features allowing to execute automatic tasks +- a periodicidade das cópias de segurança automáticas +- os arquivos a incluir em cada backup +- as funcionalidades avançadas que permitem executar tarefas automáticas -> Settings defined in this dialog box are written in the *Backup.4DSettings* file, stored in the [Settings folder](Project/architecture.md#settings-folder). +> As propriedades definidas nesta caixa de diálogo são escritas no arquivo *Backup.4DSettings*, guardado na pasta [Settings](Project/architecture.md#settings-folder). -## Scheduler +## Backups periódicos -You can automate the backup of databases opened with 4D or 4D Server (even when no client machines are connected). This involves setting a backup frequency (in hours, days, weeks or months); for each session, 4D automatically starts a backup using the current backup settings. +Pode automatizar a cópia de segurança dos bancos de dados abertos com 4D ou 4D Server (mesmo quando não houver máquinas cliente conectadas). Isso implica definir uma frequência de cópia de segurança (horas, dias, semanas ou meses): para cada sessão, 4D automaticamente inicia uma cópia de segurança usando as configurações atuais de backup. -If this application was not launched at the theoretical moment of the backup, the next time 4D is launched, it considers the backup as having failed and proceeds as set in the Database Settings (refer to [Handling backup issues](backup.md#handling-backup-issues)). +Se essa aplicação não for lançada no momento teórico do backup, na próxima vez que 4D for lançado, considera o backup como tendo falhado e continua como estabelecido nas propriedades do banco de dados (ver [Manejo de problemas da cópia de segurança](backup.md#handling-backup-issues)). -The scheduler backup settings are defined on the **Backup/Scheduler** page of the Database Settings: +Os parâmetros da cópia de segurança programador são definidos na página **Backup/Periodicidade** das Propriedades do banco de dados: ![](assets/en/Backup/backup02.png) -The options found on this tab let you set and configure scheduled automatic backups of the database. You can choose a standard quick configuration or you can completely customize it. Various options appear depending on the choice made in the **Automatic Backup** menu: +As opções encontradas nessa aba permitem estabelecer e configurar as cópias de segurança automáticas programadas do banco de dados. Pode escolher uma configuração rápida padrão ou pode personalizá-la completamente. Aparecem várias opções em função da escolha realizada no menu **Cópia de segurança automática**: -- **Never**: The scheduled backup feature is disabled. -- **Every Hour**: Programs an automatic backup every hour, starting with the next hour. -- **Every Day**: Programs an automatic backup every day. You can then enter the time when the backup should start. -- **Every Week**: Programs an automatic backup every week. Two additional entry areas let you indicate the day and time when the backup should start. -- **Every Month**: Programs an automatic backup every month. Two additional entry areas let you indicate the day of the month and the time when the backup should start. -- **Personalized**: Used to configure "tailormade" automatic backups. When you select this option, several additional entry areas appear: - + **Every X hour(s)**: Allows programming backups on an hourly basis. You can enter a value between 1 and 24. - + **Every X day(s) at x**: Allows programming backups on a daily basis. For example, enter 1 if you want to perform a daily backup. When this option is checked, you must enter the time when the backup should start. - + **Every X week(s) day at x**: Allows programming backups on a weekly basis. Enter 1 if you want to perform a weekly backup. When this option is checked, you must enter the day(s) of the week and the time when the backup should start. You can select several days of the week, if desired. For example, you can use this option to set two weekly backups: one on Wednesday and one on Friday. - + **Every X month(s), Xth Day at x**: Allows programming backups on a monthly basis. Enter 1 if you want to perform a monthly backup. When this option is checked, you must indicate the day of the month and the time when the backup should start. +- **Nunca**: A função de cópia de segurança está inativa. +- **Cada hora**: programa uma cópia de segurança automática a cada hora, a partir da hora seguinte. +- **Cada dia**: programa uma cópia de segurança automática cada dia. Pode então digitar a hora quando o backup deve começar. +- **Todas as semanas**: programa uma cópia de segurança automática a cada semana. Duas áreas de entrada adicionais lhe permitem indicar o dia e a hora em que deve começar a cópia de segurança. +- **Todos os meses**: programa uma cópia de segurança todos os meses. Duas áreas de entrada adicionais lhe permitem indicar o dia do mês e a hora em que deve começar a cópia de segurança. +- **Personalizado**: serve para configurar as cópias de segurança automáticas "sob medida". Quando selecionar esta opção, várias áreas de entradas aparecem: + + **Cada X hora(s)**: permite programar as cópias de segurança com frequência horária. Pode digitar um valor entre 1 e 24. + - **Cada X dia(s) às x**: permite programar as copias de segurança com frequência diária. Por exemplo, introduza 1 se quiser realizar uma cópia de segurança diária. Quando esta opção estiver marcada, deve digitar a hora quando o backup deve começar. + - **Cada X semana(s) às x**: permite programar as copias de segurança semanalmente. Digite 1 se quiser realizar o backup 1 vez por semana. Quando essa opção estiver marcada, deve digitar o dia da semana e a hora em que quer começar o backup. Pode selecionar vários dias da semana se quiser. Por exemplo. pode usar essa opção para estabelecer dois backups por semana: um nas quartas feiras e outro nas sextas. + - **Cada X mes(es), X dia às x**: Permite programar cópias de segurança mensalmente. Digite 1 se quiser realizar uma cópia de segurança mensal. Quando essa opção estiver marcada, tem que indicar o dia do mês e a hora em que o backup deve começar. -## Configuration +> As mudanças de hora padrão para hora de verão podem afetar temporariamente ao programador automático e ativar a próxima cópia de segurança com uma diferença de uma hora. Isso acontece só uma vez e os próximos backups rodam na hora prevista. -The Backup/Configuration page of the Database Settings lets you set the backup files and their location, as well as that of the log file. These parameters are specific to each database opened by the 4D application. + +## Configuração + +A página Cópia de segurança| Configuração das propriedades do banco de dados permite determinar os arquivos de cópia de segurança e sua localização, assim como a do arquivo de histórico. Esses parâmetros são específicos para cada banco de dados abertos pela aplicação 4D. ![](assets/en/Backup/backup03.png) -> **4D Server:** These parameters can only be set from the 4D Server machine. +> **4D Server:** estes parâmetros só podem ser configurados desde a máquina 4D Server. + +### Conteúdo +Essa área lhe permite determinar quais os arquivos ou pastas que devem ser copiados durante o backup. -### Content +- **Data**: arquivo de dados do Banco. Quando esta opção for marcada, o arquivo de histórico do banco de dados, se existir, recebe um backup na mesma hora que os dados. +- **Arquivo de estrutura**: pastas e arquivos do banco de dados. No caso de bancos de dados compilados, essa opção permite fazer o backup do arquivo .4dz. +- **Arquivo de estrutura usuário (só para bancos binários)**: *funcionalidade obsoleta* +- **Arquivos anexos**: esta área permite especificar um conjunto de arquivos ou pastas que sofrerão o backup no mesmo momento que o banco de dados. Esses arquivos podem ser de qualquer tipo (documentos ou modelos de plug-ins, etiquetas, relatórios, imagens, etc). Pode estabelecer arquivos ou pastas individuais cujos conteúdos serão respaldados completamente. Cada elemento anexado é listado com sua rota de acesso completa na área "Anexos". + - **Eliminar**: retira o arquivo selecionado da lista de arquivos anexos. + - **Adicionar pasta...**: mostra uma caixa de diálogo que permite selecionar uma pasta para adicionar à cópia de segurança. No caso de uma restauração, a pasta vai recuperar sua estrutura interna. Pode selecionar toda pasta ou volume conectado à máquina, exceto a pasta que conter os arquivos do banco de dados. + - **Adicionar pasta...**: mostra uma caixa de diálogo que permite selecionar um arquivo para adicionar à cópia de segurança. -This area allows you to set which files and/or folders to copy during the next backup. -- **Data**: Database data file. When this option is checked, the current log file of the database, if it exists, is backed up at the same time as the data. -- **Structure**: Database project folders and files. In cases where databases are compiled, this option allows you to backup the .4dz file. -- **User Structure File (only for binary database)**: *deprecated feature* -- **Attachments**: This area allows you to specify a set of files and/or folders to be backed up at the same time as the database. These files can be of any type (documents or plug-in templates, labels, reports, pictures, etc.). You can set either individual files or folders whose contents will be fully backed up. Each attached element is listed with its full access path in the “Attachments” area. - - **Delete**: Removes the selected file from the list of attached files. - - **Add folder...**: Displays a dialog box that allows selecting a folder to add to the backup. In the case of a restore, the folder will be recovered with its internal structure. You can select any folder or volume connected to the machine, with the exception of the folder containing the database files. - - **Add file...**: Displays a dialog box that allows you to select a file to add to the backup. +### Pasta de destino de arquivo de cópia de segurança -### Backup File Destination Folder +Esta área lhe permite visualizar e mudar o local na que se armazenarão os arquivos de cópia de segurança, assim como os arquivos de cópia de segurança do arquivo historial (se aplicável). -This area lets you view and change the location where backup files as well as log backup files (where applicable) will be stored. +Para ver o local dos arquivos, clique na área para que apareça sua rota de acesso no menu emergente. -To view the location of the files, click in the area in order to display their pathname as a pop-up menu. +Para modificar o local onde se armazenam esses arquivos, clique no botão **...**. Uma caixa de seleção aparece, que permite selecionar uma pasta ou disco onde os backups são colocados. As áreas "Espaço utilizado" e "Espaço livre" são atualizadas automaticamente e indicam o espaço restante no disco da pasta selecionada. -To modify the location where these files are stored, click the **...** button. A selection dialog box appears, which allows you to select a folder or disk where the backups will be placed. The "Used Space" and "Free Space" areas are updated automatically and indicate the remaining space on the disk of the selected folder. +### Gestão do arquivo de histórico -### Log management +A opção **Utilizar o arquivo de histórico**, quando estiver marcada, indica que o banco de dados utiliza um arquivo de histórico. Sua rota de acesso é especificada debaixo da opção. Quando essa opção for marcada, não é possível abrir o banco de dados sem um arquivo de histórico. -The **Use Log** option, when checked, indicates that the database uses a log file. Its pathname is specified below the option. When this option is checked, it is not possible to open the database without a log file. +Como padrão, todo banco de dados criado com 4D usando um arquivo de histórico (opção marcada na página **Geral** das **Preferências**). O arquivo de histórico é chamado *data.journal* e está na pasta Data. -By default, any database created with 4D uses a log file (option checked in the **General Page** of the **Preferences**). The log file is named *data.journal* and is placed in the Data folder. +> Ativar um novo arquivo de histórico exige que tenha sido feita anteriormente uma cópia de segurança dos dados. Quando você marcar esta opção, uma mensagem de aviso informa que um backup é necessário. A criação dos arquivos de histórico é adiada e será feita somente depois do próximo backup do banco de dados. -> Activating a new log file requires the data of the database to be backed up beforehand. When you check this option, a warning message informs you that a backup is necessary. The creation of the log file is postponed and it will actually be created only after the next backup of the database. -## Backup & Restore +## Cópia de segurança e restauração -Modifying backup and restore options is optional. Their default values correspond to a standard use of the function. +Modificar as opções de cópia de segurança e restauração é opcional. Seus valores padrão correspondem ao uso padrão da função. ![](assets/en/Backup/backup04.png) -### General settings +### Seção Geral -- **Keep only the last X backup files**: This parameter activates and configures the mechanism used to delete the oldest backup files, which avoids the risk of saturating the disk drive. This feature works as follows: Once the current backup is complete, 4D deletes the oldest archive if it is found in the same location as the archive being backed up and has the same name (you can request that the oldest archive be deleted before the backup in order to save space). If, for example, the number of sets is set to 3, the first three backups create the archives MyBase-0001, MyBase-0002, and MyBase-0003 respectively. During the fourth backup, the archive MyBase-0004 is created and MyBase-0001 is deleted. By default, the mechanism for deleting sets is enabled and 4D keeps 3 backup sets. To disable the mechanism, simply deselect the option. - - > This parameter concerns both database and log file backups. +- **Conservar unicamente os últimos X arquivos de cópia de segurança**: este parâmetro ativa e configura o mecanismo utilizado para eliminar os arquivos de cópia de segurança mais antigos, o que evita o risco de saturar a unidade de disco. Esta funcionalidade opera da seguinte maneira: uma vez finalizado o backup atual, 4D elimina o arquivo mais antigo se for encontrado no mesmo local que o arquivo do qual se está fazendo o backup e tiver o mesmo nome (pode solicitar que o arquivo mais antigo se elimine antes do backup para poupar espaço). Se, por exemplo, o número de conjuntos se definir como 3, as três primeiras cópias de segurança criam os arquivos MyBase-0001, MyBase-0002 e MyBase-0003 respectivamente. Durante o quarto backup, o arquivo MyBase-0004 é criado e MyBase-0001 é apagado. Como padrão, o mecanismo de eliminação de conjuntos está ativado e 4D salva 3 conjuntos de cópias de segurança. Para desativar o mecanismo, simplesmente desmarque a opção. +> Esse parâmetro se refere tanto aos bancos de dados quanto aos arquivos de registro. -- **Backup only if the data file has been modified**: When this option is checked, 4D starts scheduled backups only if data has been added, changed or deleted in the database since the last backup. Otherwise, the scheduled backup is cancelled and put off until the next scheduled backup. No error is generated; however the backup journal notes that the backup has been postponed. This option also allows saving machine time for the backup of databases principally used for viewing purposes. Please note that enabling this option does not take any modifications made to the project files or attached files into account. - - > This parameter concerns both database and log file backups. +- **Fazer Cópia de segurança só se o arquivo de dados tiver sido modificado**: quando marcar esta opção, 4D inicia as cópias de segurança programadas só dados tiverem sido adicionados, modificados ou eliminados desde a última cópia de segurança. Senão, o backup programado é cancelado e abandonado até o próximo backup programado. Nenhum erro é gerado, entretanto o diário de cópias de segurança assinala que a cópia de segurança foi adiada. Esta opção também permite poupar tempo de máquina para a cópia de segurança de bancos de dados utilizados principalmente para visualização. Lembre que ao ativar esta opção não se levam em consideração as modificações realizadas nos arquivos de estrutura ou nos arquivos anexos. +> Esse parâmetro se refere tanto aos bancos de dados quanto aos arquivos de registro. -- **Delete oldest backup file before/after backup**: This option is only used if the "Keep only the last X backup files" option is checked. It specifies whether 4D should start by deleting the oldest archive before starting the backup (**before** option) or whether the deletion should take place once the backup is completed (**after** option). In order for this mechanism to work, the oldest archive must not have been renamed or moved. +- **Eliminar o arquivo de cópia de segurança mais antigo antes/depois da cópia de segurança**: esta opção só se utiliza se a opção "Conservar só os últimos X arquivos de cópia de segurança" estiver marcada. Especifica se 4D deve começar apagando o último arquivo antes de começar o backup (opção**antes**) ou se deve apagar depois que o backup tiver sido concluído (opção**depois**). Para que os mecanismos funcionem, o arquivo mais velho não deve ser renomeado nem movido. -- **If backup fails**: This option allows setting the mechanism used to handle failed backups (backup impossible). When a backup cannot be performed, 4D lets you carry out a new attempt. - - - **Retry at the next scheduled date and time**: This option only makes sense when working with scheduled automatic backups. It amounts to cancelling the failed backup. An error is generated. - - **Retry after X second(s), minute(s) or hour(s)**: When this option is checked, a new backup attempt is executed after the wait period. This mechanism allows anticipating certain circumstances that may block the backup. You can set a wait period in seconds, minutes or hours using the corresponding menu. If the new attempt also fails, an error is generated and the failure is noted in the status area of the last backup and in the backup journal file. - - **Cancel the operation after X attempts**: This parameter is used to set the maximum number of failed backup attempts. If the backup has not been carried out successfully after the maximum number of attempts set has been reached, it is cancelled and the error 1401 is generated ("The maximum number of backup attempts has been reached; automatic backup is temporarily disabled"). In this case, no new automatic backup will be attempted as long as the application has not been restarted, or a manual backup has been carried out successfully. This parameter is useful in order to avoid a case where an extended problem (requiring human intervention) that prevented a backup from being carried out would have led to the application repeatedly attempting the backup to the detriment of its overall performance. By default, this parameter is not checked. +- **Se a cópia de segurança falhar**: Esta opção permite estabelecer o mecnaismo usado para manejar falhas no backup (cópia de segurança impossível. Quando uma cópia de segurança não puder ser realizada, 4D deixa que realize uma nova tentativa. + - **Tentar novamente na próxima data e hora programada**: esta opção só tem sentido quando trabalhar com cópias de segurança automáticas programadas. Equivale a anular a cópia de segurança que falhou. Um erro é gerado. + - **Tentar novamente depois de X segundo(s), minuto(s) ou hora(s)**: Quando essa opção for marcada, um nova tentativa de backup é executada depois do período de espera. Este mecanismo permite antecipar certas circunstancias que possam bloquear a cópia de segurança. Pode estabelecer um período de espera em segundos, minutos ou horas utilizando o menu correspondente. Se a nova tentativa também falhar, um erro é gerado e a falha é notada na área de status do último backup e no arquivo de histórico de backup. + - **Cancelar a operação depois de X intentos**: este parâmetro se utiliza para definir o número máximo de tentativas de cópia de segurança que falharam. Se o backup não tiver sido realizado com sucesso depois do número máximo de tentativas estabelecido tiver sido alcançado, ele será cancelado e o erro 1401 é gerado ("Número máximo de tentativas de backup foi alcançado; backup automático foi desativado temporariamente"). Nesse caso, não se fará mais backups automáticos até que a aplicação seja reiniciada ou um backup manual se realize com sucesso. Este parâmetro é útil para evitar um caso em que um problema prolongado (que exija a intervenção humana) que impedisse a realização de uma cópia de segurança levasse a aplicação a tentar repetidamente a cópia de segurança, comprometendo seu rendimento geral. Como padrão, esse parâmetro não é marcado. -> 4D considers a backup as failed if the database was not launched at the time when the scheduled automatic backup was set to be carried out. +> 4D considera um backup como tendo falhado se o banco de dados não tiver sido lançado na hora que estava programada o backup automático. -### Archive +### Arquivo +Essas opções se aplicam aos arquivos de cópia de segurança principais e aos arquivos de cópia de segurança do histórico. -These options apply to main backup files and to log backup files. +- **Tamanho do segmento (Mb)** 4D lhe permite segmentar os arquivos, ou seja, cortá-los em tamanhos mais pequenos. Esse funcionamento permite, por exemplo, armazenar uma cópia de segurança em vários discos diferentes (DVD, dispositivos usb pendrive, etc). Durante a restauração, 4D vai fusionar automaticamente os segmentos. Cada segmento é chamado MyDatabase[xxxx-yyyy].4BK, onde xxxx é o número de backup e yyyy for o número de segmento. Por exemplo, os três segmentos da cópia de segurança do banco de dados MeuBanco se chamam MeuBanco[0006-0001].4BK, MeuBanco[0006-0002].4BK e MeuBanco[0006-0003].4BK. O menu **Tamanho do segmento** é um combo box que permite estabelecer o tamanho em MB de cada segmento da cópia de segurança. Pode escolher um dos tamanhos pré-estabelecidos ou digitar um tamanho específico entre 0 e 2048. Se passar 0, não se produz nenhuma segmentação (isso equivale a passar **Nenhum**). -- **Segment Size (Mb)** 4D allows you to segment archives, i.e., to cut it up into smaller sizes. This behavior allows, for example, the storing of a backup on several different disks (DVDs, usb devices, etc.). During restore, 4D will automatically merge the segments. Each segment is called MyDatabase[xxxx-yyyy].4BK, where xxxx is the backup number and yyyy is the segment number. For example, the three segments of the MyDatabase database backup are called MyDatabase[0006-0001].4BK, MyDatabase[0006-0002].4BK and MyDatabase[0006-0003].4BK. The **Segment Size** menu is a combo box that allows you to set the size in MB for each segment of the backup. You can choose one of the preset sizes or enter a specific size between 0 and 2048. If you pass 0, no segmentation occurs (this is the equivalent of passing **None**). +- **Taxa de compressão** Por padrão, 4D comprime as cópias de segurança para ajudar a poupar espaço no disco. Entretanto, a fase de compressão de arquivo pode retardar o processo de backup quando lidar com grandes volumes de dados. A opção **Compression Rate** permite ajustar a compressão de arquivo: + - **Nenhum:** Não se aplica compressão de arquivos. O backup é mais rápido, mas os arquivos são bem maiores. + - **Rápido** (padrão): Essa opção é um compromisso entre a velocidade de backup e tamanho de arquivo. + - **Compactar** : a taxa máxima de compressão é aplicada aos arquivos. Os arquivos ocupam o mínimo espaço possível no disco, mas o backup é mais lento. -- **Compression Rate** By default, 4D compresses backups to help save disk space. However, the file compression phase can noticeably slow down backups when dealing with large volumes of data. The **Compression Rate** option allows you to adjust file compression: - - - **None:** No file compression is applied. The backup is faster but the archive files are considerably larger. - - **Fast** (default): This option is a compromise between backup speed and archive size. -- **Compact**: The maximum compression rate is applied to archives. The archive files take up the least amount of space possible on the disk, but the backup is noticeable slowed. +- **Taxa de Entrelaçamento e de Redundância** 4D gera arquivos usando algoritmos específicos baseados em mecanismos de otimização (interlacing) e segurança (redundância). Pode estabelecer esses mecanismos de acordo com suas necessidades. Os menus contém para essas opções as taxas **Baixo**, **Médio**, **Alto** e **Nenhum** (padrão). + - **Taxa de Entrelaçamento**: O Interlacing consiste de armazenar dados em setores não adjacentes para limitar riscos no caso de danos de setor. Quanto maior a taxa, maior a segurança; entretanto, o processamento de dados usa mais memória. + - **Taxa de redundância**: Redundância permite a segurança de dados em arquivos repetindo a mesma informação várias vezes. Quanto maior a taxa de redundância, melhor a segurança, mas o armazenamento é mais lento e o tamanho dos arquivos aumenta. -- **Interlacing Rate and Redundancy Rate** 4D generates archives using specific algorithms that are based on optimization (interlacing) and security (redundancy) mechanisms. You can set these mechanisms according to your needs. The menus for these options contain rates of **Low**, **Medium**, **High** and **None** (default). - - - **Interlacing Rate**: Interlacing consists of storing data in non-adjacent sectors in order to limit risks in the case of sector damage. The higher the rate, the higher the security; however, data processing will use more memory. - - **Redundancy Rate**: Redundancy allows securing data present in a file by repeating the same information several times. The higher the redundancy rate, the better the file security; however, storage will be slower and the file size will increase accordingly. -### Automatic Restore +### Restauração automática -- **Restore last backup if database is damaged**: When this option is checked, the program automatically starts the restore of the data file of the last valid backup of the database, if an anomaly is detected (corrupted file, for example) during database launch. No intervention is required on the part of the user; however, the operation is logged in the backup journal. - - > In the case of an automatic restore, only the data file is restored. If you wish to get the attached files or the project files, you must perform a manual restore. +- **Restaura a última cópia de segurança se o banco de dados for danificado**: Quando essa opção for marcada, o programa inicia automaticamente a restauração do arquivo de dados do último backup válido do banco, se uma anomalia for detectada (arquivo corrupto por exemplo) durante a o lançamento do banco de dados. Nenhuma intervenção do usuário é necessária, mas a operação é gravada no diário da cópia de segurança. +> No caso de uma restauração automatica, só os arquivos de dados são restaurados. Se quiser os arquivos anexados ou os arquivos de projeto, precisa fazer uma restauração manual -- **Integrate last log file if database is incomplete**: When this option is checked, the program automatically integrates the log file when opening or restoring the database. - - - When opening a database, the current log file is automatically integrated if 4D detects that there are operations stored in the log file that are not present in the data. This situation arises, for example, if a power outage occurs when there are operations in the data cache that have not yet been written to the disk. - - When restoring a database, if the current log file or a log backup file having the same number as the backup file is stored in the same folder, 4D examines its contents. If it contains operations not found in the data file, the program automatically integrates it. +- **Integrar o último arquivo de histórico se o banco de dados estiver incompleto**: Quando essa opção for marcada, o programa integra automaticamente o arquivo de histórico quando abrir ou restaurar o banco de dados. + - Quando abrir um banco de dados, o arquivo de histórico atual é integrado automaticamente se 4D detectar que há operações armazenadas no arquivo de log que não estejam presentes nos dados. Esta situação se produz, por exemplo, se acontecer uma falta de energia quando acontecerem operações no cache de dados que ainda não foram escritos no disco. + - Quando restaurar um banco de dados, se o arquivo atual de hsitórico, ou se um arquivo de backup de histórico tiverem o mesmo número que um arquivo de backup e estiverem armazenados na mesma pasta, 4D vai examinar seu conteúdo. Se conter operações não encontradas no arquivo de dados, o programa automaticamente as integra. -The user does not see any dialog box; the operation is completely automatic. The goal is to make use as easy as possible. The operation is logged in the backup journal. \ No newline at end of file +O usuário não vê uma caixa de diálogo, a operação é automática. O objetivo é fazer com que seja tão fácil quanto possível. A operação é registrada no diário de cópias de backup. diff --git a/website/translated_docs/pt/Concepts/about.md b/website/translated_docs/pt/Concepts/about.md index 746f62e02e023d..192b535af6b600 100644 --- a/website/translated_docs/pt/Concepts/about.md +++ b/website/translated_docs/pt/Concepts/about.md @@ -1,61 +1,62 @@ --- id: about -title: About the 4D Language +title: Sobre a linguagem 4D --- -The 4D built-in language, consisting of more than 1300 commands, makes 4D a powerful development tool for database applications on desktop computers. You can use the 4D language for many different tasks—from performing simple calculations to creating complex custom user interfaces. For example, you can: +A linguagem integrada 4D, que conta com mais de 1300 comandos, faz com que 4D seja uma ferramenta de desenvolvimento poderosa para aplicações de banco de dados em computadores desktop. Pode usar a linguagem 4D para muitas tarefas diferentes, desde a realização de cálculos simples até a criação de interfaces complexas de usuário personalizadas. Por exemplo é possível: -- Programmatically access any of the record management editors (order by, query, and so on), -- Create and print complex reports and labels with the information from the database, -- Communicate with other devices, -- Send emails, -- Manage documents and web pages, -- Import and export data between 4D databases and other applications, -- Incorporate procedures written in other languages into the 4D programming language. +- Acessar por programação qualquer dos editores de gestão de registros (ordenar por, pesquisar, etc), +- Criar e imprimir relatórios complexos ou etiquetas com a informação do banco de dados, +- Comunicar-se com outros aparelhos, +- Enviar emails, +- Gerenciar documentos e páginas web, +- Importação e exportação de dados entre os bancos de dados 4D e outras aplicações, +- incorporar procedimentos escritos em outras linguagens na linguagem de programação 4D -The flexibility and power of the 4D programming language make it the ideal tool for all levels of users and developers to accomplish a complete range of information management tasks. Novice users can quickly perform calculations. Experienced users without programming experience can customize their databases. Experienced developers can use this powerful programming language to add sophisticated features and capabilities to their databases, including file transfer, communications, monitoring. Developers with programming experience in other languages can add their own commands to the 4D language. +A flexibilidade e poder da lnguagem de programação 4D faz com que seja ferramenta ideal para todos os níveis de usuários e desenvolvedores oferecendo uma completa gama de tarefas de gestão da informação. Os usuários principiantes podem realizar rapidamente os cálculos. Os usuários mais experientes podem personalizar seus bancos de dados mesmo sem saber programação. Desenvolvedores com experiência podem usar essa linguagem de programação poderosa para adicionar funcionalidades sofisticadas para seus bancos de dados, inclusive transferência de arquivos, comunicação, monitoramento. Os desenvolvedores com experiência em programação em outras linguagens podem adicionar seus próprios comandos à linguagem 4D. -## What is a Language? -The 4D language is not very different from the spoken language we use every day. It is a form of communication used to express ideas, inform, and instruct. Like a spoken language, 4D has its own vocabulary, grammar, and syntax; you use it to tell 4D how to manage your database and data. +## O que é uma linguagem? -You do not need to know everything in the language in order to work effectively with 4D. In order to speak, you do not need to know the entire English language; in fact, you can have a small vocabulary and still be quite eloquent. The 4D language is much the same—you only need to know a small part of the language to become productive, and you can learn the rest as the need arises. +A linguagem 4D não é muito diferente da linguagem falada usada diariamente. É uma forma de comunicação usada para expressar ideias, informar e instruir. Como em uma linguagem falada, 4D tem seu vocabulário, gramática e sintaxe; pode usar a linguagem para dizer a 4D como gerenciar seus dados e seu banco de dados. -## Why use a Language? +Não precisa saber tudo sobre a linguagem para começar a trabalhar com 4D de forma efetiva. Da mesma forma que para falar você não precisa saber tudo sobre sua língua; na verdade, é possível ter um vocabulário pequeno e ainda ser bem eloquente. A linguagem 4D é mais ou menos a mesma coisa - precisa saber apenas uma pequena parte da linguagem para ser produtivo, e pode aprender o resto quando tiver necessidade. -At first it may seem that there is little need for a programming language in 4D. In the Design environment, 4D provides flexible tools that require no programming to perform a wide variety of data management tasks. Fundamental tasks, such as data entry, queries, sorting, and reporting are handled with ease. In fact, many extra capabilities are available, such as data validation, data entry aids, graphing, and label generation. +## Por que usar a Linguagem? -Then why do we need a 4D language? Here are some of its uses: +No começo pode parecer que não há muita necessidade de uma linguagem de programação em 4D. No ambiente Design, 4D fornece ferramentas flexíveis que exigem programação para realizar uma grande variedade de tarefas de gerenciamento de dados. Tarefas fundamentais, como entrada de dados, pesquisas, ordenação e relatórios são manejados com facilidade. Muitas capacidades extras estão disponíveis, tais como validação de dados, as ajudas para a introdução de dados, os gráficos e a geração de etiquetas. -- Automate repetitive tasks: These tasks include data modification, generation of complex reports, and unattended completion of long series of operations. -- Control the user interface: You can manage windows and menus, and control forms and interface objects. -- Perform sophisticated data management: These tasks include transaction processing, complex data validation, multi-user management, sets, and named selection operations. -- Control the computer: You can control serial port communications, document management, and error management. -- Create applications: You can create easy-to-use, customized databases that run in the Application environment. -- Add functionality to the built-in 4D Web server: build and update dynamic web pages filled with your data. +Então para que é necessário uma linguagem 4D? Aqui estão alguns usos: -The language lets you take complete control over the design and operation of your database. 4D provides powerful “generic” editors, but the language lets you customize your database to whatever degree you require. +- automatizar tarefas repetitivas: essas tarefas incluem modificação de dados, geração de relatórios complexos e realização sem intervenções de séries longas de operações. +- Controle a interface de usuário: pode gerenciar as janelas e os menus, e controlar os formulários e os objetos da interface. +- Realizar uma gestão de dados sofisticada: essas tarefas incluem processamento de transação, validação de dados complexos, gerenciamento multiusuário, e operações de seleção temporárias. +- Controle o computador: pode controlar as comunicações de portos seriais, a gestão de documentos e a gestão de erros. +- Criar aplicações: pode criar bancos de dados personalizados e fáceis de usar que rodam no ambiente Aplicação. +- Adicionar funcionalidade ao servidor integrado web 4D: construir e atualizar páginas web dinâmicas preenchidas com seus dados. -## Taking Control of Your Data +A linguagem lhe dá controle total sobre o design e operação de seus banco de dados. 4D fornece editores "genéricos", mas a linguagem permite que personalize seu banco de dados para qualquer grau necessário. -The 4D language lets you take complete control of your data in a powerful and elegant manner. The language is easy enough for a beginner, and sophisticated enough for an experienced application developer. It provides smooth transitions from built-in database functions to a completely customized database. +## Tomar o controle de seus dados -The commands in the 4D language provide access to the standard record management editors. For example, when you use the command, you are presented with the Query Editor (which can be accessed in the Design mode using the Query command in the Records menu. You can tell the command to search for explicitly described data. For example, ([People];[People]Last Name="Smith") will find all the people named Smith in your database. +A linguagem 4D lhe permite tomar o controle total de seus dados de uma maneira poderosa e elegante. A linguagem é fácil o suficiente para os iniciantes e sofisticada o bastante para os desenvolvedores com experiência. Fornece transições suavez desde as funções do banco de dados integradas até ter um banco de dados completamente personalizado. -The 4D language is very powerful—one command often replaces hundreds or even thousands of lines of code written in traditional computer languages. Surprisingly enough, with this power comes simplicity—commands have plain English names. For example, to perform a query, you use the `QUERY` command; to add a new record, you use the `ADD RECORD` command. +Os comandos da linguagem 4D oferecem acesso aos editores padrão de gestão de registros. Por exemplo, quando usar o comando Query, é apresentado o Editor de Consultas (ao qual se pode acessar no modo Desenho, usando o comando Query do menu Registros). Pode dizer ao comando para pesquisar por dados descritos explicitamente. Por exemplo, ([People];[People]Last Name="Smith") encontra todas as pessoas chamadas Smith em seu banco de dados. -The language is designed for you to easily accomplish almost any task. Adding a record, sorting records, searching for data, and similar operations are specified with simple and direct commands. But the language can also control the serial ports, read disk documents, control sophisticated transaction processing, and much more. +A linguagem 4D é bem poderosa - um comando pode substituir centenas ou até milhares de linhas de códigos escritas nas linguagens tradicionais. Surpreendentemente, esse poder vem com bastante simplicidade - comandos com nomes em inglês comum. Por exemplo, para realizar uma pesquisa, se utiliza o comando `QUERY`; para adicionar um novo registro, se utiliza o comando `ADD RECORD`. -The 4D language accomplishes even the most sophisticated tasks with relative simplicity. Performing these tasks without using the language would be unimaginable for many. Even with the language’s powerful commands, some tasks can be complex and difficult. A tool by itself does not make a task possible; the task itself may be challenging and the tool can only ease the process. For example, a word processor makes writing a book faster and easier, but it will not write the book for you. Using the 4D language will make the process of managing your data easier and will allow you to approach complicated tasks with confidence. +A linguagem foi criada para você realizar facilmente qualquer tarefa. Adicionar um registro, ordenar registros, pequisar por dados e operações similares são especificadas com comandos simples e diretos. Mas a linguagem também pode controlar as portas seriais, ler documentos no disco, controlar o processamento de transações complexas e muito mais. -## Is it a “Traditional” Computer Language? +A linguagem 4D realiza mesmo as tarefas mais sofisticadas com relativa simplicidade. Realizar essas tarefas sem usar a linguagem seria muito complicado. Mesmo com os comandos poderosos da linguagem, algumas tarefas podem ser complexas e difícil. Uma ferramenta sozinha não torna uma tarefa possível; a tarefa em si mesma pode ser tão difícil que a ferramenta só vai facilitar o processo. Por exemplo, um processador de textos faz com que escrever um livro seja muito mais fácil e rápido, mas não vai escrever o livro para você. Usar a linguagem 4D faz com que o processamento de gerenciamento de seus dados seja mais fácil e permite lidar com tarefas complicadas com confiança. -If you are familiar with traditional computer languages, this section may be of interest. If not, you may want to skip it. +## Essa é uma linguagem de computação "tradicional?"? -The 4D language is not a traditional computer language. It is one of the most innovative and flexible languages available on a computer today. It is designed to work the way you do, and not the other way around. +Se estiver familiarizado com as linguagens tradicionais de programação, essa seção será de seu interesse. Se não, também pode pular o próximo parágrafo. -To use traditional languages, you must do extensive planning. In fact, planning is one of the major steps in development. 4D allows you to start using the language at any time and in any part of your database. You may start by adding a method to a form, then later add a few more methods. As your database becomes more sophisticated, you might add a project method controlled by a menu. You can use as little or as much of the language as you want. It is not “all or nothing,” as is the case with many other databases. +A linguagem 4D não é uma linguagem de programação tradicional. É uma das linguagens mais inovadoras e flexíveis do momento. Foi criada para adaptar-se a você e não o contrário. -Traditional languages force you to define and pre-declare objects in formal syntactic terms. In 4D, you simply create an object, such as a button, and use it. 4D automatically manages the object for you. For example, to use a button, you draw it on a form and name it. When the user clicks the button, the language automatically notifies your methods. +Para usar linguagens tradicionais, é preciso preparação ampla. De fato, planejamento é um dos principais passos de desenvolvimento. 4D deixa que você comece a usar a linguagem a qualquer momento e em qualquer parte do banco de dados. Pode começar adicionando um método para um formulário depois adicionar um ou mais métodos. A medida em que seu banco de dados ficar mais sofisticado, pode adicionar um método de projeto controlado por um menu. Pode usar o quanto quiser da linguagem. Não é algo "tudo ou nada", como é o caso em vários bancos de dados. -Traditional languages are often rigid and inflexible, requiring commands to be entered in a very formal and restrictive style. The 4D language breaks with tradition, and the benefits are yours. \ No newline at end of file +As linguagens tradicionais forçam você a definir e pré-declarar objetos em termos sintáticos formais. Em 4D simplesmente se pode criar um objeto, como um botão, e usá-lo. 4D automaticamente gerencia o objeto para você. Por exemplo, para usar um botão, o desenha em um formulário e lhe dá um nome. Quando o usuário clicar no botão, a linguagem notifica automaticamente a seus métodos. + +Linguagens tradicionais geralmente são rígidas e inflexíveis, exigindo que comandos sejam digitados de modo formal e em estilo restritivo. A linguagem 4D rompe com essa tradição para o benefício do usuário. diff --git a/website/translated_docs/pt/Concepts/arrays.md b/website/translated_docs/pt/Concepts/arrays.md index 14e6e4786322ea..8ce70123b96d08 100644 --- a/website/translated_docs/pt/Concepts/arrays.md +++ b/website/translated_docs/pt/Concepts/arrays.md @@ -3,35 +3,33 @@ id: arrays title: Arrays --- -An **array** is an ordered series of **variables** of the same type. Each variable is called an **element** of the array. An array is given its size when it is created; you can then resize it as many times as needed by adding, inserting, or deleting elements, or by resizing the array using the same command used to create it. Array elements are numbered from 1 to N, where N is the size of the array. An array always has a special [element zero](#using-the-element-zero-of-an-array). Arrays are 4D variables. Like any variable, an array has a scope and follows the rules of the 4D language, though with some unique differences. +Um **array** é uma série ordenada de**variáveis** do mesmo tipo. Cada variável é um **elemento** do array. Um array recebe seu tamanho quando é criado, depois pode ser redimensionado quantas vezes sejam necessário, adicionando, inserindo ou eliminado elementos, ou redimensionando o array através do mesmo comando usado para criá-lo. Elementos do array são numerados de 1 a N, onde N é o tamanho do array. Um array sempre tem um elemento especial [elemento zero](#using-the-element-zero-of-an-array). Arrays são variáveis 4D. Como qualquer variável, um array tem um alcance/escopo e segue as regras da linguagem 4D, mas com algumas diferenças únicas. +> Na maioria dos casos é recomendado usar **collections** ao invés de **arrays**. Collections são mais flexíveis e oferecem uma maior gama de métodos dedicados. Para saber mais veja [Collection](Concepts/dt_collection.md). -> In most cases, it is recommended to use **collections** instead of **arrays**. Collections are more flexible and provide a wide range of dedicated methods. For more information, please refer to the [Collection](Concepts/dt_collection.md) section. -## Creating Arrays +## Criar Arrays -You create an array with one of the array declaration commands from the "Array" theme. Each array declaration command can create or resize one-dimensional or two-dimensional arrays. For more information about two-dimensional arrays, see the [two dimensional arrays](#two-dimensional-arrays) section. +Pode criar um array com um dos comandos de declaração de array no tema "Array". Cada comando de declaração de array pode criar ou redimensionar arrays unidimensionais ou bidimensionais. Para mais informação sobre arrays bidimensionais, consulte [arrays bidimensionais](#two-dimensional-arrays). -The following line of code creates (declares) an Integer array of 10 elements: +A linha de código abaixo cria (declara) um array Inteiro de 10 elementos: ```4d ARRAY INTEGER(aiAnArray;10) ``` -Then, the following code resizes that same array to 20 elements: - +Depois, o código a seguir redimensiona o mesmo array para 20 elementos: ```4d ARRAY INTEGER(aiAnArray;20) ``` -Then, the following code resizes that same array to no elements: - +Depois, o código a seguir redimensiona o mesmo array para 0 elementos: ```4d ARRAY INTEGER(aiAnArray;0) ``` -## Assigning values in arrays +## Atribuir valores em arrays -You reference the elements in an array by using curly braces ({…}). A number is used within the braces to address a particular element; this number is called the element number. The following lines put five names into the array called atNames and then display them in alert windows: +Pode referenciar os elementos em um array usando chaves ({…}). Dentro das chaves se utiliza um número para dirigir-se a um elemento concreto; este número se denomina número de elemento. As linhas abaixo põe cinco nomes em um array chamado atNames e então exibe-os na janela de alerta: ```4d ARRAY TEXT(atNames;5) @@ -44,28 +42,28 @@ You reference the elements in an array by using curly braces ({…}). A number i ALERT("The element #"+String($vlElem)+" is equal to: "+atNames{$vlElem}) End for ``` +Lembre da sintaxe atNames{$vlElem}. Ao invés de especificar um literal numérico como atNames{3}, pode usar uma variável numérica para indicar a quais elementos de um array se dirige. Utilizando a iteração que oferece uma estrutura de loop ( `For... End for`, `Repeat... Until` ou `While... End while`), as peças compactas de código podem dirigir-se a todos ou a parte dos elementos de um array. -Note the syntax atNames{$vlElem}. Rather than specifying a numeric literal such as atNames{3}, you can use a numeric variable to indicate which element of an array you are addressing. Using the iteration provided by a loop structure (`For...End for`, `Repeat...Until` or `While...End while`), compact pieces of code can address all or part of the elements in an array. +**Importante:** Não confunda o operador de atribuição := com o operador de comparação de igualdade (=). As operações de atribuição e comparação são bem diferentes. -**Important:** Be careful not to confuse the assignment operator (:=) with the comparison operator, equal (=). Assignment and comparison are very different operations. -### Assigning an array to another array +### Atribuindo um array para outro array +Diferente de variáveis texto ou strings, não pode atribuir um array para outro. Para copiar (atribuir) um array para outro, use `COPY ARRAY`. -Unlike text or string variables, you cannot assign one array to another. To copy (assign) an array to another one, use `COPY ARRAY`. -## Using the element zero of an array +## Usar o elemento zero de um array -An array always has an element zero. While element zero is not shown when an array supports a form object, there is no restriction(*) in using it with the language. +Um array sempre tem um elemento zero. Apesar do elemento zero não ser mostrado quando um array for compatível com um objeto formulário, não há restrições (*) ao usá-lo com a linguagem. -Here is another example: you want to initialize a form object with a text value but without setting a default value. You can use the element zero of the array: +Aqui há outro exemplo: se quiser inicializar um objeto formulário com um valor texto mas sem estabelecer um valor padrão. Pode usar o elemento zero do array: ```4d - // method for a combo box or drop-down list - // bound to atName variable array + // método para um combo box ou lista drop down + // vinculado ao array de variável atName Case of :(Form event code=On Load) - // Initialize the array (as shown further above) - // But use the element zero + // Initializar o array (como mostrado acima) + // Mas use o elemento zero ARRAY TEXT(atName;5) atName{0}:=Please select an item" atName{1}:="Text1" @@ -73,51 +71,52 @@ Here is another example: you want to initialize a form object with a text value atName{3}:="Text3" atName{4}:="Text4" atName{5}:="Text5" - // Position the array to element 0 + // Posiciona o array para elemento 0 atName:=0 End case ``` -(*) However, there is one exception: in an array type List Box, the zero element is used internally to store the previous value of an element being edited, so it is not possible to use it in this particular context. +(*) Entretanto, há uma excepção: em um array tipo List Box o elemento zero se usa internamente para armazenar o valor anterior de um elemento que se está editando, não é possível para usar no seu contexto particular. -## Two-dimensional Arrays -Each of the array declaration commands can create or resize one-dimensional or two-dimensional arrays. Example: +## Arrays de duas dimensões + +Cada comando de declaração de comandos pode criar ou redimensionar arrays unidimensionais ou bidimensionais. Exemplo: ```4d - ARRAY TEXT(atTopics;100;50) // Creates a text array composed of 100 rows of 50 columns + ARRAY TEXT(atTopics;100;50) // Cria um array de texto composto de 100 linhas de 50 colunas ``` -Two-dimensional arrays are essentially language objects; you can neither display nor print them. +Os arrays de duas dimensões são essencialmente objetos de linguagem; não podem se mostrar nem imprimir. -In the previous example: +No exemplo anterior: -- atTopics is a two-dimensional array -- atTopics{8}{5} is the 5th element (5th column...) of the 8th row -- atTopics{20} is the 20th row and is itself a one-dimensional array -- `Size of array(atTopics)` returns 100, which is the number of rows -- `Size of array(atTopics{17})` returns 50, which the number of columns for the 17th row +- atTopics é um array de duas dimensõees +- atTopics{8}{5} é o elemento 5a (5a coluna...) da 8a fila +- atTopics{20} é a 20a linha é por sua vez um array dimensão +- `Tamanho do array(atTopics)` devolve 100, que é o número de filas +- `Tamanho de array(atTopics{17})` devolve 50, que é o número de colunas da linha 17 -In the following example, a pointer to each field of each table in the database is stored in a two-dimensional array: +No seguinte exemplo, um ponteiro a cada campo de cada tabela do banco de dados se armazena em um array de duas dimensões: ```4d C_LONGINT($vlLastTable;$vlLastField) C_LONGINT($vlFieldNumber) - // Create as many rows (empty and without columns) as there are tables + // Criar tantas linhas (vazias e sem colunas) como tabelas $vlLastTable:=Get last table number - ARRAY POINTER(<>apFields;$vlLastTable;0) //2D array with X rows and zero columns - // For each table + ARRAY POINTER(<>apFields;$vlLastTable;0) /Array 2D com X linhas e zero colunas + // Para cada tabela For($vlTable;1;$vlLastTable) If(Is table number valid($vlTable)) $vlLastField:=Get last field number($vlTable) - // Give value of elements + // Dar valor aos elementos $vlColumnNumber:=0 For($vlField;1;$vlLastField) If(Is field number valid($vlTable;$vlField)) $vlColumnNumber:=$vlColumnNumber+1 - //Insert a column in a row of the table underway + //Insere uma coluna em uma linha da tabela em curso INSERT IN ARRAY(<>apFields{$vlTable};$vlColumnNumber;1) - //Assign the "cell" with the pointer + //Atribuir à "célula" com o ponteiro <>apFields{$vlTable}{$vlColumnNumber}:=Field($vlTable;$vlField) End if End for @@ -125,12 +124,12 @@ In the following example, a pointer to each field of each table in the database End for ``` -Provided that this two-dimensional array has been initialized, you can obtain the pointers to the fields for a particular table in the following way: +Sempre que tiver inicializado este array de duas dimensôes, se pedem obter os ponteiros aos campos de uma tabela concreta da seguinte maneira: ```4d - // Get the pointers to the fields for the table currently displayed at the screen: + // Obter os ponteiros aos campos para a tabela que se mostra atualmente na tela: COPY ARRAY(◊apFields{Table(Current form table)};$apTheFieldsIamWorkingOn) - // Initialize Boolean and Date fields + // Inicializar os campos booleanos e de data For($vlElem;1;Size of array($apTheFieldsIamWorkingOn)) Case of :(Type($apTheFieldsIamWorkingOn{$vlElem}->)=Is date) @@ -141,41 +140,40 @@ Provided that this two-dimensional array has been initialized, you can obtain th End for ``` -**Note:** As this example suggests, rows of a two-dimensional arrays can be the same size or different sizes. - -## Arrays and Memory +**Nota:** como sugere este exemplo, as linhas de um array de duas dimensões podem ter o mesmo tamanho ou diferentes tamanhos. -Unlike the data you store on disk using tables and records, an array is always held in memory in its entirety. +## Arrays e memória -For example, if all US zip codes were entered in the [Zip Codes] table, it would contain about 100,000 records. In addition, that table would include several fields: the zip code itself and the corresponding city, county, and state. If you select only the zip codes from California, the 4D database engine creates the corresponding selection of records within the [Zip Codes] table, and then loads the records only when they are needed (i.e., when they are displayed or printed). In order words, you work with an ordered series of values (of the same type for each field) that is partially loaded from the disk into the memory by the database engine of 4D. +A diferença dos dados que se armazenam no disco mediante tabelas e registros, um array se mantém sempre na memória em sua totalidade. -Doing the same thing with arrays would be prohibitive for the following reasons: +Por exemplo, se introduzir todos os códigos postais dos EUA na tabela [Zip Codes], conteria por volta de 100.000 registros. Além disso essa tabela incluiria vários campos: o código cep e a cidade, região e estado correspondentes. Se selecionar todos os ceps (zip codes) da Califórnia, o motor de banco de dados 4D cria a seleção correspondente de registros dentro da tabela [Zip Codes] e então carrega os registros só quando forem necessários (ou seja quando forem exibidos ou impressos). Ou seja, você trabalha com uma série ordenada de valores (do mesmo tipo para cada campo) que é carregada parcialmente desde o disco à memória pelo motor do banco de dados 4D. -- In order to maintain the four information types (zip code, city, county, state), you would have to maintain four large arrays in memory. -- Because an array is always held in memory in its entirety, you would have to keep all the zip codes information in memory throughout the whole working session, even though the data is not always in use. -- Again, because an array is always held in memory in its entirety, each time the database is started and then quit, the four arrays would have to be loaded and then saved on the disk, even though the data is not used or modified during the working session. +Fazer a mesma coisa com arrays seria impossível pelas razões abaixo: -**Conclusion:** Arrays are intended to hold reasonable amounts of data for a short period of time. On the other hand, because arrays are held in memory, they are easy to handle and quick to manipulate. +- Para manter os quatro tipos de informação (código postal, cidade, região e estado) teria que manter quatro arrays grandes na memória. +- Como um array sempre é mantido na memória inteiramente, teria que manter toda a informação de códigos postais na memória durante a sessão inteira, mesmo quando os dados não estivessem sendo usados. +- De novo, como um array é sempre mantido na memória em sua totalidade, a cada vez que o banco de dados for iniciados, os quatro arrays teriam que ser carregados e então salvos no disco, mesmo se os dados não forem usados ou modificados na sessão de trabalho. -However, in some circumstances, you may need to work with arrays holding hundreds or thousands of elements. The following table lists the formulas used to calculate the amount of memory used for each array type: +**Conclusão:** os arrays estão pensados para manter quantidades razoáveis de dados durante um curto período de tempo. Por outro lado, como os arrays são mantidos na memória, são fáceis de manejar e rápidos de manipular. -| Array Type | Formula for determining Memory Usage in Bytes | -| --------------- | -------------------------------------------------------------------- | -| Blob | (1+number of elements) * 12 + Sum of the size of each blob | -| Boolean | (31+number of elements)\8 | -| Date | (1+number of elements) * 6 | -| Integer | (1+number of elements) * 2 | -| Long Integer | (1+number of elements) * 4 | -| Object | (1+number of elements) * 8 + Sum of the size of each object | -| Picture | (1+number of elements) * 8 + Sum of the size of each picture | -| Pointer | (1+number of elements) * 8 + Sum of the size of each pointer | -| Real | (1+number of elements) * 8 | -| Text | (1+number of elements) * 20 + (Sum of the length of each text) * 2 | -| Time | (1+number of elements) * 4 | -| Two-dimensional | (1+number of elements) * 16 + Sum of the size of each array | +Entretanto, em algumas circunstâncias, pode precisar trabalhar com arrays que contenham centenas ou milhares de elementos. A tabela abaixo lista as fórmulas usadas para calcular a quantidade de memória usada para cada tipo de array: +| Tipo de array | Fórmula para determinar o uso da memoria em bytes | +| --------------- | ---------------------------------------------------------------------- | +| Blob | (1+número de elementos) * 12 + Soma de tamanho de cada blob | +| Booleano | (31+número de elementos)\N8 | +| Date | (1+número de elementos) * 6 | +| Integer | (1+número de elementos) * 2 | +| Long Integer | (1+número de elementos) * 4 | +| Objeto | (1+número de elementos) * 8 + Soma de tamanho de cada objeto | +| Imagem | (1+número de elementos) * 8 + Soma do tamanho de cada imagem | +| Ponteiro | (1+número de elementos) * 8 + Soma de tamanho de cada ponteiro | +| Real | (1+número de elementos) * 8 | +| Texto | (1+número de elementos) * 20 + (soma da longitude de cada texto) * 2 | +| Hora | (1+número de elementos) * 4 | +| Dois dimensõees | (1+número de elementos) * 16 + Soma do tamanho de cada array | -**Notes:** +**Notas:** -- The size of a text in memory is calculated using this formula: ((Length + 1) * 2) -- A few additional bytes are required to keep track of the selected element, the number of elements, and the array itself. \ No newline at end of file +- O tamanho de um texto em memoria se calcula com esta fórmula ((Longitude + 1) * 2) +- São necessários alguns bytes adicionais para acompanhar o elemento selecionado, o número de elementos, e o próprio array. diff --git a/website/translated_docs/pt/Concepts/cf_branching.md b/website/translated_docs/pt/Concepts/cf_branching.md index 5bfd6f6668ea5a..e969fd7d9cf7d2 100644 --- a/website/translated_docs/pt/Concepts/cf_branching.md +++ b/website/translated_docs/pt/Concepts/cf_branching.md @@ -1,11 +1,11 @@ --- id: branching -title: Branching structures +title: Estruturas condicionais --- -## If...Else...End if +## If... Else... End if -The formal syntax of the `If...Else...End if` control flow structure is: +A sintaxe formal da estrutura condicional `If... Else... End if` é: ```4d If(Boolean_Expression) @@ -15,17 +15,16 @@ The formal syntax of the `If...Else...End if` control flow structure is: End if ``` -Note that the `Else` part is optional; you can write: - +Note que a parte `Else` é opcional; pode escrever: ```4d If(Boolean_Expression) statement(s) End if ``` -The `If...Else...End if` structure lets your method choose between two actions, depending on whether a test (a Boolean expression) is TRUE or FALSE. When the Boolean expression is TRUE, the statements immediately following the test are executed. If the Boolean expression is FALSE, the statements following the Else statement are executed. The `Else` statement is optional; if you omit Else, execution continues with the first statement (if any) following the `End if`. +A estrutura `If... Else... End if` permite a seu método escolher entre duas ações, dependendo de se um teste (uma expressão Booleana) for TRUE ou FALSE. Quando a expressão Booleana for TRUE, são executadas as declarações que seguem imediatamente ao teste. Se a expressão Booleana for FALSE, são executadas as declarações que seguem a linha Else. A declaração `Else` é opcional; se omitir Else, a execução continua com a primeira instrução (se houver) que seguir `End if`. -Note that the Boolean expression is always fully evaluated. Consider in particular the following test: +Note que a expressão booleana é sempre avaliada completamente. Considere particularmente o teste abaixo: ```4d If(MethodA & MethodB) @@ -33,7 +32,7 @@ Note that the Boolean expression is always fully evaluated. Consider in particul End if ``` -he expression is TRUE only if both methods are TRUE. However, even if *MethodA* returns FALSE, 4D will still evaluate *MethodB*, which is a useless waste of time. In this case, it is more interesting to use a structure like: +a expressão é TRUE apenas se ambos os métodos forem TRUE. Entretanto, mesmo se _MethodA_ devolver FALSE, 4D ainda iria avaliar _MethodB_, o que seria uma perda de tempo. Nesse caso, é mais interessante usar uma estrutra como: ```4d If(MethodA) @@ -43,21 +42,21 @@ he expression is TRUE only if both methods are TRUE. However, even if *MethodA* End if ``` -The result is similar and *MethodB* is evaluated only if necessary. +O resultado é parecido mas o _MethodB_ é avaliado somente se necessário. -### Example +### Exemplo ```4d - // Ask the user to enter a name + // Pedir ao usuário que introduza um nome $Find:=Request(Type a name) - If(OK=1) + Si(OK=1) QUERY([People];[People]LastName=$Find) Else - ALERT("You did not enter a name.") + ALERT("Não introduciu um nome.") End if ``` -**Tip:** Branching can be performed without statements to be executed in one case or the other. When developing an algorithm or a specialized application, nothing prevents you from writing: +**Dica:** A ramificação pode ser realizada sem que as instruções sejam executadas em um caso ou no outro. Quando desenvolver um algoritmo ou uma aplicação especializada, nada impede que escreva: ```4d If(Boolean_Expression) @@ -65,8 +64,7 @@ The result is similar and *MethodB* is evaluated only if necessary. statement(s) End if ``` - -or: +ou : ```4d If(Boolean_Expression) @@ -75,10 +73,9 @@ or: End if ``` -## Case of...Else...End case - -The formal syntax of the `Case of...Else...End case` control flow structure is: +## Case of... Else... End case +A sintaxe da estrutura condicional `Case of... Else... End case` é: ```4d Case of :(Boolean_Expression) @@ -96,8 +93,7 @@ The formal syntax of the `Case of...Else...End case` control flow structure is: End case ``` -Note that the `Else` part is optional; you can write: - +Note que a parte `Else` é opcional; pode escrever: ```4d Case of :(Boolean_Expression) @@ -112,82 +108,107 @@ Note that the `Else` part is optional; you can write: statement(s) End case ``` +Da mesma forma que a estrutura `If... End if`, a estrutura `Case of... End case` também deixa seu método escolher entre ações alternativas. Diferente da estrutura `If... End` a estrutura `Case of... End case` pode testar um número razoavelmente ilimitado de expressões Booleanas e realizar ações dependendo de qual delas for TRUE. -As with the `If...Else...End if` structure, the `Case of...Else...End case` structure also lets your method choose between alternative actions. Unlike the `If...Else...End` if structure, the `Case of...Else...End case` structure can test a reasonable unlimited number of Boolean expressions and take action depending on which one is TRUE. - -Each Boolean expression is prefaced by a colon (`:`). This combination of the colon and the Boolean expression is called a case. For example, the following line is a case: +Cada expressão booleana é precedida de dois pontos (`:`). A combinação dos dois pontos e da expressão booleana é chamada de um caso. Por exemplo, a linha abaixo é um caso: ```4d :(bValidate=1) ``` -Only the statements following the first TRUE case (and up to the next case) will be executed. If none of the cases are TRUE, none of the statements will be executed (if no `Else` part is included). +Só são executadas as instruções que seguem o primeiro caso TRUE (até o próximo caso). Se nenhum dos casos for TRUE, nenhuma das instruções será executada (se nenhuma parte `Else` for incluida). -You can include an Else statement after the last case. If all of the cases are FALSE, the statements following the `Else` will be executed. +Pode incluir uma instrução Else depois do último caso. Se todos os casos forem FALSE, as instruções que seguem `Else` serão executadas. -### Example +### Exemplo -This example tests a numeric variable and displays an alert box with a word in it: +Esse exemplo testa uma variável numérica e exibe uma caixa de alerta com uma apalavra: ```4d Case of - :(vResult=1) //Test if the number is 1 - ALERT("One.") //If it is 1, display an alert - :(vResult=2) //Test if the number is 2 - ALERT("Two.") //If it is 2, display an alert - :(vResult=3) //Test if the number is 3 - ALERT("Three.") //If it is 3, display an alert - Else //If it is not 1, 2, or 3, display an alert + :(vResult=1) //Testa se o número é 1 + ALERT("One.") //Se for 1, mostrar um alerta + :(vResult=2) //Testar se o número é 2 + ALERT("Two.") //Se for 2, exibe um alerta + :(vResult=3) //Testa se o número é 3 + ALERT("Three.") //Se for 3, exibe um alerta + Else //Se não for 1, 2, ou 3, exibe um alerta + ALERT("It was not one, two, or three.") + End case //Se for 1, mostrar um alerta + :(vResult=2) //Testar se o número é 2 + ALERT("Two.") //Se for 2, exibe um alerta + :(vResult=3) //Testa se o número é 3 + ALERT("Three.") //Se for 3, exibe um alerta + Else //Se não for 1, 2, ou 3, exibe um alerta ALERT("It was not one, two, or three.") End case ``` -For comparison, here is the `If...Else...End if` version of the same method: +Por comparação, aqui está a versão `If... Else... End if` do mesmo método: ```4d - If(vResult=1) //Test if the number is 1 + If(vResult=1) //Teste se o número é 1 + ALERT("One.") If(vResult=1) //Teste se o número é 1 ALERT("One.") //If it is 1, display an alert Else - If(vResult=2) //Test if the number is 2 - ALERT("Two.") //If it is 2, display an alert + If(vResult=2) //Teste se o número é 2 + ALERT("Two.") //Se for 2, exibe um alerta Else - If(vResult=3) //Test if the number is 3 - ALERT("Three.") //If it is 3, display an alert - Else //If it is not 1, 2, or 3, display an alert + If(vResult=3) //Teste se o número é 3 + ALERT("Three.") //Se for 3, exibe um alerta + Else //Se não for 1, 2, ou 3, exibe um alerta + ALERT("It was not one, two, or three.") + End if + End if + End if //Se for 2, exibe um alerta + Else + If(vResult=3) //Teste se o número é 3 + ALERT("Three.") //Se for 3, exibe um alerta + Else //Se não for 1, 2, ou 3, exibe um alerta ALERT("It was not one, two, or three.") End if End if End if ``` -Remember that with a `Case of...Else...End case` structure, only the first TRUE case is executed. Even if two or more cases are TRUE, only the statements following the first TRUE case will be executed. +Lembre que com uma estrutura `Case of... Else... End case`, só é executado o primeiro caso TRUE. Mesmo se dois ou mais casos forem TRUE, só as instruções que seguirem o primeiro caso TRUE serão executadas. -Consequently, when you want to implement hierarchical tests, you should make sure the condition statements that are lower in the hierarchical scheme appear first in the test sequence. For example, the test for the presence of condition1 covers the test for the presence of condition1&condition2 and should therefore be located last in the test sequence. For example, the following code will never see its last condition detected: +Dessa maneira, quando quiser implementar testes hierárquicos, deve garantir que as declarações de condição que estejam mais abaixo no esquema hierárquico apareçam primeiro na sequência de testes. Por exemplo, o teste para a presença da condition1 cobre o teste para a preença de condition1&condition2 e portanto deveria estar localizada por último na sequência de testes. Por exemplo, o código abaixo nunca terá sua última condição detectada: ```4d Case of - :(vResult=1) - ... //statement(s) - :((vResult=1) & (vCondition#2)) //this case will never be detected - ... //statement(s) + :(vResult=1) //Testa se o número é 1 + ALERT("One.") //Se for 1, mostrar um alerta + :(vResult=2) //Testar se o número é 2 + ALERT("Two.") //Se for 2, exibe um alerta + :(vResult=3) //Testa se o número é 3 + ALERT("Three.") //Se for 3, exibe um alerta + Else //Se não for 1, 2, ou 3, exibe um alerta + ALERT("It was not one, two, or three.") End case ``` -In the code above, the presence of the second condition is not detected since the test "vResult=1" branches off the code before any further testing. For the code to operate properly, you can write it as follows: +No código anterior, a presença da segunda condição não é detectada, já que o teste "vResult=1" ramifica o código antes de qualquer outro teste. Para que o código funcione corretamente, pode escrevê-lo assim: ```4d - Case of - :((vResult=1) & (vCondition#2)) //this case will be detected first - ... //statement(s) - :(vResult=1) - ... //statement(s) - End case + If(vResult=1) //Teste se o número é 1 + ALERT("One.") //If it is 1, display an alert + Else + If(vResult=2) //Teste se o número é 2 + ALERT("Two.") //Se for 2, exibe um alerta + Else + If(vResult=3) //Teste se o número é 3 + ALERT("Three.") //Se for 3, exibe um alerta + Else //Se não for 1, 2, ou 3, exibe um alerta + ALERT("It was not one, two, or three.") + End if + End if + End if ``` -Also, if you want to implement hierarchical testing, you may consider using hierarchical code. - -**Tip:** Branching can be performed without statements to be executed in one case or another. When developing an algorithm or a specialized application, nothing prevents you from writing: +Além disso, se quiser implementar teste hierárquico, pode considerar usar um código hierárquico. +**Dica:** a ramificação|branching pode ser feita sem que as instruções sejam executados em um caso ou outro Quando desenvolver um algoritmo ou uma aplicação especializada, nada impede que escreva: Quando desenvolver um algoritmo ou uma aplicação especializada, nada impede que escreva: Quando desenvolver um algoritmo ou uma aplicação especializada, nada impede que escreva: Quando desenvolver um algoritmo ou uma aplicação especializada, nada impede que escreva: ```4d Case of :(Boolean_Expression) @@ -201,11 +222,11 @@ Also, if you want to implement hierarchical testing, you may consider using hier End case ``` -or: - +ou : ```4d Case of :(Boolean_Expression) + statement(s) :(Boolean_Expression) statement(s) ... @@ -216,11 +237,10 @@ or: End case ``` -or: - +ou : ```4d Case of Else statement(s) End case -``` \ No newline at end of file +``` diff --git a/website/translated_docs/pt/Concepts/cf_looping.md b/website/translated_docs/pt/Concepts/cf_looping.md index 61b313e4ad41a2..9a772639d8fc72 100644 --- a/website/translated_docs/pt/Concepts/cf_looping.md +++ b/website/translated_docs/pt/Concepts/cf_looping.md @@ -1,60 +1,53 @@ --- id: looping -title: Looping structures +title: Estruturas de loop --- -## While...End while - -The formal syntax of the `While...End while` control flow structure is: - +## While... End while +A sintaxe da estrutura condicional `While... End while` é: ```4d While(Boolean_Expression) statement(s) End while ``` +Um loop `While... End while` executa as instruções dentro do loop enquanto a expressão booleana for TRUE. Comprova a expressão booleana ao início do loop e não entra no loop se a expressão for FALSE. -A `While...End while` loop executes the statements inside the loop as long as the Boolean expression is TRUE. It tests the Boolean expression at the beginning of the loop and does not enter the loop at all if the expression is FALSE. - -It is common to initialize the value tested in the Boolean expression immediately before entering the `While...End while` loop. Initializing the value means setting it to something appropriate, usually so that the Boolean expression will be TRUE and `While...End while` executes the loop. - -The Boolean expression must be set by something inside the loop or else the loop will continue forever. The following loop continues forever because *NeverStop* is always TRUE: +É comum inicializar o valor provado na expressão booleana imediatamente antes de entrar no loop `While... End while`. Inicializar o valor significa atribuir o valor para algo apropriado, geralmente para que a expressão booleana seja TRUE e `While... End while` execute o loop. +O valor da expressão booleana deve poder ser modificado por um elemento dentro do loop, do contrário será executado indefinidamente. O próximo loop continua para sempre porque _NeverStop_ sempre será TRUE: ```4d NeverStop:=True While(NeverStop) End while ``` -If you find yourself in such a situation, where a method is executing uncontrolled, you can use the trace facilities to stop the loop and track down the problem. For more information about tracing a method, see the [Error handling](error-handling.md) page. +Se você se encontrar em uma situação desse tipo, na qual um método fica executando de forma descontrolada, pode usar as funções de rastreamento para parar o loop e rastrear o problema. Para saber mais sobre o rastreio de um método veja a página [Error handling](error-handling.md). -### Example +### Exemplo ```4d - CONFIRM("Add a new record?") //The user wants to add a record? - While(OK=1) //Loop as long as the user wants to - ADD RECORD([aTable]) //Add a new record - End while //The loop always ends with End while + CONFIRM("Add a new record?") //o usuário quer adicionar um registro? //o usuário quer adicionar um registro? + While(OK=1) //Loop enquanto o usuário quiser + ADD RECORD([aTable]) //Adiciona um novo registro + End while //O loop sempre termina com End while ``` -In this example, the `OK` system variable is set by the `CONFIRM` command before the loop starts. If the user clicks the **OK** button in the confirmation dialog box, the `OK` system variable is set to 1 and the loop starts. Otherwise, the `OK` system variable is set to 0 and the loop is skipped. Once the loop starts, the `ADD RECORD` command keeps the loop going because it sets the `OK` system variable to 1 when the user saves the record. When the user cancels (does not save) the last record, the `OK` system variable is set to 0 and the loop stops. +Nesse exemplo, o valor da variável sistema `OK` é estabelecida pelo comando `CONFIRM` antes de que inicia o loop. Se o usuário clicar no botão **OK** da caixa de diálogo de confirmação, a variável do sistema `OK` toma o valor 1 e se inicia o loop. Senão, a variável de sistema `OK` toma o valor 0 e se omite o loop. Quando iniciar o loop, o comando `ADD RECORD` permite continuar a execução do loop porque se define a variável sistema `OK` em 1 quando o usuário salvar o registro. Quando o usuário cancelar (não salvar) o último registro, a variável do sistema `OK` é estabelecida como 0 e o loop para. -## Repeat...Until - -The formal syntax of the `Repeat...Until` control flow structure is: +## Repeat... Until +A sintaxe da estrutura condicional `Repeat... Until` é: ```4d Repeat statement(s) Until(Boolean_Expression) ``` +A outra diferença com um loop `Repeat... Until` é que o loop continua até que a expressão seja TRUE. -A `Repeat...Until` loop is similar to a [While...End while](flow-control#whileend-while) loop, except that it tests the Boolean expression after the loop rather than before. Thus, a `Repeat...Until` loop always executes the loop once, whereas if the Boolean expression is initially False, a `While...End while` loop does not execute the loop at all. - -The other difference with a `Repeat...Until` loop is that the loop continues until the Boolean expression is TRUE. +Um loop `Repeat... Until` é similar a um loop [While... End while](flow-control#whileend-while), exceto que comprova a expressão booleana depois do loop e não antes. -### Example - -Compare the following example with the example for the `While...End while` loop. Note that the Boolean expression does not need to be initialized—there is no `CONFIRM` command to initialize the `OK` variable. +### Exemplo +Compare o exemplo abaixo com o exemplo para o lopp `While... End while`. Lembre que a expressão booleana não precisa ser iniciada - não há um comando `CONFIRM` para inicializar a variável `OK`. ```4d Repeat @@ -62,9 +55,8 @@ Compare the following example with the example for the `While...End while` loop. Until(OK=0) ``` -## For...End for - -The formal syntax of the `For...End for` control flow structure is: +## For... End for +A sintaxe da estrutura condicional `For... End for` é: ```4d For(Counter_Variable;Start_Expression;End_Expression{;Increment_Expression}) @@ -72,189 +64,185 @@ The formal syntax of the `For...End for` control flow structure is: End for ``` -The `For...End for` loop is a loop controlled by a counter variable: +O loop `For... End for` é um loop controlado por um contador: -- The counter variable *Counter_Variable* is a numeric variable (Real or Long Integer) that the `For...End for` loop initializes to the value specified by *Start_Expression*. -- Each time the loop is executed, the counter variable is incremented by the value specified in the optional value *Increment_Expression*. If you do not specify *Increment_Expression*, the counter variable is incremented by one (1), which is the default. -- When the counter variable passes the *End_Expression* value, the loop stops. +- A variável contador *Counter_Variable* é uma variável numérica (Real ou Long Integer) iniciada por `For... End for` com o valor especificado por *Start_Expression*. +- Cada vez que se executa o loop, a variável do contador se incrementa no valor especificado no valor opcional *Increment_Expression*. Se não especificar *Increment_Expression*, a variável contadora é incrementada por um (1), que é o padrão. +- Quando a variável contador passar o valor *End_Expression* daí o loop para. -**Important:** The numeric expressions *Start_Expression*, *End_Expression* and *Increment_Expression* are evaluated once at the beginning of the loop. If these expressions are variables, changing one of these variables within the loop will not affect the loop. +**Importante:** as expressões numéricas *Start_Expression*, *End_Expression* e *Increment_Expression* são avaliadas apenas uma vez no começo do loop. Se essas expressões forem variáveis, mudar uma deles dentro do loop não vai afetar o loop. -**Tip:** However, for special purposes, you can change the value of the counter variable *Counter_Variable* within the loop; this will affect the loop. +**Dicas:** Entretanto, para fins especiais, pode mudar o valor da variável *Counter_Variable* dentro do loop; isso afetará o loop. -- Usually *Start_Expression* is less than *End_Expression*. -- If *Start_Expression* and *End_Expression* are equal, the loop will execute only once. -- If *Start_Expression* is greater than *End_Expression*, the loop will not execute at all unless you specify a negative *Increment_Expression*. See the examples. +- Geralmente *Start_Expression* pe menor que *End_Expression*. +- Se *Start_Expression* e *End_Expression* forem iguais, o loop se executará só uma vez. +- Se *Start_Expression* for maior que *End_Expression*, o loop não vai executar a não ser que especifique uma *Increment_Expression* negativa. Ver os exemplos. -### Basic examples - -1. The following example executes 100 iterations: +### Exemplos básicos +1. O seguinte exemplo executa 100 iterações: ```4d For(vCounter;1;100) - //Do something + //Faz algo End for ``` -2. The following example goes through all elements of the array anArray: +2. O exemplo abaixo percorre todos os elementos no array anArray: ```4d For($vlElem;1;Size of array(anArray)) - //Do something with the element + //Fazer algo com o elemento anArray{$vlElem}:=... End for ``` -3. The following example goes through all the characters of the text vtSomeText: +3. O exemplo abaixo recorre todos os caracteres do texto vtSomeText: ```4d For($vlChar;1;Length(vtSomeText)) - //Do something with the character if it is a TAB + //Faz algo com o caractere se for uma TAB If(Character code(vtSomeText[[$vlChar]])=Tab) //... End if End for ``` -4. The following example goes through the selected records for the table [aTable]: +4. O exemplo abaixo recorre os registros selecionados para a tabela [aTable]: ```4d FIRST RECORD([aTable]) For($vlRecord;1;Records in selection([aTable])) - //Do something with the record + //Faz algo com o registro SEND RECORD([aTable]) //... - //Go to the next record + //Vai para o próximo registro NEXT RECORD([aTable]) End for ``` -Most of the `For...End for` loops you will write in your databases will look like the ones listed in these examples. +A maioria dos loops `For... End for` que escreverá em seus bancos de dados vão parecer com aqueles listados nesses exemplos. -### Decrementing variable counter +### Diminuir a variável contador -In some cases, you may want to have a loop whose counter variable is decreasing rather than increasing. To do so, you must specify *Start_Expression* greater than *End_Expression* and a negative *Increment_Expression*. The following examples do the same thing as the previous examples, but in reverse order: +Em alguns casos, pode querer ter um loop cuja variável de contador seja decrescente ao invés de crescente. Para fazer isso, deve especificar *Start_Expression* maior que *End_Expression* e *Increment_Expression* deve ser negativa. Os exemplos abaixo fazem a mesma coisa que nos exemplos acima, mas na ordem inversa: -5. The following example executes 100 iterations: +5. O seguinte exemplo executa 100 iterações: ```4d For(vCounter;100;1;-1) - //Do something + //Faz algo End for ``` -6. The following example goes through all elements of the array anArray: +6. O exemplo abaixo percorre todos os elementos no array anArray: ```4d For($vlElem;Size of array(anArray);1;-1) - //Do something with the element + //Faz algo com o elemento anArray{$vlElem}:=... End for ``` -7. The following example goes through all the characters of the text vtSomeText: +7. O exemplo abaixo recorre todos os caracteres do texto vtSomeText: ```4d For($vlChar;Length(vtSomeText);1;-1) - //Do something with the character if it is a TAB + //Faz algo com o caractere se for uma TAB If(Character code(vtSomeText[[$vlChar]])=Tab) //... End if End for ``` -8. The following example goes through the selected records for the table [aTable]: +8. O exemplo abaixo recorre os registros selecionados para a tabela [aTable]: ```4d LAST RECORD([aTable]) For($vlRecord;Records in selection([aTable]);1;-1) - //Do something with the record + //Faz algo com o registro SEND RECORD([aTable]) //... - //Go to the previous record + //Ir ao registro anterior PREVIOUS RECORD([aTable]) End for ``` -### Incrementing the counter variable by more than one +### Incrementar a variável do contador em mais de um -If you need to, you can use an *Increment_Expression* (positive or negative) whose absolute value is greater than one. +Se precisar, pode usar uma *Increment_Expression* (positiva ou negativa) cujo valor absoluto seja maior que um. -9. The following loop addresses only the even elements of the array anArray: +9. O loop a seguir aborda só os elementos pares do array anArray: ```4d For($vlElem;2;Size of array(anArray);2) - //Do something with the element #2,#4...#2n + //Faz algo com o elemento #2,#4...#2n anArray{$vlElem}:=... End for ``` -### Comparing looping structures -Let's go back to the first `For...End for` example. The following example executes 100 iterations: +### Comparação de estruturas de loop +Voltamos ao primeiro exemplo de `For... End for`. O seguinte exemplo executa 100 iterações: ```4d For(vCounter;1;100) - //Do something + //Faz algo End for ``` -It is interesting to see how the `While...End while` loop and `Repeat...Until` loop would perform the same action. Here is the equivalent `While...End while` loop: - +Aqui está o loop equivalente `While... End while`: ```4d - $i:=1 //Initialize the counter - While($i<=100) //Loop 100 times - //Do something - $i:=$i+1 //Need to increment the counter + $i:=1 //Initializa o contador + While($i<=100) //Loop 100 vezes + //Faz algo + $i:=$i+1 //Precisa incrementar o contador End while ``` -Here is the equivalent `Repeat...Until` loop: - +Aquí está o loop equivalente `Repeat... Until`: ```4d - $i:=1 //Initialize the counter + $i:=1 //Initializa o contador Repeat - //Do something - $i:=$i+1 //Need to increment the counter - Until($i=100) //Loop 100 times + //Faz algo + $i:=$i+1 //Precisa incrementar o contador + Until($i=100) //Loop 100 vezes ``` +**Dica:** o loop `For... End for` é geralmente mais rápido que os loops `While... End while` ou `Repeat... Until`, porque 4D comprova a condição internamente em cada ciclo do loop e incrementa o contador. Portanto, utilize o loop `For... End for` sempre que for possível. -**Tip:** The `For...End for` loop is usually faster than the `While...End while` and `Repeat...Until` loops, because 4D tests the condition internally for each cycle of the loop and increments the counter. Therefore, use the `For...End for` loop whenever possible. - -### Optimizing the execution of the For...End for loops +### Otimizar a execução dos loops For... End for -You can use Real and Long Integer variables as well as interprocess, process, and local variable counters. For lengthy repetitive loops, especially in compiled mode, use local Long Integer variables. +Pode utilizar variáveis reais e inteiras, assim como contadores interprocesso, de processo e de variáveis locais. Para loops repetitivos longos, especialmente em modo compilado, use variáveis locais de tipo Inteiro longo. -10. Here is an example: +10. Aqui um exemplo simples: ```4d - C_LONGINT($vlCounter) //use local Long Integer variables + C_LONGINT($vlCounter) //usa variáveis locais Long Integer For($vlCounter;1;10000) - //Do something + //Faz algo End for ``` -### Nested For...End for looping structures +### Estruturas For... End aninhadas -You can nest as many control structures as you (reasonably) need. This includes nesting `For...End for` loops. To avoid mistakes, make sure to use different counter variables for each looping structure. +Pode aninhar tantas estruturas de controle (dentro do razoável) como precisar. Isso inclui o aninhamento de loops `For... End for`. Para evitar erros, tenha certeza de usar variáveis contador diferentes para cada estrutura de looping. -Here are two examples: +Aqui são dois exemplos: -11. The following example goes through all the elements of a two-dimensional array: +11. O exemplo abaixo percorre todos os elementos em um array de duas dimensões: ```4d For($vlElem;1;Size of array(anArray)) //... - //Do something with the row + //Faz algo com a linha //... For($vlSubElem;1;Size of array(anArray{$vlElem})) - //Do something with the element + //Faz algo com o elemento anArray{$vlElem}{$vlSubElem}:=... End for End for ``` -12. The following example builds an array of pointers to all the date fields present in the database: +12. O seguinte exemplo constrói um array de ponteiros a todos os campos de data presentes no banco: ```4d ARRAY POINTER($apDateFields;0) @@ -275,55 +263,52 @@ Here are two examples: End for ``` -## For each...End for each - -The formal syntax of the `For each...End for each` control flow structure is: +## For each... End for each +A sintaxe da estrutura condicional `For each... End for each` é: ```4d - For each(Current_Item;Expression{;begin{;end}}){Until|While}(Boolean_Expression)} - statement(s) + For each(Element_courant;Expression{;debut{;fin}}){Until|While}(Expression_booléenne)} + instruction(s) End for each ``` -The `For each...End for each` structure iterates a specified *Current_item* over all values of the *Expression*. The *Current_item* type depends on the *Expression* type. The `For each...End for each` loop can iterate through three *Expression* types: - -- collections: loop through each element of the collection, -- entity selections: loop through each entity, -- objects: loop through each object property. - -The following table compares the three types of `For each...End for each`: +A estrutura `For each... End for each` faz uma iteração sobre um *Elemento_atual* especificado sobre todos os valores de *Expressão*. O tipo *elemento_atual* depende do tipo *Expression*. O loop `For each... End for each` pode iterar através de três tipos de *Expressão*: -| | Loop through collections | Loop through entity selections | Loop through objects | -| --------------------------------- | ------------------------------------------------ | ----------------------------------- | --------------------------- | -| Current_Item type | Variable of the same type as collection elements | Entity | Text variable | -| Expression type | Collection (with elements of the same type) | Entity selection | Object | -| Number of loops (by default) | Number of collection elements | Number of entities in the selection | Number of object properties | -| Support of begin / end parameters | Yes | Yes | No | +- collections: loop por cada elemento da coleção, +- seleções de entidades: loop em cada entidade, +- objetos: loop em cada propriedade do objeto. +A tabela abaixo compara os três tipos de `For each... End for each`: -- The number of loops is evaluated at startup and will not change during the processing. Adding or removing items during the loop is usually not recommended since it may result in missing or redundant iterations. -- By default, the enclosed *statement(s)* are executed for each value in *Expression*. It is, however, possible to exit the loop by testing a condition either at the begining of the loop (`While`) or at the end of the loop (`Until`). -- The *begin* and *end* optional parameters can be used with collections and entity selections to define boundaries for the loop. -- The `For each...End for each` loop can be used on a **shared collection** or a **shared object**. If your code needs to modify one or more element(s) of the collection or object properties, you need to use the `Use...End use` keywords. Depending on your needs, you can call the `Use...End use` keywords: - - before entering the loop, if items should be modified together for integrity reasons, or - - within the loop when only some elements/properties need to be modified and no integrity management is required. +| | Loop através da coleção | Loop nas seleções de entidades | Loop nos objetos | +| ----------------------------------------- | -------------------------------------------------- | ------------------------------ | -------------------------------- | +| Tipo Current_Item | Variável do mesmo tipo que os elementos da coleção | Entity | Variável texto | +| Tipos de expressões | Coleção (com elementos do mesmo tipo) | Seleção de entidades | Objeto | +| Número de loops (por padrão) | Número de elementos da coleção | Número de entidades na seleção | Número de propriedades de objeto | +| Compatibilidade de parâmetros begin / end | Sim | Sim | No | -### Loop through collections +- O número de loops é avaliado no início e não muda durante o processo. Adicionar ou remover itens durante o loop não é recomendado porque resulta em iterações faltantes ou redundantes. +- Por padrão, as _instruções_ anexas são executadas para cada valor de *Expressão*. Entretanto, é possível sair do loop comprovando uma condição ao início do loop (`While`) ou ao final do loop (`Until`). +- Os parâmetros opcionais *begin* e *end* podem ser usados com coleç~eos e seleções de entidades para definir os limites do loop. +- O loop `For each... End for each` pode ser usado em uma **coleção compartida** ou um **objeto compartilhado**. Se seu código necessitar modificar um ou mais elementos da coleção ou das propriedades de objeto, deve utilizar as palavras chave `Use... End use`. Dependendo de sus necessidades, pode chamar às palavras clave `Use... End use`: + - antes de entrar no loop, se os elementos devem ser modificados juntos por razões de integridade, ou + - dentro do loop quando só tiver que modificar alguns elementos/propriedades e não é necessário gerenciar a integridade. -When `For each...End for each` is used with an *Expression* of the *Collection* type, the *Current_Item* parameter is a variable of the same type as the collection elements. By default, the number of loops is based on the number of items of the collection. +### Loop através da coleção -The collection must contain only elements of the same type, otherwise an error will be returned as soon as the *Current_Item* variable is assigned the first mismatched value type. +Quando `For each... End for each` for utilizado com uma _Expression_ do tipo _Collection_, o parâmetro _Current_Item_ é uma variável do mesmo tipo que os elementos da coleção. Como padrão, o número de loops é baseado no número de elementos da coleção. -At each loop iteration, the *Current_Item* variable is automatically filled with the matching element of the collection. The following points must be taken into account: +A coleção deve conter só elementos do mesmo tipo, do contrário se devolverá um erro assim que a variável _Current_Item_ tenha sido atribuída o primeiro tipo de valor estranho. -- If the *Current_Item* variable is of the object type or collection type (i.e. if *Expression* is a collection of objects or of collections), modifying this variable will automatically modify the matching element of the collection (because objects and collections share the same references). If the variable is of a scalar type, only the variable will be modified. -- The *Current_Item* variable must be of the same type as the collection elements. If any collection item is not of the same type as the variable, an error is generated and the loop stops. -- If the collection contains elements with a **Null** value, an error will be generated if the *Current_Item* variable type does not support **Null** values (such as longint variables). +Em cada iteração do loop, a variável _Current_Item_ é preenchida automaticamente com o elemento correspondente da coleção. Os pontos abaixo devem ser considerados: -#### Example +- Se a variável _Current_Item_ é de tipo objeto ou de tipo coleção (ou seja, se _Expresión_ for uma coleção de objetos ou de coleções), ao modificar esta variável se modificará automaticamente o elemento coincidente da coleção (porque os objetos e as coleções compartem as mesmas referências). Se a variável for de tipo escalar, só se modificará a variável. +- A variável_Current_Item_ deve ser do mesmo tipo que os elementos da coleção. Se algum elemento da coleção não for do mesmo tipo que a variável, um erro é gerado e o loop para. +- Se a coleção conter elementos com um valor **Null**, se gerará um erro se o tipo de variável _Current_Item_ não é compatível com valores **Null** (como as variáveis de tipo inteiro longo). -You want to compute some statistics for a collection of numbers: +#### Exemplo +Se quiser computar algumas estatísticas para uma coleção de números: ```4d C_COLLECTION($nums) $nums:=New collection(10;5001;6665;33;1;42;7850) @@ -345,38 +330,36 @@ You want to compute some statistics for a collection of numbers: //$vUnder=4,$vOver=2 ``` -### Loop through entity selections +### Loop nas seleções de entidades -When `For each...End for each` is used with an *Expression* of the *Entity selection* type, the *Current_Item* parameter is the entity that is currently processed. +Quando `For each... End for each` for utilizado com uma _Expression_ do tipo _Collection_, o parâmetro _Current_Item_ é uma variável do mesmo tipo que os elementos da coleção. -The number of loops is based on the number of entities in the entity selection. On each loop iteration, the *Current_Item* parameter is automatically filled with the entity of the entity selection that is currently processed. +O número de loops é baseado no número de entidades da seleção de entidades. Em cada iteração do loop, o parâmetro *Current_Item* é preenchido automaticamente com a entidade da seleção de entidade que estiver sendo processada atualmente. -**Note:** If the entity selection contains an entity that was removed meanwhile by another process, it is automatically skipped during the loop. +**Nota:** se a seleção de entidades conter uma entidade que tenha sido eliminada, enquanto isso, por outro processo, ela é pulada durante o loop. -Keep in mind that any modifications applied on the current entity must be saved explicitly using `entity.save( )`. +Lembre que qualquer modificação aplicada na entidade atual deve ser guardada explicitamente utilizando `entity.save( )`. -#### Example - -You want to raise the salary of all British employees in an entity selection: +#### Exemplo +Se quiser aumentar o salário de todos os empregados britânicos em uma seleção de entidades: ```4d C_OBJECT(emp) - For each(emp;ds.Employees.query("country='UK'")) + For each(emp;ds. Employees.query("country='UK'")) emp.salary:=emp.salary*1,03 emp.save() End for each ``` -### Loop through object properties - -When `For each...End for each` is used with an *Expression* of the Object type, the *Current_Item* parameter is a text variable automatically filled with the name of the currently processed property. +### Loops nas propriedades de objetos -The properties of the object are processed according to their order of creation. During the loop, properties can be added to or removed from the object, without modifying the number of loops that will remain based on the original number of properties of the object. +Quando se utiliza `For each... End for each` com uma *Expression* de tipo Object, o parâmetro *Current_Item* é uma variável texto que é preenchida automaticamente com o nome da propriedade atualmente processada. -#### Example +As propriedades do objeto são processadas de acordo com sua ordem de criação. Durante o loop, propriedades podem ser adicionadas ou eliminadas no objeto, sem modificar o número de loops que permanecerão no número original de propriedades do objeto. -You want to switch the names to uppercase in the following object: +#### Exemplo +Se quiser trocar os nomes para maiúsculas no objeto a seguir: ```4d { "firstname": "gregory", @@ -384,9 +367,7 @@ You want to switch the names to uppercase in the following object: "age": 20 } ``` - -You can write: - +Você pode escrever: ```4d For each(property;vObject) If(Value type(vObject[property])=Is text) @@ -394,32 +375,30 @@ You can write: End if End for each ``` +``` +{ + "firstname": "GREGORY", + "lastname": "BADIKORA", + "age": 20 +} +``` +### Parâmetros begin / end - { - "firstname": "GREGORY", - "lastname": "BADIKORA", - "age": 20 - } - - -### begin / end parameters - -You can define bounds to the iteration using the optional begin and end parameters. - -**Note:** The *begin* and *end* parameters can only be used in iterations through collections and entity selections (they are ignored on object properties). +Pode definir limites para a iteração usando os parâmetros opcionais inicio e fim. -- In the *begin* parameter, pass the element position in *Expression* at which to start the iteration (*begin* is included). -- In the *end* parameter, you can also pass the element position in *Expression* at which to stop the iteration (*end* is excluded). +**Nota:**os parâmetros *inicio* e *fim* só podem ser utilizados em iterações através de coleções e seleções de entidades (são ignoradas nas propriedades de objetos). -If *end* is omitted or if *end* is greater than the number of elements in *Expression*, elements are iterated from *begin* until the last one (included). If the *begin* and *end* parameters are positive values, they represent actual positions of elements in *Expression*. If *begin* is a negative value, it is recalculed as `begin:=begin+Expression size` (it is considered as the offset from the end of *Expression*). If the calculated value is negative, *begin* is set to 0. **Note:** Even if begin is negative, the iteration is still performed in the standard order. If *end* is a negative value, it is recalculed as `end:=end+Expression size` +- No parâmetro *begin*, passe l posilçao do elemento em *Expression* na que se iniciará a iteração (se inclui *begin*). +- No *parâmetro* final, você também pode passar a posição do elemento na *Expressão* a qual vai parar a iteração (*end* é excluído). -For example: +Se omitir *end* ou se *fim* for maior que o número de elementos em *Expression*, os elementos são iteragids de *begin* até o último elemento (incluído). Se os parâmetros *inicio* e*fim* forem valores positivos, representam posições reais de elementos em *Expression*. Se *begin* for um valor negativo, é recalculado como `begin:=begin+Expression size` (é considerado como o deslocamento offset desde o final de *Expression*). Se o valor calculado for negativo, *inicio* toma o valor 0. **Nota:** mesmo se inicio for negativo, a iteração continua sendo realizada na ordem normal. Se *fim* for um valor negativo, se recalcula como `fim:=fim+tamanho da expressão` -- a collection contains 10 elements (numbered from 0 to 9) -- begin=-4 -> begin=-4+10=6 -> iteration starts at the 6th element (#5) -- end=-2 -> end=-2+10=8 -> iteration stops before the 8th element (#7), i.e. at the 7th element. +Por exemplo: +- uma coleção contém 10 elementos (numerada de 0 a 9) +- begin=-4 -> begin=-4+10=6 -> iteração começa no sexto elemento (#5) +- end=-2 -> end=-2+10=8 -> iteração para antes do oitavo elemento (#7), ou seja, no sétimo elemento. -#### Example +#### Exemplo ```4d C_COLLECTION($col;$col2) @@ -435,30 +414,28 @@ For example: End for each //$col2=[1,2,3,"a","b","c","d"] ``` +### Condições Until e While +Pode controlar a execução de `For each... End for each` adicionando uma condição `Until` ou uma condição `While` ao loop. Quando uma instrução `Until(condição)` estiver associada ao loop, a iteração vai parar logo que a condição seja avaliada como `True`, mas no caso de uma instrução `While(condición)`, a iteração para quando a condição for avaliada, pela primeira vez, como `False`. -### Until and While conditions +Pode passar qualquer uma das duas palavras chave em função das suas necessidades: -You can control the `For each...End for each` execution by adding an `Until` or a `While` condition to the loop. When an `Until(condition)` statement is associated to the loop, the iteration will stop as soon as the condition is evaluated to `True`, whereas when is case of a `While(condition)` statement, the iteration will stop when the condition is first evaluated to `False`. +- A condição `Until` é testada no final de cada iteração, portanto, se a *Expressão* não for vazia ou nula, o loop será executado pelo menos uma vez. +- A condição `While` é testada no início de cada iteração, então de acordo com o resultado da condição, o loop não poderá ser executado de forma alguma. -You can pass either keyword depending on your needs: - -- The `Until` condition is tested at the end of each iteration, so if the *Expression* is not empty or null, the loop will be executed at least once. -- The `While` condition is tested at the beginning of each iteration, so according to the condition result, the loop may not be executed at all. - -#### Example +#### Exemplo ```4d $colNum:=New collection(1;2;3;4;5;6;7;8;9;10) $total:=0 - For each($num;$colNum)While($total<30) //tested at the beginning + For each($num;$colNum)While($total<30) //testado no começo $total:=$total+$num End for each ALERT(String($total)) //$total = 36 (1+2+3+4+5+6+7+8) $total:=1000 - For each($num;$colNum)Until($total>30) //tested at the end + For each($num;$colNum)Until($total>30) //testado no final $total:=$total+$num End for each ALERT(String($total)) //$total = 1001 (1000+1) -``` \ No newline at end of file +``` diff --git a/website/translated_docs/pt/Concepts/components.md b/website/translated_docs/pt/Concepts/components.md index 6b7f2b75d4eb81..6c7072069ed855 100644 --- a/website/translated_docs/pt/Concepts/components.md +++ b/website/translated_docs/pt/Concepts/components.md @@ -1,65 +1,67 @@ --- id: components -title: Components +title: Componentes --- -A 4D component is a set of 4D methods and forms representing one or more functionalities that can be installed in different databases. For example, you can develop a 4D e-mail component that manages every aspect of sending, receiving and storing e-mails in 4D databases. +Um componente 4D é um conjunto de métodos e formulários 4D que representam uma ou várias funcionalidades que possam ser instaladas em diferentes bancos de dados. Por exemplo, pode desenvolver um componente 4D de correio eletrônico que gerencie todos os aspectos do envio, a recepção e o armazenamento de correios eletrônicos em bancos de dados 4D. -Creating and installing 4D components is carried out directly from 4D. Basically, components are managed like [plug-ins](Concepts/plug-ins.md) according to the following principles: +Criar e instalar componentes 4D é realizado diretamente a partir de 4D. Basicamente, os componentes são geridos como [plug-ins](Concepts/plug-ins.md) de acordo com os seguintes princípios: -- A component consists of a regular structure file (compiled or not) having the standard architecture or in the form of a package (see .4dbase Extension). -- To install a component in a database, you simply need to copy it into the "Components" folder of the database, placed next to the structure file or next to the 4D executable application. -- A component can call on most of the 4D elements: project methods, project forms, menu bars, choice lists, pictures from the library, and so on. It cannot call database methods and triggers. -- You cannot use standard tables or data files in 4D components. However, a component can create and/or use tables, fields and data files using mechanisms of external databases. These are separate 4D databases that you work with using SQL commands. +- Um componente consiste de um arquivo de estrutura regular (compilado ou não) tendo a arquitetura padrão ou na forma de um pacote (ver extensão .4dbase). +- Para instalar um componente em um banco de dados, basta com copiá-lo na pasta "Componentes" do banco de dados, situada junto ao arquivo de estrutura ou junto a aplicação 4D executável. +- Um componente pode chamar a maioria dos elementos 4D: métodos projeto, formulários projeto, barras de menu, listas de escolha, imagens de biblioteca e assim por diante. Não pode chamar métodos de bancos de dados e triggers. +- Não pode usar tabelas padrão ou arquivos de dados em componentes 4D. Entretanto um componente não pode criar ou usar tabelas, campos e arquivos de dados usando mecanismos de bancos de dados externos. São bancos 4D independentes com as que se trabalha utilizando comandos SQL. -## Definitions -The component management mechanisms in 4D require the implementation of the following terms and concepts: +## Definições -- **Matrix Database**: 4D database used for developing the component. The matrix database is a standard database with no specific attributes. A matrix database forms a single component. The matrix database is intended to be copied, compiled or not, into the Components folder of the 4D application or the database that will be using the component (host database). -- **Host Database**: Database in which a component is installed and used. -- **Component**: Matrix database, compiled or not, copied into the Components folder of the 4D application or the host database and whose contents are used in the host databases. +Os mecanismos de gestão de componentes em 4D requerem a aplicação dos seguintes termos e conceitos: -It should be noted that a database can be both a “matrix” and a “host,” in other words, a matrix database can itself use one or more components. However, a component cannot use “sub-components” itself. +- **Banco de dados matriz**: banco de dados 4D utilizado para desenvolver o componente. O banco de dados matriz é um banco sem atributos específicos. Um banco de dados matriz forma um único componente. O banco de dados matriz deve ser copiado, compilado ou não, na pasta Components da aplicação 4D ou no banco de dados que usará o componente (banco de dados local). +- **Banco local**: banco de dados na qual se instala e utiliza um componente. +- **Componente**: banco matricial, compilado ou não, copiado na pasta Components da aplicação 4D ou do banco de dados local e cujo conteúdo se utilizam nos bancos de dados locais. -### Protection of components: compilation +Note que um banco de dados pode ser tanto uma "matriz" quando um "host", ou seja, um banco de dados matriz pode ser usar um ou mais componentes. Entretanto um componente não pode usar por si mesmo "subcomponentes". -By default, all the project methods of a matrix database installed as a component are potentially visible from the host database. In particular: -- The shared project methods are found on the Methods Page of the Explorer and can be called in the methods of the host database. Their contents can be selected and copied in the preview area of the Explorer. They can also be viewed in the debugger. However, it is not possible to open them in the Method editor nor to modify them. -- The other project methods of the matrix database do not appear in the Explorer but they too can be viewed in the debugger of the host database. +### Proteção dos componentes: compilação -To protect the project methods of a component effectively, simply compile the matrix database and provide it in the form of a .4dc file (compiled database that does not contain the interpreted code). When a compiled matrix database is installed as a component: +Como padrão, todos os métodos de projeto de um banco de dados matriz instalados como um componente são potencialmente visíveis do banco de dados host. Em particular: -- The shared project methods are shown on the Methods Page of the Explorer and can be called in the methods of the host database. However, their contents will not appear in the preview area nor in the debugger. -- The other project methods of the matrix database will never appear. +- Os métodos de projeto compartilhados são encontrados na página Métodos do Explorer e podem ser chamadas nos métodos do banco de dados local. Seu conteúdo pode ser selecionado e copiado na área de vista prévia do Explorador. Também podem ser vistos no depurador. Entretanto não é possível abrir os métodos no editor de Métodos nem modificar os métodos. +- Os outros métodos projeto do banco de dados matriz não aparecem no Explorer mas também podem ser vistos no depurador do banco de dados host. -## Sharing of project methods +Para proteger efetivamente os métodos projeto de um componente, simplesmente compile o banco de dados matriz e o deixe no formato de arquivo .4dc (bancos compilados que não contém o código interpretado). Quando um banco de dados matriz for instalado como componente: -All the project methods of a matrix database are by definition included in the component (the database is the component), which means that they can be called and executed by the component. +- Os métodos projeto compartilhados são mostrados na Página Métodos do Explorador e podem ser chamados nos métodos do banco de dados host. Entretanto, seu conteúdo não aparecerá na área de vista prévia nem no depurador. +- Os outros métodos de projeto do banco de dados matriz não vão aparecer nunca. -On the other hand, by default these project methods will not be visible, nor can they be called in the host database. In the matrix database, you must explicitly designate the methods that you want to share with the host database. These project methods can be called in the code of the host database (but they cannot be modified in the Method editor of the host database). These methods form **entry points** in the component. -**Note:** Conversely, for security reasons, by default a component cannot execute project methods belonging to the host database. In certain cases, you may need to allow a component to access the project methods of your host database. To do this, you must explicitly designate the project methods of the host database that you want to make accessible to the components. +## Partilhar os métodos de projeto +Todos os métodos de projeto de um banco de dados matriz são incluídos por definição no componente (o banco de dados é o componente) o que significa que pode ser chamado e executado pelo componente. + +Por outro lado, como padrão esses métodos projeto não serão visíveis, nem poderão ser chamados no banco de dados host local. No banco de dados matriz, deve atribuir explicitamente os métodos que quiser que sejam partilhados com o banco de dados local No banco de dados matriz, deve atribuir explicitamente os métodos que quiser que sejam partilhados com o banco de dados local No banco de dados matriz, deve atribuir explicitamente os métodos que quiser que sejam partilhados com o banco de dados local Esses métodos de projeto podem ser chamados no código do banco de dados local/host (mas não podem ser modificados no editor Métodos do banco de dados host). Estes métodos formam os **pontos de entrada** no componente. + +**Nota:** por outro lado, por razões de segurança, o comportamento normal não permite executar métodos de projeto pertencentes ao banco de dados local. Em certos casos, pode precisar dar permissão para que um componente acesse os métodos projetos de seu banco de dados host. Para fazer isso, deve atribuir explicitamente os métodos de projeto do banco host que queira que tenham acesso aos componentes. ![](assets/en/Concepts/pict516563.en.png) -## Passing variables +## Passar variáveis -The local, process and interprocess variables are not shared between components and host databases. The only way to access component variables from the host database and vice versa is using pointers. +As variáveis local, processo e interprocesso não são partilhadas entre componentes e os bancos locais. A única maneira de acessar às variáveis do componente desde o banco local e vice versa é usando ponteiros. -Example using an array: +Exemplo usando um array: ```4d -//In the host database: +//No banco de dados host: ARRAY INTEGER(MyArray;10) AMethod(->MyArray) -//In the component, the AMethod project method contains: +//No componente, o método de projeto AMethod contém: APPEND TO ARRAY($1->;2) ``` -Examples using variables: +Exemplos usando variáveis: ```4d C_TEXT(myvariable) @@ -68,68 +70,64 @@ Examples using variables: $p:=component_method2(...) ``` -When you use pointers to allow components and the host database to communicate, you need to take the following specificities into account: -- The `Get pointer` command will not return a pointer to a variable of the host database if it is called from a component and vice versa. +Quando usar ponteiros para que os componentes se comuniquem com o banco de dados, é preciso considerar as particularidades abaixo: + +- O comando `Get pointer` não devolverá um ponteiro a uma variável do banco de dados local se for chamada desde um componente e vice versa. + +- A arquitetura de componentes permite a coexistência, dentro do mesmo banco de dados interpretado, de componentes interpretados e compilados (por outro lado, em um banco de dados compilado só podem ser usados componentes compilados). Para utilizar apontadores neste caso, deve respeitar o seguinte princípio: o intérprete pode desconectar um ponteiro construído em modo compilado; no entanto, em modo compilado, não pode deconectar um ponteiro construído em modo interpretado. Ilustremos este principio com o exemplo abaixo: dados dois componentes, C (compilado) e I (interpretado), instalados no mesmo banco de dados local. + - Se o componente C definir a variável `myCvar` , o componente I pode acessar ao valor desta variável utilizando o ponteiro `->myCvar`. + - Se o componente I definir a variável `myIvar` , o componente C não pode acessar essa variável usando o ponteiro `->myIvar`. Esta sintaxe causa um erro de execução. -- The component architecture allows the coexistence, within the same interpreted database, of both interpreted and compiled components (conversely, only compiled components can be used in a compiled database). In order to use pointers in this case, you must respect the following principle: the interpreter can unpoint a pointer built in compiled mode; however, in compiled mode, you cannot unpoint a pointer built in interpreted mode. Let’s illustrate this principle with the following example: given two components, C (compiled) and I (interpreted), installed in the same host database. - - - If component C defines the `myCvar` variable, component I can access the value of this variable by using the pointer `->myCvar`. - - If component I defines the `myIvar` variable, component C cannot access this variable by using the pointer `->myIvar`. This syntax causes an execution error. -- The comparison of pointers using the `RESOLVE POINTER` command is not recommended with components since the principle of partitioning variables allows the coexistence of variables having the same name but with radically different contents in a component and the host database (or another component). The type of the variable can even be different in both contexts. If the `myptr1` and `myptr2` pointers each point to a variable, the following comparison will produce an incorrect result: +- A comparação de ponteiros utilizando o comando `RESOLVE POINTER` não é recomendado com os componentes, já que o principio de partição de variáveis permite a coexistência de variáveis com o mesmo nome mas com conteúdos radicalmente diferentes em um componente e no banco local (ou outro componente). O tipo da variável pode mesmo ser diferente em ambos os contextos. Se o `myptr1` e `myptr2` apontar cada ponto para uma variável, a comparação seguinte produzirá um resultado incorrecto: ```4d RESOLVE POINTER(myptr1;vVarName1;vtablenum1;vfieldnum1) RESOLVE POINTER(myptr2;vVarName2;vtablenum2;vfieldnum2) If(vVarName1=vVarName2) - //This test returns True even though the variables are different + //Este teste retorna True mesmo se as variáveis forem diferentes ``` - -In this case, it is necessary to use the comparison of pointers: - +Neste caso é preciso usar a comparação de ponteiros: ```4d - If(myptr1=myptr2) //This test returns False + If(myptr1=myptr2) //Este teste retorna False ``` -## Access to tables of the host database +## Acesso às tabelas do banco local -Although components cannot use tables, pointers can permit host databases and components to communicate with each other. For example, here is a method that could be called from a component: +Apesar dos componentes não poderem usar tabelas, ponteiros podem permitir que bancos host/locais se comuniquem com componentes. Por exemplo, aqui está um método que pode ser chamado a partir de um componente: ```4d -// calling a component method +// chamar a um método componente methCreateRec(->[PEOPLE];->[PEOPLE]Name;"Julie Andrews") ``` -Within the component, the code of the `methCreateRec` method: +Dentro do componente, o código do método `methCreateRec`: ```4d -C_POINTER($1) //Pointer on a table in host database -C_POINTER($2) //Pointer on a field in host database -C_TEXT($3) // Value to insert +C_POINTER($2) //Indicador em um campo do banco local C_TEXT($3) // Valor a inserir $tablepointer:=$1 -$fieldpointer:=$2 -CREATE RECORD($tablepointer->) +$fieldpointer:=$2 CREATE RECORD($tablepointer->) -$fieldpointer->:=$3 -SAVE RECORD($tablepointer->) +$fieldpointer->:=$3 SAVE RECORD($tablepointer->) ``` -## Scope of language commands +## Escopo dos comandos de linguagem -Except for [Unusable commands](#unusable-commands), a component can use any command of the 4D language. +Exceto pelos [Comandos não utilizáveis](#unusable-commands), um componente não pode usar qualquer comando da linguagem 4D. -When commands are called from a component, they are executed in the context of the component, except for the `EXECUTE METHOD` command that uses the context of the method specified by the command. Also note that the read commands of the “Users and Groups” theme can be used from a component but will read the users and groups of the host database (a component does not have its own users and groups). +Quando comandos são chamados a partir de um componente, são executados no contexto do componente, exceto pelo comando `EXECUTE METHOD` que utiliza o contexto do método especificado pelo comando. Também é preciso considerar que os comandos de leitura do tema "Usuários e grupos" podem ser usados desde um componente, mas lerão os usuários e grupos do banco local (um componente não tem seus próprios usuários e grupos). -The `SET DATABASE PARAMETER` and `Get database parameter` commands are an exception: their scope is global to the database. When these commands are called from a component, they are applied to the host database. +Os comandos `SET DATABASE PARAMETER` e `Get database parameter` são uma exceção: seu alcance é global ao banco de dados. Quando esses comandos forem chamados de um componente, são aplicados ao banco de dados local. -Furthermore, specific measures have been specified for the `Structure file` and `Get 4D folder` commands when they are used in the framework of components. +Além disso, medidas especificas foram criadas para os comandos `Structure file` e `Get 4D folder` quando utilizados no marco dos componentes. -The `COMPONENT LIST` command can be used to obtain the list of components that are loaded by the host database. +O comando `COMPONENT LIST` pode ser utilizado para obter a lista de componentes que carrega o banco local. -### Unusable commands -The following commands are not compatible for use within a component because they modify the structure file — which is open in read-only. Their execution in a component will generate the error -10511, “The CommandName command cannot be called from a component”: +### Comandos não utilizáveis + +Os comandos abaixo nãoo são compatíveis para seu uso dentro de um componente porque modificam o arquivo de estrutura - que está aberto em apenas leitura. Sua execução em um componente gerará o erro -10511, "O comando NomeComando não pode ser chamado desde um componente": - `ON EVENT CALL` - `Method called on event` @@ -149,40 +147,40 @@ The following commands are not compatible for use within a component because the - `BLOB TO USERS` - `SET PLUGIN ACCESS` -**Notes:** +**Notas:** -- The `Current form table` command returns `Nil` when it is called in the context of a project form. Consequently, it cannot be used in a component. -- SQL data definition language commands (`CREATE TABLE`, `DROP TABLE`, etc.) cannot be used on the component database. However, they are supported with external databases (see `CREATE DATABASE` SQL command). +- O comando `Current form table` devolve `Nil` quando chamado no contexto de um formulário projeto. Por isso não pode ser usado em um componente. +- Os comandos SQL de definição de dados (`CREATE TABLE`, `DROP TABLE`, etc.) não podem ser utilizados no banco de dados do componente. Entretanto são compatíveis com bancos de dados externos (ver o comando SQL`CREATE DATABASE`). -## Error handling +## Gestão de erros -An [error-handling method](Concepts/error-handling.md) installed by the `ON ERR CALL` command only applies to the running database. In the case of an error generated by a component, the `ON ERR CALL` error-handling method of the host database is not called, and vice versa. +Um [método de gestião de erros](Concepts/error-handling.md) instalado pelo comando `ON ERR CALL` só se aplica ao banco de dados em execução. No caso de um erro gerado por um componente, não se chama ao método de gestão de erros `ON ERR CALL` do banco local, e viceversa. -## Use of forms +## Uso de formulários -- Only “project forms” (forms that are not associated with any specific table) can be used in a component. Any project forms present in the matrix database can be used by the component. -- A component can call table forms of the host database. Note that in this case it is necessary to use pointers rather than table names between brackets [] to specify the forms in the code of the component. +- Só os "formulários de projeto" (formulários que não estejam associados a nenhuma tabela específica) podem ser utilizados em um componente. Qualquer formulário projeto presente no banco de dados matriz pode usado pelo componente. +- Um componente pode chamar formulários tabelas do banco de dados local. Note que nesse caso é necessário usar ponteiros ao invés de nomes de tabelas entre colchetes [] para especificar os formulários no código do componente. -**Note:** If a component uses the `ADD RECORD` command, the current Input form of the host database will be displayed, in the context of the host database. Consequently, if the form includes variables, the component will not have access to it. +**Nota:** se um componente utilizar o comando `ADD RECORD`, se mostrará o formulário de entrada atual do banco de dados local, no contexto do banco local. Por isso se o formulário incluir variáveis, o componente não terá acesso ao formulário. -- You can publish component forms as subforms in the host databases. This means that you can, more particularly, develop components offering graphic objects. For example, Widgets provided by 4D are based on the use of subforms in components. +- Pode publicar formulários componentes como subformulários no banco de dados local Pode publicar formulários componentes como subformulários no banco de dados local Isso significa que pode desenvolver componentes oferecendo objetos gráficos. Pode publicar formulários componentes como subformulários no banco de dados local Isso significa que pode desenvolver componentes oferecendo objetos gráficos. Por exemplo, Widgets fornecidos por 4D são baseados no uso de subformulários em componentes. -## Use of tables and fields +## Uso de tabelas e campos -A component cannot use the tables and fields defined in the 4D structure of the matrix database. However, you can create and use external databases, and then use their tables and fields according to your needs. You can create and manage external databases using SQL. An external database is a 4D database that is independent from the main 4D database, but that you can work with from the main 4D database. Using an external database means temporarily designating this database as the current database, in other words, as the target database for the SQL queries executed by 4D. You create external databases using the SQL `CREATE DATABASE` command. +Um componente não pode usar as tabelas e campos definidos na estrutura 4D do banco de dados matriz. Mas pode criar e usar bancos de dados externos e então usar suas tabelas e campos de acordo com suas necessidades. Pode criar e gerenciar bancos de dados externos usando SQL. Um banco de dados externo é um banco 4D que é independente do banco 4D principal, mas que pode trabalhar com o banco principal. Usar um banco externo significa designar temporariamente esse banco de dados como o banco atual, em outras palavras, o banco alvo para as pesquisas SQL executadas por 4D. Pode criar bancos externos usando o comando SQL `CREATE DATABASE`. -### Example +### Exemplo -The following code is included in a component and performs three basic actions with an external database: +O código abaixo está incluído em um componente e realiza três ações básicas com um banco externo: -- creates the external database if it does not already exist, -- adds data to the external database, -- reads data from the external database. +- cria o banco externo se não existir ainda +- adiciona dados ao banco externo, +- lê dados do banco externo. -Creating the external database: +Cria o banco externo: ```4d -<>MyDatabase:=Get 4D folder+"\MyDB" // (Windows) stores the data in an authorized directory +<>MyDatabase:=Get 4D folder+"\MyDB" // (Windows) armazena os dados em um diretório autorizado Begin SQL CREATE DATABASE IF NOT EXISTS DATAFILE :[<>MyDatabase]; USE DATABASE DATAFILE :[<>MyDatabase]; @@ -202,10 +200,10 @@ Creating the external database: End SQL ``` -Writing in the external database: +Escrita no banco de dados externa: ```4d - $Ptr_1:=$2 // retrieves data from the host database through pointers + $Ptr_1:=$2 // recupera dados do banco de dados local através de ponteiros $Ptr_2:=$3 $Ptr_3:=$4 $Ptr_4:=$5 @@ -224,10 +222,10 @@ Writing in the external database: End SQL ``` -Reading from an external database: +Lendo de um banco externo: ```4d - $Ptr_1:=$2 // accesses data of the host database through pointers + $Ptr_1:=$2 // acesse aos dados do banco local através de ponteiros $Ptr_2:=$3 $Ptr_3:=$4 $Ptr_4:=$5 @@ -246,18 +244,17 @@ Reading from an external database: End SQL ``` -## Use of resources - -Components can use resources. In conformity with the resource management principle, if the component is of the .4dbase architecture (recommended architecture), the Resources folder must be placed inside this folder. +## Uso de recursos -Automatic mechanisms are operational: the XLIFF files found in the Resources folder of a component will be loaded by this component. +Componentes podem usar recursos. De acordo com o princípio de gestão de recursos, se o componente for de arquitetura .4dbase (arquitetura recomendada), a pasta Resources deve ser colocada dentro desta pasta. -In a host database containing one or more components, each component as well as the host databases has its own “resources string.” Resources are partitioned between the different databases: it is not possible to access the resources of component A from component B or the host database. +Mecanismos automáticos são operacionais: os arquivos XLIFF encontrados na pasta Resources de um componene serão carregados por esse componente. -## On-line help for components +Em um banco de dados local que contém um ou mais componentes, cada componente, assim como os bancos de dados locais, tem sua propria "cadeia de recursos." Os recursos estão divididos entre os diferentes bancos de dados: não é possível acessar aos recursos do componente A desde o componente B ou ao banco de dados local. -A specific mechanism has been implemented in order to allow developers to add on-line help to their components. The principle is the same as that provided for 4D databases: +## Ajuda online para os componentes +Um mecanismo específico foi implementado para permitir que desenvolvedores adicionem ajuda online a seus componentes. O principio é o mesmo que o previsto para os bancos de dados 4D: -- The component help must be provided as a file suffixed .htm, .html or (Windows only) .chm, -- The help file must be put next to the structure file of the component and have the same name as the structure file, -- This file is then automatically loaded into the Help menu of the application with the title “Help for...” followed by the name of the help file. \ No newline at end of file +- O componente ajuda deve ser fornecido como um arquivo com sufixo .htm, .html ou (em Windows apenas) .chm +- O arquivo de ajuda deve ser colocado do lado do arquivo de estrutura de componente e tem que ter o mesmo nome que o arquivo de estrutura, +- Esse arquivo é então carregado automaticamente no menu Help da aplicação com o título "Help for..." seguido pelo nome do arquivo de ajuda. diff --git a/website/translated_docs/pt/Concepts/data-types.md b/website/translated_docs/pt/Concepts/data-types.md index 8ac39a33e22ca4..aac3cf21728e3e 100644 --- a/website/translated_docs/pt/Concepts/data-types.md +++ b/website/translated_docs/pt/Concepts/data-types.md @@ -1,86 +1,84 @@ --- id: data-types -title: Data types overview +title: Tipos de dados --- -In 4D, data are handled according to their type in two places: database fields and the 4D language. - -Although they are usually equivalent, some data types available at the database level are not directly available in the language and are automatically converted. Conversely, some data types can only be handled through the language. The following table lists all available data types and how they are supported/declared: - -| Data Types | Database support(1) | Language support | Variable declaration | -| ------------------------------------------ | ------------------- | -------------------- | ---------------------------- | -| [Alphanumeric](dt_string.md) | Yes | Converted to text | - | -| [Text](Concepts/dt_string.md) | Yes | Yes | `C_TEXT`, `ARRAY TEXT` | -| [Date](Concepts/dt_date.md) | Yes | Yes | `C_DATE`, `ARRAY DATE` | -| [Time](Concepts/dt_time.md) | Yes | Yes | `C_TIME`, `ARRAY TIME` | -| [Boolean](Concepts/dt_boolean.md) | Yes | Yes | `C_BOOLEAN`, `ARRAY BOOLEAN` | -| [Integer](Concepts/dt_number.md) | Yes | Converted to longint | `ARRAY INTEGER` | -| [Longint](Concepts/dt_number.md) | Yes | Yes | `C_LONGINT`, `ARRAY LONGINT` | -| [Longint 64 bits](Concepts/dt_number.md) | Yes (SQL) | Converted to real | - | -| [Real](Concepts/dt_number.md) | Yes | Yes | `C_REAL`, `ARRAY REAL` | -| [Undefined](Concepts/dt_null_undefined.md) | - | Yes | - | -| [Null](Concepts/dt_null_undefined.md) | - | Yes | - | -| [Pointer](Concepts/dt_pointer.md) | - | Yes | `C_POINTER`, `ARRAY POINTER` | -| [Picture](Concepts/dt_picture.md) | Yes | Yes | `C_PICTURE`, `ARRAY PICTURE` | -| [BLOB](Concepts/dt_blob.md) | Yes | Yes | `C_BLOB`, `ARRAY BLOB` | -| [Object](Concepts/dt_object.md) | Yes | Yes | `C_OBJECT`, `ARRAY OBJECT` | -| [Collection](Concepts/dt_collection.md) | - | Yes | `C_COLLECTION` | -| [Variant](Concepts/dt_variant.md)(2) | - | Yes | `C_VARIANT` | - - -(1) Note that ORDA handles database fields through objects (entities) and thus, only supports data types available to these objects. For more information, see the [Object](Concepts/dt_object.md) data type description. - -(2) Variant is actually not a *data* type but a *variable* type that can contain a value of any other data type. - -## Default values - -When variables are typed by means of a compiler directive, they receive a default value, which they will keep during the session as long as they have not been assigned. - -The default value depends on the variable type and category, its execution context (interpreted or compiled), as well as, for compiled mode, the compilation options defined on the Compiler page of the Database settings: - -- Process and interprocess variables are always set "to zero" (which means, depending on the case, "0", an empty string, an empty Blob, a Nil pointer, a blank date (00-00-00), etc.) -- Local variables are set: - - in interpreted mode: to zero - - in compiled mode, depending on the **Initialize local variables** option of the Database settings: - - "to zero": to zero (see above), - - "to a random value": 0x72677267 for numbers and times, always True for Booleans, the same as "to zero" for the others, - - "no": no initialization, meaning whatever is in RAM is used for the variables, like values used before for other variables. **Note:** 4D recommends to use "to zero". - -The following table illustrates these default values: - -| Type | Interprocess/Process (interpreted/compiled), Local (interpreted/compiled "to zero") | Local compiled "random" | Local compiled "no" | -| ---------- | ----------------------------------------------------------------------------------- | ----------------------- | ---------------------------- | -| Booleen | False | True | True (varies) | -| Date | 00-00-00 | 00-00-00 | 00-00-00 | -| Longint | 0 | 1919382119 | 909540880 (varies) | -| Time | 00:00:00 | 533161:41:59 | 249345:34:24 (varies) | -| Picture | picture size=0 | picture size=0 | picture size=0 | -| Real | 0 | 1.250753659382e+243 | 1.972748538022e-217 (varies) | -| Pointer | Nil=true | Nil=true | Nil=true | -| Text | "" | "" | "" | -| Blob | Blob size=0 | Blob size=0 | Blob size=0 | -| Object | null | null | null | -| Collection | null | null | null | -| Variant | undefined | undefined | undefined | - - -## Converting data types - -The 4D language contains operators and commands to convert between data types, where such conversions are meaningful. The 4D language enforces data type checking. For example, you cannot write: "abc"+0.5+!12/25/96!-?00:30:45?. This will generate syntax errors. - -The following table lists the basic data types, the data types to which they can be converted, and the commands used to do so: - -| Data Type to Convert | to String | to Number | to Date | to Time | to Boolean | -| -------------------- | --------- | --------- | ------- | ------- | ---------- | -| String (1) | | Num | Date | Time | Bool | -| Number (2) | String | | | | Bool | -| Date | String | | | | Bool | -| Time | String | | | | Bool | -| Boolean | | Num | | | | - - -(1) Strings formatted in JSON can be converted into scalar data, objects, or collections, using the `JSON Parse` command. - -(2) Time values can be treated as numbers. - -**Note:** In addition to the data conversions listed in this table, more sophisticated data conversions can be obtained by combining operators and other commands. \ No newline at end of file +Em 4D, os dados se manejam segundo seu tipo em dois lugares: os campos do banco de dados e a linguagem 4D. + +Apesar de geralmente serem equivalentes, alguns tipos de dados disponíveis no nível do banco de dados não estão diretamente disponíveis na linguagem e são convertidos automaticamente. Por outro lado, alguns tipos de dados pode somente ser manejados através da linguagem. A tabela lista todos os tipos de dados disponíveis e sua compatibilidade/declarações: + +| Tipos de dados | Suporte para o banco (1) | Suporte Linguagem | Declaração de variáveis | +| ---------------------------------------------- | ------------------------ | ----------------------- | ---------------------------- | +| [Alfanumérico](dt_string.md) | Sim | Convertido em texto | - | +| [Texto](Concepts/dt_string.md) | Sim | Sim | `C_TEXT`, `ARRAY TEXTO` | +| [Data](Concepts/dt_date.md) | Sim | Sim | `C_DATE`, `ARRAY DATE` | +| [Hora](Concepts/dt_time.md) | Sim | Sim | `C_TIME`, `ARRAY TIME` | +| [Booleano](Concepts/dt_boolean.md) | Sim | Sim | `C_BOOLEAN`, `ARRAY BOOLEAN` | +| [Inteiro](Concepts/dt_number.md) | Sim | Convertido para longInt | `ARRAY INTEGER` | +| [Inteiro longo](Concepts/dt_number.md) | Sim | Sim | `C_LONGINT`, `ARRAY LONGINT` | +| [Inteiro longo 64 bits](Concepts/dt_number.md) | Yes (SQL) | Convertido para real | - | +| [Real](Concepts/dt_number.md) | Sim | Sim | `C_REAL`, `ARRAY REAL` | +| [Indefinido](Concepts/dt_null_undefined.md) | - | Sim | - | +| [Null](Concepts/dt_null_undefined.md) | - | Sim | - | +| [Ponteiro](Concepts/dt_pointer.md) | - | Sim | `C_POINTER`, `ARRAY POINTER` | +| [Imagem](Concepts/dt_picture.md) | Sim | Sim | `C_PICTURE`, `ARRAY PICTURE` | +| [BLOB](Concepts/dt_blob.md) | Sim | Sim | `C_BLOB`, `ARRAY BLOB` | +| [Objeto](Concepts/dt_object.md) | Sim | Sim | `C_OBJECT`, `ARRAY OBJECT` | +| [Coleção](Concepts/dt_collection.md) | - | Sim | `C_COLLECTION` | +| [Variant](Concepts/dt_variant.md)(2) | - | Sim | `C_VARIANT` | + +(1) Note que ORDA maneja campos de bancos de dados através de objetos (entidades) e assim, só é compatível com tipos de dados disponíveis a esses objetos. Para saber mais, veja a descrição de tipo de dados [Object](Concepts/dt_object.md). + +(2) Variante não é um tipo *data* mas um tipo *variável* que contém um valor de qualquer outro tipo de dados. + +## Valor padrão + +Quando as variáveis são introduzidas através de uma diretiva do compilador, recebem um valor padrão, que manterão durante a sessão enquanto não tenham sido atribuidas. + +O valor padrão depende do tipo variável e categoria, seu contexto de educação (interpretado ou compilado) assim como, para o modo compilado, as opções de compilação definidas na página Compilador das configurações de Banco de dados: + +- Variáveis processo e interprocesso são sempre estabelecidas "para zero" (o que significa, dependendo do caso, "0", uma string vazia, um Blob vazio, um ponteiro Nil, uma data em branco (00-00-00), etc) +- Variáveis locais são estabelecidas: + - em modo interpretado: em zero + - em modo compilado, dependendo da opção **Initialize local variables** das configurações de banco de dados: + - "em zero": em zero (ver acima), + - "a um valor aleatório": 0x72677267 para números e horas, sempre True para booleanos, igual que "em zero" para os outros, + - "no": nenhuma inicialização, significando o que quer que esteja na RAM é usado para as variáveis, como valores usados antes para outras variáveis. **Nota:** 4D recomenda a utilização de "a zero". + +A tabela a seguir ilustra estes valores padrões: + +| Type | Interprocess/Process (interpreted/compiled), Local (interpreted/compiled "to zero") | Compilação local "aleatória | Compilação local "não | +| ------------- | ----------------------------------------------------------------------------------- | --------------------------- | --------------------------- | +| Booleano | False | True | True (varía) | +| Date | 00-00-00 | 00-00-00 | 00-00-00 | +| Inteiro longo | 0 | 1919382119 | 909540880 (varia) | +| Hora | 00:00:00 | 533161:41:59 | 249345:34:24 (varia) | +| Imagem | tamanho da imagem=0 | tamanho da imagem=0 | tamanho da imagem=0 | +| Real | 0 | 1.250753659382e+243 | 1.972748538022e-217 (varia) | +| Ponteiro | Nil=true | Nil=true | Nil=true | +| Texto | "" | "" | "" | +| Blob | Tamanho do Blob =0 | Tamanho do Blob =0 | Tamanho do Blob =0 | +| Objeto | null | null | null | +| Coleção | null | null | null | +| Variant | indefinido | indefinido | indefinido | + + +## Conversão de tipos de dados + +A linguagem 4D contém operadores e comandos para converter entre tipos de dados, onde tais conversões são significativas. A língua 4D obriga à verificação do tipo de dados. Por exemplo, não se pode escrever: "abc"+0.5+!12/25/96!-?00:30:45?. Isto irá gerar erros de sintaxe. + +O quadro seguinte lista os tipos de dados básicos, os tipos de dados para os quais podem ser convertidos, e os comandos utilizados para o fazer: + +| Tipo de dados a converter | para String | para Número | para Data | para Tempo | para Booleano | +| ------------------------- | ----------- | ----------- | --------- | ---------- | ------------- | +| String (1) | | Num | Date | Hora | Bool | +| Número (2) | String | | | | Bool | +| Date | String | | | | Bool | +| Hora | String | | | | Bool | +| Booleano | | Num | | | | + +(1) Strings formatadas em JSON podem ser convertidas em dados escalares, objetos ou coleções, usando o comando `JSON Parse` + +(2) Os valores de tempo podem ser tratados como números. + +**Nota:** Além das conversões de dados listadas nesta tabela. Conversões de dados mais sofisticadas podem ser obtidas combinando operadores e outros comandos. diff --git a/website/translated_docs/pt/Concepts/dt_blob.md b/website/translated_docs/pt/Concepts/dt_blob.md index 0d724bb37ec828..8b78062a083d15 100644 --- a/website/translated_docs/pt/Concepts/dt_blob.md +++ b/website/translated_docs/pt/Concepts/dt_blob.md @@ -3,18 +3,20 @@ id: blob title: BLOB --- -- A BLOB (Binary Large OBjects) field, variable or expression is a contiguous series of bytes which can be treated as one whole object or whose bytes can be addressed individually. A BLOB can be empty (null length) or can contain up to 2147483647 bytes (2 GB). -- A BLOB is loaded into memory in its entirety. A BLOB variable is held and exists in memory only. A BLOB field is loaded into memory from the disk, like the rest of the record to which it belongs. -- Like the other field types that can retain a large amount of data (such as the Picture field type), BLOB fields are not duplicated in memory when you modify a record. Consequently, the result returned by the `Old` and `Modified` commands is not significant when applied to a BLOB field. +- Um campo, variável ou expressão BLOB (Binary Large OBjects) é uma série contígua de bytes que pode ser tratada como um objeto completo ou cujos bytes podem ser direcionados individualmente. Um BLOB pode estar vazio (longitude nula) ou pode conter até 2147483647 bytes (2 GB). -## Parameter passing, Pointers and function results +> Como padrão, 4D estabelece o tamanho blob máximo para 2GB mas esse limite de tamanho pode ser menor dependendo de seu SO e de quanto espaço está disponível. -4D BLOBs can be passed as parameters to 4D commands or plug-in routines that expect BLOB parameters. BLOBS can also be passed as parameters to a user method or be returned as a function result. +- Um BLOB é carregado totalmente na memória. Uma variável BLOB é mantida e existe apenas na memória. Um campo BLOB é carregado na memória desde o disco, como o resto do registro ao que pertence. +- Como os outros tipos de campo que podem reter uma grande quantidade de dados (tais como tipo de campo Imagem), os campos BLOB não são duplicados na memória quando um registro for modificado. Consequentemente o resultado devolvido pelos comandos `Old` e `Modified` não é significativo quando for aplicado a um campo BLOB. -To pass a BLOB to your own methods, you can also define a pointer to the BLOB and pass the pointer as parameter. +## Passando parâmetros, ponteiros e resultados de funções -**Examples:** +Os BLOBs em 4D podem ser passados como parâmetros aos comandos 4D ou às rotinas dos plugins que esperam parâmetros BLOB. Os BLOBS também podem ser passados como parâmetros para um método usuário ou serem retornados como resultado de uma função +Para passar um BLOB a seus próprios métodos, pode também definir um ponteiro ao BLOB e passar o ponteiro como um parâmetro. + +**Exemplos:** ```4d ` Declare a variable of type BLOB C_BLOB(anyBlobVar) @@ -28,39 +30,35 @@ To pass a BLOB to your own methods, you can also define a pointer to the BLOB an ` A pointer to the BLOB is passed as parameter to a user method COMPUTE BLOB(->anyBlobVar) ``` +**Nota para desenvolvedores de plugins:** um parâmetro BLOB se declara como "&O" (a letra "O", não o número "0"). -**Note for Plug-in developers:** A BLOB parameter is declared as “&O” (the letter “O”, not the digit “0”). - -## Assignment operator - -You can assign BLOBs to each other. +## Operador de atribuição -**Example:** +Pode atribuir BLOBS um para o outro. +**Exemplo:** ```4d - ` Declare two variables of type BLOB + ` Declara duas variáveis de tipo BLOB C_BLOB(vBlobA;vBlobB) - ` Set the size of the first BLOB to 10K + ` Estabelece o tamanho do primeiro BLOB a 10K SET BLOB SIZE(vBlobA;10*1024) - ` Assign the first BLOB to the second one + ` Atribui o primeiro BLOB ao segundo vBlobB:=vBlobA ``` -However, no operator can be applied to BLOBs. +Entretanto, nenhum operador pode ser aplicado aos BLOBs. -## Addressing BLOB contents - -You can address each byte of a BLOB individually using the curly brackets symbols {...}. Within a BLOB, bytes are numbered from 0 to N-1, where N is the size of the BLOB. Example: +## Direcionar os conteúdos de um BLOB +Cada byte de um BLOB pode ser dirigido individualmente utilizando os símbolos de colchetes {...}. Dentro de um BLOB, os bytes são numerados de 0 a N-1, onde N é o tamanho do BLOB. Exemplo: ```4d - ` Declare a variable of type BLOB + ` Declarar uma variável de tipo BLOB C_BLOB(vBlob) - ` Set the size of the BLOB to 256 bytes + ` Estabelece o tamanho do BLOB para 256 bytes SET BLOB SIZE(vBlob;256) - ` The loop below initializes the 256 bytes of the BLOB to zero + ` O loop abaixo inicia os 256 bytes do BLOB para zero For(vByte;0;BLOB size(vBlob)-1) vBlob{vByte}:=0 End for ``` - -Because you can address all the bytes of a BLOB individually, you can actually store whatever you want in a BLOB field or variable. \ No newline at end of file +Como todos os bytes de um BLOB podem ser direcionados de forma individual, é possível armazenar o que quiser em um campo ou variável BLOB. diff --git a/website/translated_docs/pt/Concepts/dt_boolean.md b/website/translated_docs/pt/Concepts/dt_boolean.md index 0d6ab9c850c7ee..9d43a65cc2c154 100644 --- a/website/translated_docs/pt/Concepts/dt_boolean.md +++ b/website/translated_docs/pt/Concepts/dt_boolean.md @@ -1,47 +1,46 @@ --- -id: boolean -title: Boolean +id: booleano +title: Booleano --- -A boolean field, variable or expression can be either TRUE or FALSE. +Um campo booleano, variável ou expressão pode ser VERDADEIRO ou FALSO. -## Boolean functions +## Funções booleanas -4D provides the Boolean functions `True`, `False`, and `Not` in the dedicated **Boolean** theme. For more information, see the descriptions of these commands +4D fornece as funções booleanas `True`, `False`, e `Not` no tema dedicado **Boolean** . Para obter mais informações, consulte as descrições desses comandos -### Example +### Exemplo -This example sets a Boolean variable based on the value of a button. It returns True in myBoolean if the myButton button was clicked and False if the button was not clicked. When a button is clicked, the button variable is set to 1. +Esse exemplo define uma variável booleana com base no valor de um botão. Retorna verdadeiro em myBoolean se o botão myButton foi clicado e falso se o botão não foi clicado. Quando um botão é clicado, a variável do botão é definida como 1. ```4d - If(myButton=1) //If the button was clicked - myBoolean:=True //myBoolean is set to True - Else //If the button was not clicked, - myBoolean:=False //myBoolean is set to False + If(myButton=1) //Se apertou o botão + myBoolean:=True //myBoolean toma o valor True + Else //Se o botão não for apertado + myBoolean:=False //myBoolean toma o valor False End if ``` -The previous example can be simplified into one line. +O exemplo anterior pode ser simplificado numa só linha. ```4d myBoolean:=(myButton=1) ``` -## Logical operators +## Operação lógica -4D supports two logical operators that work on Boolean expressions: conjunction (AND) and inclusive disjunction (OR). A logical AND returns TRUE if both expressions are TRUE. A logical OR returns TRUE if at least one of the expressions is TRUE. The following table shows the logical operators: +4D suporta dois operadores lógicos que trabalham com expressões booleanas: conjunção (AND) e disjunção inclusiva (OR). Uma lógica E retorna VERDADEIRA se ambas as expressões forem VERDADEIRAS. Uma lógica OU retorna VERDADEIRA se pelo menos uma das expressões for VERDADEIRA. O quadro seguinte mostra os operadores lógicos: -| Operation | Syntax | Returns | Expression | Value | -| --------- | ---------------------- | ------- | --------------------------- | ----- | -| AND | Boolean & Boolean | Boolean | ("A" = "A") & (15 # 3) | True | -| | | | ("A" = "B") & (15 # 3) | False | -| | | | ("A" = "B") & (15 = 3) | False | -| OR | Boolean | Boolean | Boolean | ("A" = "A") | (15 # 3) | True | -| | | | ("A" = "B") | (15 # 3) | True | -| | | | ("A" = "B") | (15 = 3) | False | +| Operação | Sintaxe | Retorna | Expressão | Value | +| -------- | ----------------------- | -------- | ---------------------------- | ----- | +| AND | Boolean & Boolean | Booleano | ("A" = "A") & (15 # 3) | True | +| | | | ("A" = "B") & (15 # 3) | False | +| | | | ("A" = "B") & (15 = 3) | False | +| OU | Boolean | Boolean | Booleano | ("A" = "A") | (15 # 3) | True | +| | | | ("A" = "B") | (15 # 3) | True | +| | | | ("A" = "B") | (15 = 3) | False | - -The following is the truth table for the AND logical operator: +A tabela seguinte é a tabela da verdade para o operador lógico AND: | Expr1 | Expr2 | Expr1 & Expr2 | | ----- | ----- | ------------- | @@ -50,8 +49,7 @@ The following is the truth table for the AND logical operator: | False | True | False | | False | False | False | - -The following is the truth table for the OR logical operator: +A tabela seguinte é a tabela da verdade para o operador lógico OR: | Expr1 | Expr2 | Expr1 | Expr2 | | ----- | ----- | ------------------ | @@ -60,9 +58,8 @@ The following is the truth table for the OR logical operator: | False | True | True | | False | False | False | - -**Tip:** If you need to calculate the exclusive disjunction between Expr1 and Expr2, evaluate: +**Dica:** Se você precisa calcular a disjunção exclusiva entre Expr1 e Expr2, avalie: ```4d (Expr1|Expr2) & Not(Expr1 & Expr2) -``` \ No newline at end of file +``` diff --git a/website/translated_docs/pt/Concepts/dt_collection.md b/website/translated_docs/pt/Concepts/dt_collection.md index eca39c6ebf4616..5306fedb3975b4 100644 --- a/website/translated_docs/pt/Concepts/dt_collection.md +++ b/website/translated_docs/pt/Concepts/dt_collection.md @@ -1,35 +1,35 @@ --- id: collection -title: Collection +title: Coleção --- -Collections are ordered lists of values of similar or mixed types (text, number, object, boolean, collection, or null). +Coleções são listas ordenadas de valores de tipos diferentes ou não (texto, número, objeto, booleano, coleção ou null). -To manage Collection type variables you must use object notation (see [Syntax basics](Concepts/dt_object.md#syntax-basics)). +Para gerenciar as variáveis de tipo Coleção se deve utilizar a notação de objetos (ver [Syntax basics](Concepts/dt_object.md#syntax-basics)). -To access a collection element, you need to pass the element number inside square brackets: +Para acessar a um elemento da coleção, é preciso passar o número do elemento entre colchetes: ```4d collectionRef[expression] ``` -You can pass any valid 4D expression which returns a positive integer in expression. Examples: +Pode passar toda expressão 4D válida que devolva um inteiro positivo na expressão. Exemplos: ```4d - myCollection[5] //access to 6th element of the collection + myCollection[5] //aceso ao 6º elemento da coleção myCollection[$var] ``` -**Warning:** Collection elements are numbered from 0. +**Atenção:** os elementos da coleção estão numerados desde 0. -You can assign a value to a collection element or get a collection element value using object notation: +Pode atribuir um valor a um elemento da coleção ou obter o valor de um elemento da coleção utilizando a notação de objetos: ```4d myCol[10]:="My new element" $myVar:=myCol[0] ``` -If you assign an element's index that surpasses the last existing element of the collection, the collection is automatically resized and all new intermediary elements are assigned a null value: +Se atribuir um índice de elemento que ultrapasse o último elemento existente da coleção, a coleção se redimensiona automaticamente e a todos os novos elementos intermediários se lhes atribui um valor nulo: ```4d C_COLLECTION(myCol) @@ -40,56 +40,57 @@ If you assign an element's index that surpasses the last existing element of the //myCol[4]=null ``` -## Initialization +## Inicialização -Collections must have been initialized, for example using the `New collection` command, otherwise trying to read or modify their elements will generate a syntax error. - -Example: +As coleções devem ter sido inicializadas, por exemplo utilizando o comando `New collection`, do contrário ao tentar ler ou modificar seus elementos se gerará um erro de sintaxe. +Exemplo: ```4d - C_COLLECTION($colVar) //creation of collection type 4D variable - $colVar:=New collection //initialization of the collection and assignment to the 4D variable + C_COLLECTION($colVar) //criação de uma variável 4D de tipo coleção + $colVar:=Nova coleção //inicialização da coleção e atribuição a variável 4D ``` -### Regular or shared collection +### Coleção regular ou partilhada -You can create two types of collections: +Pode criar dois tipos de coleções: -- regular (non-shared) collections, using the `New collection` command. These collections can be edited without any specific access control but cannot be shared between processes. -- shared collections, using the `New shared collection` command. These collections can be shared between processes, including preemptive threads. Access to these collections is controlled by `Use...End use` structures. For more information, refer to the [Shared objects and collections](Concepts/shared.md) section. +- coleções padrão (não compartilhadas), utilizando o comando `New collection`. Essas coleções podem ser editadas sem qualquer controle de acesso específico mas não podem ser compartilhadas entre processos. +- coleções compartidas, utilizando o comando `New shared collection`. Essas coleções podem ser partilhadas entre processos, incluindo threads preemptivos. O acesso a estas coleções é controlada mediante estruturas `Use... End use`. Para saber mais, consulte a seção [Objetos e coleções compartidos](Concepts/shared.md). -## Collection methods +## Métodos de coleção -4D collection references benefit from special methods (sometimes named *member functions*). Thanks to object notation, these methods can be applied to collection references using the following syntax: +As referências a coleções 4D se beneficiam de métodos especiais (as vezes chamados *funções membro*). Graças à notação de objetos, esses métodos podem ser aplicados às referências da coleção usando a sintaxe abaixo: > {$result:=}myCollection.memberFunction( {params} ) -Note that, even if it does not have parameters, a member function must be called with () parenthesis, otherwise a syntax error is generated. +Note que mesmo não tiver parâmetros, uma função membro deve ser chamada com parênteses (), do contrário é gerado um erro de sintaxe.. -For example: +Por exemplo: ```4d -$newCol:=$col.copy() //deep copy of $col to $newCol -$col.push(10;100) //add 10 and 100 to the collection +$newCol:=$col.copy() //cópia de $col a $newCol +$col.push(10;100) //adiciona 10 e 100 para a coleção ``` -Some methods return the original collection after modification, so that you can run the calls in a sequence: +Alguns métodos retornam a coleção original depois de moficiação, para que possa rodar as chamadas em sequência: ```4d $col:=New collection(5;20) $col2:=$col.push(10;100).sort() //$col2=[5,10,20,100] ``` -### propertyPath parameter -Several methods accept a *propertyPath* as parameter. This parameter stands for: +### Parâmetro rotaPropriedade + -- either an object property name, for example "lastName" -- or an object property path, i.e. a hierarchical sequence of sub-properties linked with dot characters, for example "employee.children.firstName". +Vários métodos aceitam uma _propertyPath_ como parâmetro. Este parâmetro significa: -**Warning:** When using methods and propertyPath parameters, you cannot use ".", "[ ]", or spaces in property names since it will prevent 4D from correctly parsing the path: +- um nome de objeto propriedade por exemplo "Sobrenome" +- ou uma rota de propriedades de objeto, ou seja, uma sequência hierárquica de subpropriedades vinculadas com caracteres de ponto, por exemplo "empregado.filhos.nome". + +**Atenção:** quando utilizar métodos e parâmetros propertyPath, não pode utilizar ".", "[ ]", ou espaços nos nomes das propriedades já que impedirá que 4D analise corretamente a rota: ```4d - $vmin:=$col.min("My.special.property") //undefined - $vmin:=$col.min(["My.special.property"]) //error -``` \ No newline at end of file + $vmin:=$col.min("My.special.property") //indefinido + $vmin:=$col.min(["My.special.property"]) //erro +``` diff --git a/website/translated_docs/pt/Concepts/dt_date.md b/website/translated_docs/pt/Concepts/dt_date.md index cf3e890c6e6d19..7ecf7dff8f7216 100644 --- a/website/translated_docs/pt/Concepts/dt_date.md +++ b/website/translated_docs/pt/Concepts/dt_date.md @@ -3,14 +3,14 @@ id: date title: Date --- -- A Date field, variable or expression can be in the range of 1/1/100 to 12/31/32,767. -- Although the representation mode for dates by can work with dates up to the year 32 767, certain operations passing through the system impose a lower limit. +- As variáveis, campos ou expressões de tipo data podem ter um intervalo entre 1/1/100 e 31/12/32.767. +- Apesar do modo de representação de datas de C_DATE permitir trabalhar com datas até o ano 32 767, certas operações que passam pelo sistema impõe um limite inferior. -**Note:** In the 4D Language Reference manual, Date parameters in command descriptions are denoted as Date, except when marked otherwise. +**Nota:** No manual 4D Language Reference, parâmetros Data em descrições de comando são denominadas como Data, exceto quando marcadas de outra forma. -## Date literals +## Constantes literais de tipo hora -A date literal constant is enclosed by exclamation marks (!…!). A date must be structured using the ISO format (!YYYY-MM-DD!). Here are some examples of date constants: +Uma constante literal de tipo data está cercada de sinais de exclamação (!...!). Uma data deve ser estruturada usando o formato ISO (!YYYY-MM-DD!) Estes são alguns exemplos de constantes de datas: Estes são alguns exemplos de constantes de datas: Estes são alguns exemplos de constantes de datas: ```4d !1976-01-01! @@ -18,31 +18,31 @@ A date literal constant is enclosed by exclamation marks (!…!). A date must be !2015-12-31! ``` -A null date is specified by *!00-00-00!*. - -**Tip:** The Method Editor includes a shortcut for entering a null date. To type a null date, enter the exclamation (!) character and press Enter. - -**Notes:** - -- For compatibility reasons, 4D accepts two-digit years to be entered. A two-digit year is assumed to be in the 20th or 21st century based on whether it is greater or less than 30, unless this default setting has been changed using the ```SET DEFAULT CENTURY``` command. -- If you have checked the "Use regional system settings" option (see Methods Page), you must use the date format defined in your system. Generally, in a US environment, dates are entered in the form month/day/year, with a slash "/" separating the values. - -## Date operators - -| Operation | Syntax | Returns | Expression | Value | -| ------------------------ | -------------- | ------- | ---------------------------- | ------------ | -| Date difference | Date – Date | Number | !2017-01-20! - !2017-01-01! | 19 | -| Day addition | Date + Number | Date | !2017-01-20! + 9 | !2017-01-29! | -| Day subtraction | Date – Number | Date | !2017-01-20! - 9 | !2017-01-11! | -| Equality | Date = Date | Boolean | !2017-01-01! =!2017-01-01! | True | -| | | | !2017-01-20! = !2017-01-01! | False | -| Inequality | Date # Date | Boolean | !2017-01-20! # !2017-01-01! | True | -| | | | !2017-01-20! # !2017-01-20! | False | -| Greater than | Date > Date | Boolean | !2017-01-20! > !2017-01-01! | True | -| | | | !2017-01-20! > !2017-01-20! | False | -| Less than | Date < Date | Boolean | !2017-01-01! < !2017-01-20! | True | -| | | | !2017-01-20! < !2017-01-20! | False | -| Greater than or equal to | Date >= Date | Boolean | !2017-01-20! >=!2017-01-01! | True | -| | | | !2017-01-01!>=!2017-01-20! | False | -| Less than or equal to | Date \<= Date | Boolean | !2017-01-01!\<=!2017-01-20! | True | -| | | | !2017-01-20!\<=!2017-01-01! | False | \ No newline at end of file +Uma data nula é especificada por _!00-00-00!_. + +**Dica:** O editor de métodos inclui um acesso direto para introduzir uma data nula. Para escrever uma data nula, introduza o caractere de exclamação (!) e aperte Enter.. + +**Notas:** + +- Por razões de compatibilidade, 4D aceita que coloque anos como datas com apenas dois dígitos. Se pressupõe que um ano com apenas dois digitos esteja no século XX ou XXI, dependendo se for maior ou menor de 30, a menos que mude essa configuração com o comando `SET DEFAULT CENTURY`. +- Se marcou a opção "Utilizar a configuração regional del sistema" ( ver Página Métodos), deve utilizar o formato de data definido em seu sistema. Para sistemas dos Estados Unidos, datas são digitadas no formato mês/dia/ano, com uma barra "/" separando os valores. + +## Operadores de data + +| Operação | Sintaxe | Retorna | Expressão | Value | +| -------------------- | ------------- | -------- | ---------------------------- | ------------ | +| Diferença de data | Date - Date | Número | !2017-01-20! - !2017-01-01! | 19 | +| Acréscimo de dia | Data + Número | Date | !2017-01-20! !2017-01-20! | !2017-01-29! | +| Subtrair dia | Data - Número | Date | !2017-01-20! !2017-01-01! | !2017-01-11! | +| Igual | Date = Date | Booleano | !2017-01-20! = !2017-01-01! | True | +| | | | !2017-01-20! !2017-01-20! | False | +| Desigualdade | Date # Date | Booleano | !2017-01-20! !2017-01-01! | True | +| | | | !2017-01-20! !2017-01-20! | False | +| Maior que | Date > Date | Booleano | !2017-01-20! !2017-01-20! | True | +| | | | !2017-01-20! !2017-01-20! | False | +| Menor que | Date < Date | Booleano | !2017-01-20! !2017-01-20! | True | +| | | | !2017-01-20! !2017-01-20! | False | +| Maior ou igual a | Date >= Date | Booleano | !2017-01-20! !2017-01-20! | True | +| | | | !2017-01-01!>=!2017-01-20! | False | +| Menor que ou igual a | Date <= Date | Booleano | !2017-01-01!\<=!2017-01-20! | True | +| | | | !2017-01-20!\<=!2017-01-01! | False | diff --git a/website/translated_docs/pt/Concepts/dt_null_undefined.md b/website/translated_docs/pt/Concepts/dt_null_undefined.md index 3c499a1275db22..7bf7548e71cb4b 100644 --- a/website/translated_docs/pt/Concepts/dt_null_undefined.md +++ b/website/translated_docs/pt/Concepts/dt_null_undefined.md @@ -1,25 +1,25 @@ --- id: null-undefined -title: Null and Undefined +title: Null e indefinido --- ## Null -Null is a special data type with only one possible value: **null**. This value is returned by an expression that does not contain any value. +Null é um tipo de dados especial com um único valor possível: **null**. Este valor é devolvido por uma expressão que não contém nenhum valor. -In the 4D language and for object field attributes, null values are managed through the `Null` function. This function can be used with the following expressions for setting or comparing the null value: +Na linguagem 4D e para os atributos dos campos dos objetos, os valores nulos são gerenciados através da função `Null`. Esta função pode ser usada com as expressões abaixo para definir ou comparar o valor nulo: -- object attributes -- collection elements -- variables of the object, collection, pointer, picture, or variant type. +- atributos de objetos +- elementos da coleção +- variáveis do objecto, colecção, ponteiro, imagem, ou tipo de variante. -## Undefined +## Indefinido -Undefined is not actually a data type. It denotes a variable that has not yet been defined. A function (a project method that returns a result) can return an undefined value if, within the method, the function result ($0) is assigned an undefined expression (an expression calculated with at least one undefined variable). A field cannot be undefined (the `Undefined` command always returns False for a field). A variant variable has **undefined** as default value. +Indefinido não é realmente um tipo de dados. Denota uma variável que ainda não foi definida. Uma função (um método projeto que devolve um resultado) pode devolver um valor indefinido se, dentro do método, se atribuir ao resultado da função ($0) uma expressão indefinida (uma expressão calculada com ao menos uma variável indefinida). Um campo não pode ser indefinido (o comando `Undefined` sempre devolve False para um campo). Uma variável variant tem **indefinido** como valor por definição. -## Examples +## Exemplos -Here are the different results of the `Undefined` command as well as the `Null` command with object properties, depending on the context: +Aquí estão os diferentes resultados do comando `Undefined` assim como do comando `Null` com as propriedades dos objetos, dependendo do contexto: ```4d C_OBJECT($vEmp) @@ -35,4 +35,4 @@ $null:=($vEmp.children=Null) //True $undefined:=Undefined($vEmp.parent) // True $null:=($vEmp.parent=Null) //True -``` \ No newline at end of file +``` diff --git a/website/translated_docs/pt/Concepts/dt_number.md b/website/translated_docs/pt/Concepts/dt_number.md index 100a3982b80996..040687ff1cf833 100644 --- a/website/translated_docs/pt/Concepts/dt_number.md +++ b/website/translated_docs/pt/Concepts/dt_number.md @@ -3,21 +3,22 @@ id: number title: Number (Real, Longint, Integer) --- -Number is a generic term that stands for: +Número é um termo genérico que significa: -- Real field, variable or expression. The range for the Real data type is ±1.7e±308 (13 significant digits). -- Long Integer field, variable or expression. The range for the Long Integer data type (4-byte Integer) is -2^31..(2^31)-1. -- Integer field, array or expression. The range for the Integer data type (2-byte Integer) is -32,768..32,767 (2^15..(2^15)-1). +- Campo real, variável ou expressão. O intervalo para o tipo de dados Real é de ±1,7e±308 (13 dígitos significativos). +- Campo Inteiro Longo, variável ou expressão. O intervalo para o tipo de dados Long Integer (4-byte Integer) é -2^31...(2^31)-1. +- Campo inteiro, array ou expressão. O intervalo para o tipo de dados Integer (Inteiro 2 bytes) é -32.768...32.767(2^15...(2^25)-1). -**Note:** Integer field values are automatically converted in Long integers when used in the 4D Language. +**Nota:** Valores de campo inteiro são automaticamente convertidos em inteiros longos quando usados na linguagem 4D. -You can assign any Number data type to another; 4D does the conversion, truncating or rounding if necessary. However, when values are out of range, the conversion will not return a valid value. You can mix Number data types in expressions. +Pode atribuir qualquer tipo de dados Number a outro; 4D faz a conversão, truncagem ou arredondamento, se necessário. No entanto, quando os valores estiverem fora do intervalo, a conversão não retornará um valor válido. Pode misturar tipos de dados numéricos em expressões. -**Note:** In the 4D Language Reference manual, no matter the actual data type, the Real, Integer, and Long Integer parameters in command descriptions are denoted as number, except when marked otherwise. +**Nota:** No manual de Referência de Idioma 4D, não importa o tipo de dado real, a Real, Inteiro, e parâmetros longos de números inteiros nas descrições de comandos são indicados como número, exceto quando marcados de outra forma. -## Number literals -A numeric literal constant is written as a real number. Here are some examples of numeric constants: +## Números literais + +Uma constante literal numérica é escrita como um número real. Aqui estão alguns exemplos de constantes numéricas: ```4d 27 @@ -25,9 +26,9 @@ A numeric literal constant is written as a real number. Here are some examples o 0.0076 ``` -> The default decimal separator is a period (.), regardless of the system language. If you have checked the "Use regional system settings" option in the Methods Page of the Preferences, you must use the separator defined in your system. +> O separador decimal padrão é um ponto (.), independente do idioma do sistema. Se você marcou a opção "Usar configurações regionais do sistema" na Página de Métodos das Preferências, você deve usar o separador definido no seu sistema. -Negative numbers are specified with the minus sign (-). For example: +Números negativos são especificados com o sinal de menos (-). Por exemplo: ```4d -27 @@ -35,151 +36,113 @@ Negative numbers are specified with the minus sign (-). For example: -0.0076 ``` -## Number operators +## Operadores de números + +| Operação | Sintaxe | Retorna | Expressão | Value | +| -------------------- | ---------------- | -------- | --------- | ----- | +| Addition | Número + Número | Número | 2 + 3 | 5 | +| Subtração | Número - Número | Número | 3 – 2 | 1 | +| Multiplicação | Número * Número | Número | 5 * 2 | 10 | +| Division | Número / Número | Número | 5 / 2 | 2.5 | +| Divisão inteira | Número \ Número | Número | 5 \ 2 | 2 | +| Módulo | Número % Número | Número | 5 % 2 | 1 | +| Exponenciação | Número ^ Número | Número | 2 ^ 3 | 8 | +| Igual | Número = Número | Booleano | 10 = 10 | True | +| | | | 10 = 11 | False | +| Desigualdade | Número # Número | Booleano | 10 #11 | True | +| | | | 10 # 10 | False | +| Maior que | Number >= Number | Booleano | 11 > 10 | True | +| | | | 10 > 11 | False | +| Menor que | Number <= Number | Booleano | 10 < 11 | True | +| | | | 11 < 10 | False | +| Maior ou igual a | Number >= Number | Booleano | 11 >= 10 | True | +| | | | 10 >= 11 | False | +| Menor que ou igual a | Number <= Number | Booleano | 10 <= 11 | True | +| | | | 11 <= 10 | False | + +O operador do módulo % divide o primeiro número pelo segundo número e devolve um número inteiro restante. Aqui estão alguns exemplos: + +- 10 % 2 retorna 0 porque 10 é dividido uniformemente por 2. +- 10 % 3 devolve 1 porque o resto é 1. +- 10,5% 2 devolve 0 porque o resto não é um número inteiro. + +**AVISO:** +- O operador do módulo % devolve valores significativos com números que se encontram na gama do Long Integer (de menos 2^31 a 2^31 menos um). Para calcular o modulo com números fora deste intervalo, utilizar o comando `Mod` . +- O operador da divisão de longint retorna valores significativos apenas com números inteiros. + +### Precedência + +A ordem pela qual uma expressão é avaliada é chamada precedência. 4D tem uma estrita precedência da esquerda para a direita, na qual a ordem algébrica não é observada. Por exemplo: -| Operation | Syntax | Returns | Expression | Value | -| ------------------------ | ---------------- | ------- | ---------- | ----- | -| Addition | Number + Number | Number | 2 + 3 | 5 | -| Subtraction | Number - Number | Number | 3 – 2 | 1 | -| Multiplication | Number * Number | Number | 5 * 2 | 10 | -| Division | Number / Number | Number | 5 / 2 | 2.5 | -| Longint division | Number \ Number | Number | 5 \ 2 | 2 | -| Modulo | Number % Number | Number | 5 % 2 | 1 | -| Exponentiation | Number ^ Number | Number | 2 ^ 3 | 8 | -| Equality | Number = Number | Boolean | 10 = 10 | True | -| | | | 10 = 11 | False | -| Inequality | Number # Number | Boolean | 10 #11 | True | -| | | | 10 # 10 | False | -| Greater than | Number > Number | Boolean | 11 > 10 | True | -| | | | 10 > 11 | False | -| Less than | Number < Number | Boolean | 10 < 11 | True | -| | | | 11 < 10 | False | -| Greater than or equal to | Number >= Number | Boolean | 11 >= 10 | True | -| | | | 10 >= 11 | False | -| Less than or equal to | Number <= Number | Boolean | 10 <= 11 | True | -| | | | 11 <= 10 | False | +```4d + 3+4*5 +``` +retorna 35, porque a expressão é avaliada como 3 + 4, produzindo 7, que é depois multiplicada por 5, com o resultado final de 35. -The modulo operator % divides the first number by the second number and returns a whole number remainder. Here are some examples: +Para anular a precedência da esquerda para a direita, DEVE usar parênteses. Por exemplo: -- 10 % 2 returns 0 because 10 is evenly divided by 2. -- 10 % 3 returns 1 because the remainder is 1. -- 10.5 % 2 returns 0 because the remainder is not a whole number. +```4d + 3+(4*5) +``` -**WARNING:** +retorna 23 porque a expressão (4 * 5) é avaliada em primeiro lugar, por causa dos parênteses. O resultado é 20, que é depois adicionado a 3 para o resultado final de 23. -- The modulo operator % returns significant values with numbers that are in the Long Integer range (from minus 2^31 to 2^31 minus one). To calculate the modulo with numbers outside of this range, use the `Mod` command. -- The longint division operator \ returns significant values with integer numbers only. +Os parênteses podem ser aninhados dentro de outros conjuntos de parênteses. Certifique-se de que cada parêntese esquerdo tem um parêntese direito correspondente para assegurar uma avaliação adequada das expressões. A falta ou utilização incorrecta de parênteses pode causar resultados inesperados ou expressões inválidas. Além disso, se pretende compilar as suas candidaturas, deve ter parênteses correspondentes - o compilador detecta um parêntese em falta como um erro de sintaxe. -### Precedence -The order in which an expression is evaluated is called precedence. 4D has a strict left-to-right precedence, in which algebraic order is not observed. For example: +## Operadores Bitwise -```4d - 3+4*5 -``` +Os operadores bitwise operam em **Long Integer** expressões ou valores. -returns 35, because the expression is evaluated as 3 + 4, yielding 7, which is then multiplied by 5, with the final result of 35. +> Se passar um valor Inteiro ou Real a um operador bitwise, 4D avalia o valor como um valor Long Integer antes de calcular a expressão que utiliza o operador bitwise. -To override the left-to-right precedence, you MUST use parentheses. For example: +Ao utilizar os operadores bitwise, deve pensar num valor Long Integer como um array de 32 bits. Os bits são numerados de 0 a 31, da direita para a esquerda. -```4d - 3+(4*5) -``` +Já que cada bit pode ser igual a 0 ou 1, também se pode pensar num valor Long Integer como um valor onde se pode armazenar 32 valores booleanos. Um bit igual a 1 significa **True** e um bit igual a 0 significa **False**. + +Uma expressão que utilizar um operador Bitwise retorna um valor Long Integer, exceto para o operador Bit Test, onde a expressão retorna um valor Booleano. A tabela a seguir lista os operadores bitwise e sua sintaxe: + +| Operação | Operator | Sintaxe | Retorna | +| ---------------------- | --------- | ---------------------- | -------------------- | +| Bitwise AND | & | Long & Long | Long | +| Bitwise OR (inclusive) | | | Long | Long | Long | +| Bitwise OR (exclusivo) | \^| | Long \^| E. long | Long | +| Left Bit Shift | << | Long << Long | Long (ver nota 1) | +| Right Bit Shift | >> | Long >> Long | Long (ver nota 1) | +| Bit Set | ?+ | Long ?+ Long | Long (ver nota 2) | +| Bit Clear | ?- | Long ?- Long | Long (ver nota 2) | +| Bit Test | ?? | Long ?? Long | Boolean (ver nota 2) | + +#### Notas + +1. Para as operações `Left Bit Shift` e `Right Bit Shift` , o segundo operador indica o número de posições pelas quais os bits do primeiro operador serão deslocados no valor resultante. Portanto, este segundo operador deve estar entre 0 e 31. Note-se, no entanto, que o deslocamento por 0 retorna um valor inalterado e o deslocamento por mais de 31 bits retorna 0x00000000 porque todos os bits são perdidos. Se passar outro valor como segundo operando, o resultado não é significativo. +2. Para o conjunto de bits ``, `Bit Clear` e `Bit Test` operações , o segundo operando indica o número do bit sobre o qual se deve agir. Portanto, este segundo operador deve situar-se entre 0 e 31; caso contrário, o resultado da expressão não é significativo. + + + +O quadro seguinte lista os operadores bitwise e os seus efeitos: + +| Operação | Descrição | +| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Bitwise AND | Cada bit resultante é o E lógico dos bits nos dois operandos.

    Aqui está a tabela lógica AND:

  • 1 & 1 --> 1
  • 0 & 1 --> 0
  • 1 & 0 --> 0
  • 0 & 0 --> 0

    Por outras palavras, o bit resultante é 1 se os dois bits do operando forem 1; caso contrário, o bit resultante é 0. | +| Bitwise OR (inclusive) | Cada bit resultante é o OU lógico dos bits nos dois operandos.

    Aqui está a tabela lógica OR:

  • 1 | 1 --> 1
  • 0 | 1 --> 1
  • 1 | 0 --> 1
  • 0 | 0 --> 0

    Por outras palavras, o bit resultante é 1 se pelo menos um dos dois cobres for 1; caso contrário, o bit resultante é 0. | +| Bitwise OR (exclusivo) | Cada bit resultante é o XOR lógico dos bits nos dois operandos.

    Aqui está a tabela lógica XOR:

  • 1 \^| 1 --> 0
  • 0 \^| 1 --> 1
  • 1 \^| 0 --> 1
  • 0 \^| 0 --> 0

    Em outras palavras, o bit resultante é 1 se apenas um dos dois operandos for 1; caso contrário, o bit resultante é 0. | +| Left Bit Shift | O valor resultante é definido para o primeiro operando, depois os bits resultantes são deslocados para a esquerda pelo número de posições indicado pelo segundo operando. Os bits à esquerda são perdidos e os novos bits à direita são estabelecidos como 0.

    **Nota:** Levar em consideração apenas valores positivos e deslocar para a esquerda por N bits é o mesmo que multiplicar por 2^N. | +| Right Bit Shift | O valor resultante é definido para o primeiro operando, depois os bits resultantes são deslocados para a esquerda pelo número de posições indicado pelo segundo operando. Os bits à direita são perdidos e os novos bits à esquerda são estabelecidos como 0.

    **Nota:** Levar em consideração apenas valores positivos e deslocar para a direita por N bits é o mesmo que dividir por 2^N. | +| Bit Set | O valor resultante é definido para o primeiro operando, depois o bit resultante, cujo número é indicado pelo segundo operando, é definido para 1. As outras partes são deixadas inalteradas. | +| Bit Clear | O valor resultante é definido para o primeiro operando, depois o bit resultante, cujo número é indicado pelo segundo operando, é definido para 0. As outras partes são deixadas inalteradas. | +| Bit Test | Retorna Verdadeiro se, no primeiro operando, o bit cujo número é indicado pelo segundo operando for igual a 1. Retorna Falso se, no primeiro operando, o bit cujo número é indicado pelo segundo operando for igual a 0. | + +### Exemplos -returns 23 because the expression (4 * 5) is evaluated first, because of the parentheses. The result is 20, which is then added to 3 for the final result of 23. - -Parentheses can be nested inside other sets of parentheses. Be sure that each left parenthesis has a matching right parenthesis to ensure proper evaluation of expressions. Lack of, or incorrect use of parentheses can cause unexpected results or invalid expressions. Furthermore, if you intend to compile your applications, you must have matching parentheses—the compiler detects a missing parenthesis as a syntax error. - -## Bitwise operators - -The bitwise operators operates on **Long Integer** expressions or values. - -> If you pass an Integer or a Real value to a bitwise operator, 4D evaluates the value as a Long Integer value before calculating the expression that uses the bitwise operator. - -While using the bitwise operators, you must think about a Long Integer value as an array of 32 bits. The bits are numbered from 0 to 31, from right to left. - -Because each bit can equal 0 or 1, you can also think about a Long Integer value as a value where you can store 32 Boolean values. A bit equal to 1 means **True** and a bit equal to 0 means **False**. - -An expression that uses a bitwise operator returns a Long Integer value, except for the Bit Test operator, where the expression returns a Boolean value. The following table lists the bitwise operators and their syntax: - -| Operation | Operator | Syntax | Returns | -| ---------------------- | --------- | ------------------- | -------------------- | -| Bitwise AND | & | Long & Long | Long | -| Bitwise OR (inclusive) | | | Long | Long | Long | -| Bitwise OR (exclusive) | \^| | Long \^| Long | Long | -| Left Bit Shift | << | Long << Long | Long (see note 1) | -| Right Bit Shift | >> | Long >> Long | Long (see note 1) | -| Bit Set | ?+ | Long ?+ Long | Long (see note 2) | -| Bit Clear | ?- | Long ?- Long | Long (see note 2) | -| Bit Test | ?? | Long ?? Long | Boolean (see note 2) | - - -#### Notes - -1. For the `Left Bit Shift` and `Right Bit Shift` operations, the second operand indicates the number of positions by which the bits of the first operand will be shifted in the resulting value. Therefore, this second operand should be between 0 and 31. Note however, that shifting by 0 returns an unchanged value and shifting by more than 31 bits returns 0x00000000 because all the bits are lost. If you pass another value as second operand, the result is non-significant. -2. For the `Bit Set`, `Bit Clear` and `Bit Test` operations , the second operand indicates the number of the bit on which to act. Therefore, this second operand must be between 0 and 31; otherwise, the result of the expression is non-significant. - -The following table lists the bitwise operators and their effects: - -| Operation | Description | -| ----------- | ---------------------------------------------------------------------- | -| Bitwise AND | Each resulting bit is the logical AND of the bits in the two operands. | - - -< - -p>Here is the logical AND table: - -- 1 & 1 --> 1 - - 0 & 1 --> 0 - - 1 & 0 --> 0 - - 0 & 0 --> 0

    - < - - p>In other words, the resulting bit is 1 if the two operand bits are 1; otherwise the resulting bit is 0.| |Bitwise OR (inclusive)|Each resulting bit is the logical OR of the bits in the two operands. - - < - - p>Here is the logical OR table: - - - 1 | 1 --> 1 - - 0 | 1 --> 1 - - 1 | 0 --> 1 - - 0 | 0 --> 0

    - < - - p>In other words, the resulting bit is 1 if at least one of the two operand bits is 1; otherwise the resulting bit is 0.| |Bitwise OR (exclusive)|Each resulting bit is the logical XOR of the bits in the two operands. - - < - - p>Here is the logical XOR table: - - - 1 \^| 1 --> 0 - - 0 \^| 1 --> 1 - - 1 \^| 0 --> 1 - - 0 \^| 0 --> 0

    - < - - p>In other words, the resulting bit is 1 if only one of the two operand bits is 1; otherwise the resulting bit is 0.| |Left Bit Shift|The resulting value is set to the first operand value, then the resulting bits are shifted to the left by the number of positions indicated by the second operand. The bits on the left are lost and the new bits on the right are set to 0. - - < - - p>**Note:** Taking into account only positive values, shifting to the left by N bits is the same as multiplying by 2^N.| |Right Bit Shift|The resulting value is set to the first operand value, then the resulting bits are shifted to the right by the number of position indicated by the second operand. The bits on the right are lost and the new bits on the left are set to 0. - - < - - p>**Note:** Taking into account only positive values, shifting to the right by N bits is the same as dividing by 2^N.| |Bit Set|The resulting value is set to the first operand value, then the resulting bit, whose number is indicated by the second operand, is set to 1. The other bits are left unchanged.| |Bit Clear|The resulting value is set to the first operand value, then the resulting bit, whose number is indicated by the second operand, is set to 0. The other bits are left unchanged.| |Bit Test|Returns True if, in the first operand, the bit whose number is indicated by the second operand is equal to 1. Returns False if, in the first operand, the bit whose number is indicated by the second operand is equal to 0.| - - ### Examples - - | Operation | Example | Result | - | ---------------------- | ------------------------------------------ | ---------- | - | Bitwise AND | 0x0000FFFF & 0xFF00FF00 | 0x0000FF00 | - | Bitwise OR (inclusive) | 0x0000FFFF | 0xFF00FF00 | 0xFF00FFFF | - | Bitwise OR (exclusive) | 0x0000FFFF \^| 0xFF00FF00 0xFF0000FF | | - | Left Bit Shift | 0x0000FFFF << 8 | 0x00FFFF00 | - | Right Bit Shift | 0x0000FFFF >> 8 | 0x000000FF | - | Bit Set | 0x00000000 ?+ 16 | 0x00010000 | - | Bit Clear | 0x00010000 ?- 16 | 0x00000000 | - | Bit Test | 0x00010000 ?? 16 | True | \ No newline at end of file +| Operação | Exemplo | Resultado | +| ---------------------- | ------------------------------- | ---------- | +| Bitwise AND | 0x0000FFFF & 0xFF00FF00 | 0x0000FF00 | +| Bitwise OR (inclusive) | 0x0000FFFF | 0xFF00FF00 | 0xFF00FFFF | +| Bitwise OR (exclusivo) | 0x0000FFFF \^| 0xFF00FF00 | 0xFF0000FF | +| Left Bit Shift | 0x0000FFFF << 8 | 0x00FFFF00 | +| Right Bit Shift | 0x0000FFFF >> 8 | 0x000000FF | +| Bit Set | 0x00000000 ?+ 16 | 0x00010000 | +| Bit Clear | 0x00010000 ?- 16 | 0x00000000 | +| Bit Test | 0x00010000 ?? 16 | True | diff --git a/website/translated_docs/pt/Concepts/dt_object.md b/website/translated_docs/pt/Concepts/dt_object.md index 998cdfb08f6d90..c466735487aa3e 100644 --- a/website/translated_docs/pt/Concepts/dt_object.md +++ b/website/translated_docs/pt/Concepts/dt_object.md @@ -1,74 +1,71 @@ --- id: object -title: Objects +title: Objetos --- -Variables, fields or expressions of the Object type can contain various types of data. The structure of "native" 4D objects is based on the classic principle of "property/value" pairs. The syntax of these objects is based on JSON notation: +Variáveis, campos ou expressões do tipo Objecto podem conter vários tipos de dados. A estrutura dos objectos 4D "nativos" baseia-se no princípio clássico dos pares "propriedade/valor". A sintaxe desses objetos é baseada na notação JSON: -- A property name is always a text, for example "Name". +- Um nome de uma propriedade é sempre um texto, por exemplo "nome". -- A property value can be of the following type: - +- Um valor de propriedade pode ser do seguinte tipo: - number (Real, Integer, etc.) - - text + - texto - null - - Boolean - - pointer (stored as such, evaluated using the `JSON Stringify` command or when copying), - - date (date type or ISO date format string) - - object (objects can be nested on several levels) - - picture(*) - - collection + - Booleano + - ponteiro (armazenado como tal, avaliado usando o comando `JSON Stringify` ou quando copiando), + - data (tipo de data ou cadeia de formato de data ISO) + - objeto (os objetos podem estar aninhados em vários níveis) + - imagem (*) + - coleção -(*)When exposed as text in the debugger or exported to JSON, picture object properties print "[object Picture]". +(*)Quando se expõe como texto no depurador ou se exporta a JSON, as propriedades dos objetos imagem imprimem "[objeto Imagem]". -**Warning:** Keep in mind that attribute names differentiate between upper and lower case. +**Atenção:** lembre que os nomes de atributos diferenciam entre maiúsculas e minúsculas. -You manage Object type variables, fields or expressions using the commands available in the **Objects (Language)** theme or through the object notation (see [Syntax basics](Concepts/dt_object.md#syntax-basics)). Note that specific commands of the Queries theme such as `QUERY BY ATTRIBUTE`, `QUERY SELECTION BY ATTRIBUTE`, or `ORDER BY ATTRIBUTE` can be used to carry out processing on object fields. +As variáveis, campos ou expressõees de tipo objeto são gerenciadas mediante os comandos disponíveis no tema **Objetos (Linguagem)** ou através da notação de objetos (ver [Básicos de sintaxe](Concepts/dt_object.md#syntax-basics)). Note que podem ser usados comandos específicos do tema Pesquisas, como `QUERY BY ATTRIBUTE`, `QUERY SELECTION BY ATTRIBUTE`, ou `ORDER BY ATTRIBUTE` para realizar o processamento dos campos objetos. -Each property value accessed through the object notation is considered an expression. When the object notation is enabled in your database (see below), you can use such values wherever 4D expressions are expected: +Cada valor de propriedade acessado através da notação de objeto é considerado uma expressão. Quando a notação de objeto for ativada em seu banco de dados (ver abaixo), pode usar esses valores sempre que expressões 4D forem esperadas: -- in 4D code, either written in the methods (Method editor) or externalized (formulas, 4D tags files processed by PROCESS 4D TAGS or the Web Server, export files, 4D Write Pro documents...), -- in the Expression areas of the Debugger and the Runtime explorer, -- in the Property list of the Form editor for form objects: Variable or Expression field as well as various selection list box and columns expressions (Data Source, background color, style, or font color). +- Em código 4D, seja escrito nos métodos (editor de método) ou externalizado, fórmulas, arquivos de etiquetas 4D processados por PROCESS 4D TAGS ou o Web Server, arquivos exportar, documentos 4D Write Pro...), +- nas áreas de expressão do depurador e do explorador de Runtime, +- na lista de propriedades do editor de formulários para objectos de formulários: Variável ou Campo de expressão, bem como várias caixas de selecção e expressões de colunas (Fonte de dados, cor de fundo, estilo, ou cor da fonte). -## Initialization +## Inicialização -Objects must have been initialized, for example using the `New object` command, otherwise trying to read or modify their properties will generate a syntax error. - -Example: +Os objetos devem ter sido inicializados, por exemplo utilizando o comando `New object`, do contrário ao tentar ler ou modificar suas propriedades se gerará um error de sintaxe. +Exemplo: ```4d - C_OBJECT($obVar) //creation of an object type 4D variable - $obVar:=New object //initialization of the object and assignment to the 4D variable + C_OBJECT($obVar) //criação de um objeto de tipo 4D variável + $obVar:=Novo objeto //initialization do objeto e atribuição à variável 4D ``` -### Regular or shared object +### Objeto regular ou compartilhado -You can create two types of objects: +Pode criar dois tipos de objetos: -- regular (non-shared) objects, using the `New object` command. These objects can be edited without any specific access control but cannot be shared between processes. -- shared objects, using the `New shared object` command. These objects can be shared between processes, including preemptive threads. Access to these objects is controlled by `Use...End use` structures. For more information, refer to the [Shared objects and collections](Concepts/shared.md) section. +- objetos regulares (não compartilhados), usando o comando `Novo objeto`. Estes objetos podem ser editados sem qualquer controle de acesso específico, mas não podem ser compartilhados entre processos. +- objectos partilhados, utilizando o comando `New shared object` . Estes objetos podem ser compartidos entre processos, incluidos os threads preemptivos. Access to these objects is controlled by `Use... End use` structures. Para saber mais, consulte a seção [Objetos e coleções compartidos](Concepts/shared.md). -## Syntax basics -Object notation can be used to access object property values through a chain of tokens. +## Noções básicas de sintaxe -### Object properties +A notação de objetos pode ser utilizada para acessar aos valores das propriedades de objetos através de uma string de tokens. -With object notation, object properties can be accessed in two ways: +### Propriedades dos objectos -- using a "dot" symbol: > object.propertyName +Com a notação de objetos, pode acessar às propriedades dos objetos de duas maneiras: -Example: +- using a "dot" symbol: > object.propertyName +Exemplo: ```4d employee.name:="Smith" ``` - using a string within square brackets: > object["propertyName"] -Examples: - +Exemplos: ```4d $vName:=employee["name"] //or also: @@ -77,31 +74,28 @@ Examples: ``` -Since an object property value can be an object or a collection, object notation accepts a sequence of symbols to access sub-properties, for example: - +Uma vez que um valor de propriedade de objeto pode ser um objeto ou uma coleção, a notação de objeto aceita uma sequência de símbolos para acessar subpropriedades, por exemplo: ```4d $vAge:=employee.children[2].age ``` +A notação de objetos está disponível em qualquer elemento da lenguagem que possa conter ou devolver um objeto, ou seja: -Object notation is available on any language element that can contains or returns an object, i.e: - -- **Objects** themselves (stored in variables, fields, object properties, object arrays, or collection elements). Examples: +- com os **Objetos** mesmos (armazenados em variáveis, campos, propriedades de objetos, arrays de objetos ou elementos de coleções). Exemplos: ```4d - $age:=$myObjVar.employee.age //variable - $addr:=[Emp]data_obj.address //field - $city:=$addr.city //property of an object - $pop:=$aObjCountries{2}.population //object array - $val:=$myCollection[3].subvalue //collection element + $age:=$myObjVar.employee.age //variável + $addr:=[Emp]data_obj.address //campo + $city:=$addr.city //propriedade de um objeto + $pop:=$aObjCountries{2}.population //array objeto + $val:=$myCollection[3].subvalue //elemento coleção ``` - -- **4D commands** that return objects. Example: +- **Comandos 4D** que devolvem objectos. Exemplo: ```4d $measures:=Get database measures.DB.tables ``` -- **Project methods** that return objects. Example: +- **Métodos de Projeto** que retornam objetos. Exemplo: ```4d // MyMethod1 @@ -115,24 +109,21 @@ Object notation is available on any language element that can contains or return - **Collections** Example: ```4d - myColl.length //size of the collection + myColl.length //tamanho da coleção ``` -### Pointers - -**Preliminary Note:** Since objects are always passed by reference, there is usually no need to use pointers. While just passing the object, internally 4D automatically uses a mechanism similar to a pointer, minimizing memory need and allowing you to modify the parameter and to return modifications. As a result, you should not need to use pointers. However, in case you want to use pointers, property values can be accessed through pointers. +### Ponteiro +**Nota preliminar:** dado que os objetos são passados sempre por referência, geralmente não é preciso usar ponteiros. Ao passar o objeto, internamente 4D utiliza automaticamente um mecanismo similar a um ponteiro, minimizando a necessidade de memória e permitindo modificar o parâmetro e devolver as modificações. Como resultado, não é necessário usar ponteiros. Mas se quiser usar ponteiros, valores de propriedade podem ser acessados com ponteiros. -Using object notation with pointers is very similar to using object notation directly with objects, except that the "dot" symbol must be omitted. +Usar notação de objeto com ponteiros é parecido com usar notação de objeto diretamente com os objetos, exceto que o símbolo "ponto" deve ser omitido. -- Direct access: - - > pointerOnObject->propertyName +- Acesso direto +> pointerOnObject->propertyName -- Access by name: - - > pointerOnObject->["propertyName"] +- Acesso pelo nome: +> pointerOnObject->["propertyName"] -Example: +Exemplo: ```4d C_OBJECT(vObj) @@ -143,50 +134,50 @@ Example: x:=vPtr->a //x=10 ``` -### Null value +### Valor Null -When using the object notation, the **null** value is supported though the **Null** command. This command can be used to assign or compare the null value to object properties or collection elements, for example: +Quando se usar a notação de objeto, o valore **null** se torna compatível com o comando **Null** . Este comando pode ser usado para atribuir ou comparar o valor nulo com as propriedades de objeto ou elementos de coleção, por exemplo ```4d myObject.address.zip:=Null If(myColl[2]=Null) ``` -For more information, please refer to the `Null` command description. +Para saber mais, veja a descrição do comando `Null` -### Undefined value +### Valor não definido -Evaluating an object property can sometimes produce an undefined value. Typically when trying to read or assign undefined expressions, 4D will generate errors. This does not happen in the following cases: +A avaliação de uma propriedade de um objeto pode produzir às vezes um valor indefinido. Normalmente ao tentar ler ou atribuir expressões indefinidas, 4D gera erros. Isso não acontece nos casos abaixo: -- Reading a property of an undefined object or value returns undefined; assigning an undefined value to variables (except arrays) has the same effect as calling with them: +- Ler uma propriedade de um objeto indefinido ou valores indefinidos devolve um indefinido; a atribuição de um valor indefinido a variáveis (exceto arrays) tem o mesmo efeito que chamar com elas: ```4d C_OBJECT($o) C_LONGINT($val) $val:=10 //$val=10 - $val:=$o.a //$o.a is undefined (no error), and assigning this value clears the variable + $val:=$o. //$o.a é indefinido (sem erro), e atribuir este valor limpa a variável //$val=0 ``` -- Reading the **length** property of an undefined collection produces 0: +- Lendo a propriedade de **comprimento** de uma coleção indefinida produz 0: ```4d - C_COLLECTION($c) //variable created but no collection is defined + C_COLLECTION($c) //variable criada, mas nenhuma coleção é definida $size:=$c.length //$size = 0 ``` -- An undefined value passed as parameter to a project method is automatically converted to 0 or "" according to the declared parameter type. +- Um valor indefinido passado como parâmetro para um método de projecto é automaticamente convertido em 0 ou "" de acordo com o tipo de parâmetro declarado. ```4d C_OBJECT($o) - mymethod($o.a) //pass an undefined parameter + meumétodo($o. ) //passa um parâmetro indefinido - //In mymethod method - C_TEXT($1) //parameter type is text - // $1 contains "" + //In mymethod + C_TEXT($1) //parameter type é texto + // $1 contém "" ``` -- A condition expression is automatically converted to false when evaluating to undefined with the If and Case of keywords: +- Uma expressão de condição é automaticamente convertida em falsa quando se avalia para indefinida com as palavras-chave If e Case: ```4d C_OBJECT($o) @@ -197,15 +188,15 @@ Evaluating an object property can sometimes produce an undefined value. Typicall End case ``` -- Assigning an undefined value to an existing object property reinitializes or clears its value, depending on its type: - - Object, collection, pointer: Null - - Picture: Empty picture - - Boolean: False +- A atribuição de um valor indefinido a um objecto existente reinicia ou limpa o seu valor, dependendo do seu tipo: + - Objecto, colecção, ponteiro: Null + - Imagem: Imagem vazia + - Booleano: Falso - String: "" - - Number: 0 - - Date: !00-00-00! if "Use date type instead of ISO date format in objects" setting is enabled, otherwise "" - - Time: 0 (number of ms) - - Undefined, Null: no change + - Número: 0 + - Data: !00-00-00-00! se a configuração "Usar tipo de data em vez de formato de data ISO nos objetos" estiver habilitada, caso contrário "" + - Hora: 0 (número de ms) + - Indefinido, Null: sem mudança ```4d C_OBJECT($o) @@ -213,33 +204,33 @@ Evaluating an object property can sometimes produce an undefined value. Typicall $o.a:=$o.b //$o.a=0 ``` -- Assigning an undefined value to a non existing object property does nothing. +- Atribuir um valor indefinido a uma propriedade objecto não existente não faz nada. -When expressions of a given type are expected in your 4D code, you can make sure they have the correct type even when evaluated to undefined by surrounding them with the appropriate 4D cast command: `String`, `Num`, `Date`, `Time`, `Bool`. These commands return an empty value of the specified type when the expression evaluates to undefined. For example: +Quando expressões de um certo tipo são esperadas em seu código 4D, pode garantir que tenha o tipo correto mesmo quando são avaliadas como indefinidas, cercando-as com o comando de transformação 4D apropriado: `String`, `Num`, `Date`, `Time`, `Bool`. Estes comandos devolvem um valor vazio de tipo especificado quando a expressão é avaliada como indefinida. Por exemplo: ```4d - $myString:=Lowercase(String($o.a.b)) //make sure you get a string value even if undefined - //to avoid errors in the code + $myString:=Caixa minúscula(String($o.a.b))) // certifique-se de obter um valor de string mesmo que não esteja definido + // para evitar erros no código ``` -## Object property identifiers +## Identificadores de propriedades de objetos -Token member names (i.e., object property names accessed using the object notation) are more restrictive than standard 4D object names. They must comply with JavaScript Identifier Grammar (see ECMA Script standard): +As regras de nomes dos tokens (ou seja, os nomes das propriedades dos objetos aos que se acessa usando a notação de objeto) são mais restritivos que os nomes dos objetos padrão 4D. Devem cumprir com a gramática dos identificadores JavaScript ( ver [Padrão ECMA Script](https://www.ecma-international.org/ecma-262/5.1/#sec-7.6)): -- the first character must be a letter, an underscore (_), or a dollar sign ($), -- subsequent characters may be any letter, digit, an underscore or dollar sign (space characters are NOT allowed), -- they are case sensitive. +- o primeiro caractere deve ser uma letra, um sublinhado (_) ou um sinal de dólar ($), +- Os caracteres seguintes podem ser qualquer letra, dígito, um sinal de subscrito ou um sinal de dólar (caracteres espaço NÂO são permitidos), +- são sensíveis às maiúsculas e minúsculas. -**Note:** +**Nota:** -- Using a table field as a collection index, for example a.b[[Table1]Id], is not allowed. You must use an intermediary variable. -- Creating object attributes using a string in square brackets allows you to override the ECMA Script rules. For example, the $o["My Att"] attribute is valid in 4D, despite the space. In this case, however, it will not be possible to use dot notation with this attribute. +- Usar um campo como índice de coleção, por exemplo a.b[[Table1]Id], não está permitida. Deve usar uma variável intermediária +- A criação de atributos de objetos mediante uma string entre colchetes permite anular as regras de ECMA Script. Por exemplo, o atributo $o["My Att"] é válido em 4D, apesar do espaço. Nesse caso, entretanto, não é possível usar a notação de pontos com esse atributo. -## Examples -Using object notation simplifies the 4D code while handling objects. Note however that the command-based notation is still fully supported. +## Exemplos +Usar notação de objeto simplifica o código 4D no manejo dos mesmos. Entretanto note que a notação baseada em comandos continua sendo totalmente compatível. -- Writing and reading objects (this example compares object notation and command notation): +- Escrita e leitura das propriedades de objetos (este exemplo compara a notação de objetos e anotação de comandos): ```4d // Using the object notation @@ -259,7 +250,7 @@ Using object notation simplifies the 4D code while handling objects. Note howeve $age:=$myObj3.age //10 ``` -- Create a property and assign values, including objects: +- Criar uma propriedade e atribuir valores, incluindo objetos: ```4d C_OBJECT($Emp) @@ -270,14 +261,13 @@ Using object notation simplifies the 4D code while handling objects. Note howeve //creates the phone property and sets its value to an object ``` -- Get a value in a sub-object is very simple using the object notation: +- Obter um valor em um subobjeto é bem simples usando a notação de objeto: ```4d $vCity:=$Emp.city //"Paris" $vPhone:=$Emp.phone.home //"0011223344" ``` - -- You can access properties as strings using the [ ] operator +- É possível acessar as propriedades como strings usando o operador [] ```4d $Emp["city"]:="Berlin" //modifies the city property @@ -288,4 +278,4 @@ Using object notation simplifies the 4D code while handling objects. Note howeve $Emp[$addr+String($i)]:="" End for // creates 4 empty properties "address1...address4" in the $Emp object -``` \ No newline at end of file +``` diff --git a/website/translated_docs/pt/Concepts/dt_picture.md b/website/translated_docs/pt/Concepts/dt_picture.md index ecb8d4d42162e7..813f8c133162fa 100644 --- a/website/translated_docs/pt/Concepts/dt_picture.md +++ b/website/translated_docs/pt/Concepts/dt_picture.md @@ -1,14 +1,14 @@ --- -id: picture -title: Picture +id: imagem +title: Imagem --- A Picture field, variable or expression can be any Windows or Macintosh picture. In general, this includes any picture that can be put on the pasteboard or read from the disk using 4D commands such as `READ PICTURE FILE`. 4D uses native APIs to encode (write) and decode (read) picture fields and variables under both Windows and macOS. These implementations provide access to numerous native formats, including the RAW format, currently used by digital cameras. -* on Windows, 4D uses WIC (Windows Imaging Component). -* on macOS, 4D uses ImageIO. +* on Windows, 4D uses WIC (Windows Imaging Component). +* on macOS, 4D uses ImageIO. WIC and ImageIO permit the use of metadata in pictures. Two commands, `SET PICTURE METADATA` and `GET PICTURE METADATA`, let you benefit from metadata in your developments. @@ -16,80 +16,72 @@ WIC and ImageIO permit the use of metadata in pictures. Two commands, `SET PICTU 4D supports natively a wide set of [picture formats](FormEditor/pictures.md#native-formats-supported), such as .jpeg, .png, or .svg. -Picture formats recognized by 4D are returned by the `PICTURE CODEC LIST` command as picture Codec IDs. They can be returned in the following forms: +Picture formats recognized by 4D are returned by the `PICTURE CODEC LIST` command as picture Codec IDs. They can be returned in the following forms: -* As an extension (for example “.gif”) -* As a MIME type (for example “image/jpeg”) +* As an extension (for example “.gif”) +* As a MIME type (for example “image/jpeg”) The form returned for each format will depend on the way the Codec is recorded at the operating system level. Note that the list of available codecs for reading and writing can be different since encoding codecs may require specific licenses. Most of the [4D picture management commands](https://doc.4d.com/4Dv18/4D/18/Pictures.201-4504337.en.html) can receive a Codec ID as a parameter. It is therefore imperative to use the system ID returned by the `PICTURE CODEC LIST` command. Picture formats recognized by 4D are returned by the `PICTURE CODEC LIST` command. -## Picture operators -| Operation | Syntax | Returns | Action | -| ------------------------- | ---------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| Horizontal concatenation | Pict1 + Pict2 | Picture | Add Pict2 to the right of Pict1 | -| Vertical concatenation | Pict1 / Pict2 | Picture | Add Pict2 to the bottom of Pict1 | -| Exclusive superimposition | Pict1 & Pict2 | Picture | Superimposes Pict2 on top of Pict1 (Pict2 in foreground). Produces the same result as `COMBINE PICTURES(pict3;pict1;Superimposition;pict2)` | -| Inclusive superimposition | Pict1 | Pict2 | Picture | Superimposes Pict2 on Pict1 and returns resulting mask if both pictures are the same size. Produces the same result as `$equal:=Equal pictures(Pict1;Pict2;Pict3)` | -| Horizontal move | Picture + Number | Picture | Move Picture horizontally Number pixels | -| Vertical move | Picture / Number | Picture | Move Picture vertically Number pixels | -| Resizing | Picture * Number | Picture | Resize Picture by Number ratio | -| Horizontal scaling | Picture *+ Number | Picture | Resize Picture horizontally by Number ratio | -| Vertical scaling | Picture *| Number | Picture | Resize Picture vertically by Number ratio | +## Picture operators -**Notes :** +| Operação | Sintaxe | Retorna | Ação | +| ------------------------- | ---------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| Horizontal concatenation | Pict1 + Pict2 | Imagem | Add Pict2 to the right of Pict1 | +| Vertical concatenation | Pict1 / Pict2 | Imagem | Add Pict2 to the bottom of Pict1 | +| Exclusive superimposition | Pict1 & Pict2 | Imagem | Superimposes Pict2 on top of Pict1 (Pict2 in foreground). Produces the same result as `COMBINE PICTURES(pict3;pict1;Superimposition;pict2)` | +| Inclusive superimposition | Pict1 | Pict2 | Imagem | Superimposes Pict2 on Pict1 and returns resulting mask if both pictures are the same size. Produces the same result as `$equal:=Equal pictures(Pict1;Pict2;Pict3)` | +| Horizontal move | Picture + Number | Imagem | Move Picture horizontally Number pixels | +| Vertical move | Picture / Number | Imagem | Move Picture vertically Number pixels | +| Resizing | Picture * Number | Imagem | Resize Picture by Number ratio | +| Horizontal scaling | Picture *+ Number | Imagem | Resize Picture horizontally by Number ratio | +| Vertical scaling | Picture *| Number | Imagem | Resize Picture vertically by Number ratio | + +**Notas:** - In order to use the | operator, Pict1 and Pict2 must have exactly the same dimension. If both pictures are a different size, the operation Pict1 | Pict2 produces a blank picture. - The `COMBINE PICTURES` command can be used to superimpose pictures while keeping the characteristics of each source picture in the resulting picture. - Additional operations can be performed on pictures using the `TRANSFORM PICTURE` command. - There is no comparison operators on pictures, however 4D proposes the `Equal picture` command to compare two pictures. -### Examples -Horizontal concatenation +### Exemplos +Horizontal concatenation ```4d circle+rectangle //Place the rectangle to the right of the circle rectangle+circle //Place the circle to the right of the rectangle ``` - ![](assets/en/Concepts/concatHor.en.png) ![](assets/en/Concepts/concatHor2.en.png) Vertical concatenation - ```4d circle/rectangle //Place the rectangle under the circle rectangle/circle //Place the circle under the rectangle ``` - ![](assets/en/Concepts/concatVer.en.png) ![](assets/en/Concepts/concatVer2.en.png) Exclusive superimposition - ```4d Pict3:=Pict1 & Pict2 // Superimposes Pict2 on top of Pict1 ``` - ![](assets/en/Concepts/superimpoExc.fr.png) Inclusive superimposition - ```4d Pict3:=Pict1|Pict2 // Recovers resulting mask from superimposing two pictures of the same size ``` - ![](assets/en/Concepts/superimpoInc.fr.png) Horizontal move - ```4d rectangle+50 //Move the rectangle 50 pixels to the right rectangle-50 //Move the rectangle 50 pixels to the left ``` - ![](assets/en/Concepts/hormove.en.png) Vertical move @@ -98,7 +90,6 @@ Vertical move rectangle/50 //Move the rectangle down by 50 pixels rectangle/-20 //Move the rectangle up by 20 pixels ``` - ![](assets/en/Concepts/vertmove.en.png)![](assets/en/Concepts/vertmove2.en.png) Resize @@ -107,7 +98,6 @@ Resize rectangle*1.5 //The rectangle becomes 50% bigger rectangle*0.5 //The rectangle becomes 50% smaller ``` - ![](assets/en/Concepts/resize.en.png)![](assets/en/Concepts/resisze2.en.png) Horizontal scaling @@ -126,4 +116,4 @@ circle*|2 //The circle becomes twice as tall circle*|0.25 //The circle's height becomes a quarter of what it was ``` -![](assets/en/Concepts/vertscaling.en.png)![](assets/en/Concepts/veticalscaling2.en.png) \ No newline at end of file +![](assets/en/Concepts/vertscaling.en.png)![](assets/en/Concepts/veticalscaling2.en.png) diff --git a/website/translated_docs/pt/Concepts/dt_pointer.md b/website/translated_docs/pt/Concepts/dt_pointer.md index f5d4ecff5fea8a..be94dda07485b8 100644 --- a/website/translated_docs/pt/Concepts/dt_pointer.md +++ b/website/translated_docs/pt/Concepts/dt_pointer.md @@ -1,6 +1,6 @@ --- id: pointer -title: Pointer +title: Ponteiro --- A Pointer variable or expression is a reference to another variable (including arrays and array elements), table, field, or object. There is no field of type Pointer. @@ -13,14 +13,14 @@ Being able to refer to something without knowing its exact identity is very usef You can use pointers to reference tables, fields, variables, arrays, array elements, and objects. The following table gives an example of each data type: -| Type | To Reference | To Use | To Assign | +| Type | To Reference | Para usar | To Assign | | ------------- | ----------------------- | ------------------------ | ------------------------ | -| Table | vpTable:=->[Table] | DEFAULT TABLE(vpTable->) | n/a | -| Field | vpField:=->[Table]Field | ALERT(vpField->) | vpField->:="John" | +| Tabela | vpTable:=->[Table] | DEFAULT TABLE(vpTable->) | n/a | +| Campo | vpField:=->[Table]Field | ALERT(vpField->) | vpField->:="John" | | Variable | vpVar:=->Variable | ALERT(vpVar->) | vpVar->:="John" | | Array | vpArr:=->Array | SORT ARRAY(vpArr->;>) | COPY ARRAY (Arr;vpArr->) | | Array element | vpElem:=->Array{1} | ALERT (vpElem->) | vpElem->:="John" | -| Object | vpObj:=->myObject | ALERT (vpObj->myProp) | vpObj->myProp:="John" | +| Objeto | vpObj:=->myObject | ALERT (vpObj->myProp) | vpObj->myProp:="John" | ## Using a pointer: Basic example @@ -30,18 +30,15 @@ It is easiest to explain the use of pointers through an example. This example sh ```4d $MyVar:="Hello" ``` - $MyVar is now a variable containing the string “Hello.” We can now create a pointer to $MyVar: ```4d C_POINTER($MyPointer) $MyPointer:=->$MyVar ``` - The -> symbol means “get a pointer to.” This symbol is formed by a dash followed by a “greater than” sign. In this case, it gets the pointer that references or “points to” $MyVar. This pointer is assigned to MyPointer with the assignment operator. $MyPointer is now a variable that contains a pointer to $MyVar. $MyPointer does not contain “Hello”, which is the value in $MyVar, but you can use $MyPointer to get this value. The following expression returns the value in $MyVar: - ```4d $MyPointer-> ``` @@ -49,26 +46,21 @@ $MyPointer-> In this case, it returns the string “Hello”. The -> symbol, when it follows a pointer, references the object pointed to. This is called dereferencing. It is important to understand that you can use a pointer followed by the -> symbol anywhere that you could have used the object that the pointer points to. This means that you could use the expression $MyPointer-> anywhere that you could use the original $MyVar variable. For example, the following line displays an alert box with the word Hello in it: - ```4d ALERT($MyPointer->) ``` You can also use $MyPointer to change the data in $MyVar. For example, the following statement stores the string "Goodbye" in the variable $MyVar: - ```4d $MyPointer->:="Goodbye" ``` - If you examine the two uses of the expression $MyPointer->, you will see that it acts just as if you had used $MyVar instead. In summary, the following two lines perform the same action—both display an alert box containing the current value in the variable $MyVar: ```4d ALERT($MyPointer->) ALERT($MyVar) ``` - The following two lines perform the same action— both assign the string "Goodbye" to $MyVar: - ```4d $MyPointer->:="Goodbye" $MyVar:="Goodbye" @@ -76,8 +68,7 @@ $MyVar:="Goodbye" ## Pointer operators -With: - +Con: ```4d ` vPtrA and vPtrB point to the same object vPtrA:=->anObject @@ -86,52 +77,39 @@ With: vPtrC:=->anotherObject ``` -| Operation | Syntax | Returns | Expression | Value | -| ---------- | ----------------- | ------- | ------------- | ----- | -| Equality | Pointer = Pointer | Boolean | vPtrA = vPtrB | True | -| | | | vPtrA = vPtrC | False | -| Inequality | Pointer # Pointer | Boolean | vPtrA # vPtrC | True | -| | | | vPtrA # vPtrB | False | - +| Operação | Sintaxe | Retorna | Expressão | Value | +| ------------ | ----------------- | -------- | ------------- | ----- | +| Igual | Pointer = Pointer | Booleano | vPtrA = vPtrB | True | +| | | | vPtrA = vPtrB | False | +| Desigualdade | Pointer # Pointer | Booleano | vPtrA # vPtrC | True | +| | | | vPtrA # vPtrB | False | ## Main usages - ### Pointers to tables - Anywhere that the language expects to see a table, you can use a dereferenced pointer to the table. You create a pointer to a table by using a line like this: - ```4d $TablePtr:=->[anyTable] ``` - You can also get a pointer to a table by using the `Table` command: - -```4d +```4d $TablePtr:=Table(20) ``` - You can use the dereferenced pointer in commands, like this: - -```4d +```4d DEFAULT TABLE($TablePtr->) ``` - ### Pointers to fields - Anywhere that the language expects to see a field, you can use a dereferenced pointer to reference the field. You create a pointer to a field by using a line like this: - ```4d $FieldPtr:=->[aTable]ThisField ``` You can also get a pointer to a field by using the `Field` command, for example: - ```4d $FieldPtr:=Field(1;2) ``` You can use the dereferenced pointer in commands, like this: - ```4d OBJECT SET FONT($FieldPtr->;"Arial") ``` @@ -141,66 +119,51 @@ OBJECT SET FONT($FieldPtr->;"Arial") When you use pointers to process or local variables, you must be sure that the variable pointed to is already set when the pointer is used. Keep in mind that local variables are deleted when the method that created them has completed its execution and process variables are deleted at the end of the process that created them. When a pointer calls a variable that no longer exists, this causes a syntax error in interpreted mode (variable not defined) but it can generate a more serious error in compiled mode. Pointers to local variables allow you to save process variables in many cases. Pointers to local variables can only be used within the same process. In the debugger, when you display a pointer to a local variable that has been declared in another method, the original method name is indicated in parentheses, after the pointer. For example, if you write in Method1: - ```4d $MyVar:="Hello world" Method2(->$MyVar) ``` - In Method2, the debugger will display $1 as follows: | $1 | ->$MyVar (Method1) | | -- | ------------------ | | | | - The value of $1 will be: | $MyVar (Method1) | "Hello world" | | ---------------- | ------------- | | | | - ### Pointers to array elements - You can create a pointer to an array element. For example, the following lines create an array and assign a pointer to the first array element to a variable called $ElemPtr: - ```4d ARRAY REAL($anArray;10) //Create an array $ElemPtr:=->$anArray{1} //Create a pointer to the array element ``` You could use the dereferenced pointer to assign a value to the element, like this: - ```4d $ElemPtr->:=8 ``` ### Pointers to arrays - You can create a pointer to an array. For example, the following lines create an array and assign a pointer to the array to a variable called $ArrPtr: - ```4d ARRAY REAL($anArray;10) //Create an array $ArrPtr:=->$anArray //Create a pointer to the array ``` - It is important to understand that the pointer points to the array; it does not point to an element of the array. For example, you can use the dereferenced pointer from the preceding lines like this: - ```4d SORT ARRAY($ArrPtr->;>) //Sort the array ``` - If you need to refer to the fourth element in the array by using the pointer, you do this: - ```4d ArrPtr->{4}:=84 ``` ### Pointers as parameters to methods - You can pass a pointer as a parameter to a method. Inside the method, you can modify the object referenced by the pointer. For example, the following method, `takeTwo`, takes two parameters that are pointers. It changes the object referenced by the first parameter to uppercase characters, and the object referenced by the second parameter to lowercase characters. Here is the project method: - ```4d //takeTwo project method //$1 – Pointer to a string field or variable. Change this to uppercase. @@ -210,18 +173,16 @@ You can pass a pointer as a parameter to a method. Inside the method, you can mo ``` The following line uses the `takeTwo` method to change a field to uppercase characters and to change a variable to lowercase characters: - - takeTwo(->[myTable]myField;->$MyVar) - +``` +takeTwo(->[myTable]myField;->$MyVar) +``` If the field [myTable]myField contained the string "jones", it would be changed to the string "JONES". If the variable $MyVar contained the string "HELLO", it would be changed to the string "hello". In the takeTwo method, and in fact, whenever you use pointers, it is important that the data type of the object being referenced is correct. In the previous example, the pointers must point to something that contains a string or text. ### Pointers to pointers - If you really like to complicate things, you can use pointers to reference other pointers. Consider this example: - ```4d $MyVar:="Hello" $PointerOne:=->$MyVar @@ -229,7 +190,6 @@ If you really like to complicate things, you can use pointers to reference other ($PointerTwo->)->:="Goodbye" ALERT(($PointerTwo->)->) ``` - It displays an alert box with the word “Goodbye” in it. Here is an explanation of each line of the example: @@ -238,17 +198,16 @@ Here is an explanation of each line of the example: - $PointerOne:=->$MyVar --> $PointerOne now contains a pointer to $MyVar. - $PointerTwo:=->$PointerOne --> $PointerTwo (a new variable) contains a pointer to $PointerOne, which in turn points to $MyVar. - ($PointerTwo->)->:="Goodbye" --> $PointerTwo-> references the contents of $PointerOne, which in turn references $MyVar. Therefore ($PointerTwo->)-> references the contents of $MyVar. So in this case, $MyVar is assigned "Goodbye". -- ALERT (($PointerTwo->)->) --> Same thing: $PointerTwo-> references the contents of $PointerOne, which in turn references $MyVar. Therefore ($PointerTwo->)-> references the contents of $MyVar. So in this case, the alert box displays the contents of $MyVar. +- ALERT (($PointerTwo->)->) --> Same thing: $PointerTwo-> references the contents of $PointerOne, which in turn references $MyVar. Therefore ($PointerTwo->)-> references the contents of $MyVar. Therefore ($PointerTwo->)-> references the contents of $MyVar. The following line puts "Hello" into $MyVar: - ```4d ($PointerTwo->)->:="Hello" ``` The following line gets "Hello" from $MyVar and puts it into $NewVar: +``` +$NewVar:=($PointerTwo->)-> +``` - $NewVar:=($PointerTwo->)-> - - -**Important:** Multiple dereferencing requires parentheses. \ No newline at end of file +**Important:** Multiple dereferencing requires parentheses. diff --git a/website/translated_docs/pt/Concepts/dt_string.md b/website/translated_docs/pt/Concepts/dt_string.md index d816fd1e56b7be..4211887f919120 100644 --- a/website/translated_docs/pt/Concepts/dt_string.md +++ b/website/translated_docs/pt/Concepts/dt_string.md @@ -15,13 +15,12 @@ A string literal is enclosed in double, straight quotation marks ("..."). Here a ```4d "Add Records" "No records found." -"Invoice" +"Fatura " ``` An empty string is specified by two quotation marks with nothing between them (""). ### Escape sequences - The following escape sequences can be used within strings: | Escape sequence | Character replaced | @@ -32,31 +31,29 @@ The following escape sequences can be used within strings: | \\\ | \ (Backslash) | | \\" | " (Quotation marks) | - **Note:** The \ (backslash) character is used as a separator in pathnames under Windows. You must therefore use a double backslash \\\ in paths when you want to have a backslash in front of a character used in one of the escape sequences recognized by 4D (e.g. "C:\\\MyDocuments\\\New.txt"). ## String operators -| Operation | Syntax | Returns | Expression | Value | -| ------------------------ | ---------------- | ------- | ----------------------- | -------- | -| Concatenation | String + String | String | "abc" + "def" | "abcdef" | -| Repetition | String * Number | String | "ab" * 3 | "ababab" | -| Equality | String = String | Boolean | "abc" = "abc" | True | -| | | | "abc" = "abd" | False | -| Inequality | String # String | Boolean | "abc" # "abd" | True | -| | | | "abc" # "abc" | False | -| Greater than | String > String | Boolean | "abd" > "abc" | True | -| | | | "abc" > "abc" | False | -| Less than | String < String | Boolean | "abc" < "abd" | True | -| | | | "abc" < "abc" | False | -| Greater than or equal to | String >= String | Boolean | "abd" >= "abc" | True | -| | | | "abc" >= "abd" | False | -| Less than or equal to | String <= String | Boolean | "abc" <= "abd" | True | -| | | | "abd" <= "abc" | False | -| Contains keyword | String % String | Boolean | "Alpha Bravo" % "Bravo" | True | -| | | | "Alpha Bravo" % "ravo" | False | -| | Picture % String | Boolean | Picture_expr % "Mer" | True (*) | - +| Operação | Sintaxe | Retorna | Expressão | Value | +| -------------------- | ---------------- | -------- | ----------------------- | -------- | +| Concatenation | String + String | String | "abc" + "def" | "abcdef" | +| Repetição | String * Number | String | "ab" * 3 | "ababab" | +| Igual | String = String | Booleano | "abc" = "abc" | True | +| | | | "abc" = "abd" | False | +| Desigualdade | String # String | Booleano | "abc" # "abd" | True | +| | | | "abc" # "abc" | False | +| Maior que | String > String | Booleano | "abd" > "abc" | True | +| | | | "abc" > "abc" | False | +| Menor que | String < String | Booleano | "abc" < "abd" | True | +| | | | "abc" < "abc" | False | +| Maior ou igual a | String >= String | Booleano | "abd" >= "abc" | True | +| | | | "abc" >= "abd" | False | +| Menor que ou igual a | String <= String | Booleano | "abc" <= "abd" | True | +| | | | "abd" <= "abc" | False | +| Contains keyword | String % String | Booleano | "Alpha Bravo" % "Bravo" | True | +| | | | "Alpha Bravo" % "ravo" | False | +| | Picture % String | Booleano | Picture_expr % "Mer" | True (*) | (*) If the keyword "Mer" is associated with the picture stored in the picture expression (field or variable). @@ -68,7 +65,6 @@ The following escape sequences can be used within strings: ```4d Character code("A")=Character code("a") // because 65 is not equal to 97 ``` - - When strings are compared, diacritical characters are taken into account. For example, the following expressions return `TRUE`: ```4d @@ -128,7 +124,6 @@ The following expression will be evaluated correctly: ```4d (Character code($vsValue[[Length($vsValue)]])#64) ``` - **Note:** A 4D option in the Design environment allows you to define how the @ character is interpreted when it is included in a character string. ### Keywords @@ -142,11 +137,9 @@ Unlike other string comparisons, searching by keywords looks for "words" in "tex "Alpha,Bravo,Charlie"%"Alpha" // Returns True "Software and Computers"%"comput@" // Returns True ``` - -> **Notes:** - 4D uses the ICU library for comparing strings (using <>=# operators) and detecting keywords. For more information about the rules implemented, please refer to the following address: http://www.unicode.org/unicode/reports/tr29/#Word_Boundaries. - In the Japanese version, instead of ICU, 4D uses Mecab by default for detecting keywords. +> **Notes:** - 4D uses the ICU library for comparing strings (using <>=# operators) and detecting keywords. Para saber mais sobre as regras aplicadas, veja o endereço: http://www.unicode.org/reports/tr29/#Word_Boundaries. - In the Japanese version, instead of ICU, 4D uses Mecab by default for detecting keywords. ## Character Reference Symbols - The character reference symbols: [[...]] These symbols are used to refer to a single character within a string. This syntax allows you to individually address the characters of a text variable, string variable, or field. @@ -159,7 +152,7 @@ If(vsName#"") End if ``` -Otherwise, if the character reference symbols appear within an expression, they return the character (to which they refer) as a 1-character string. For example: +Otherwise, if the character reference symbols appear within an expression, they return the character (to which they refer) as a 1-character string. Por exemplo: ```4d //The following example tests if the last character of vtText is an At sign "@" @@ -185,16 +178,18 @@ When you use the character reference symbols, you must address existing characte - Failing to do so, in compiled mode (with no options), may lead to memory corruption, if, for instance, you write a character beyond the end of a string or a text. - Failing to do so, in compiled mode, causes an error with the option Range Checking On. For example, executing the following code: - //Very bad and nasty thing to do, boo! - vsAnyText:="" - vsAnyText[[1]]:="A" - +``` +//Very bad and nasty thing to do, boo! + vsAnyText:="" + vsAnyText[[1]]:="A" +``` will trigger the Runtime Error shown here: ![alt-text](assets/en/Concepts/Syntax_Error.en.png) -### Example +### Exemplo + The following project method capitalizes the first character of each word of the text received as parameter and returns the resulting capitalized text: @@ -223,4 +218,4 @@ ALERT(Capitalize_text("hello, my name is jane doe and i'm running for president! displays the alert shown here: -![alt-text](assets/en/Concepts/Jane_doe.en.png) \ No newline at end of file +![alt-text](assets/en/Concepts/Jane_doe.en.png) diff --git a/website/translated_docs/pt/Concepts/dt_time.md b/website/translated_docs/pt/Concepts/dt_time.md index 54d8735da1e992..529d399a603624 100644 --- a/website/translated_docs/pt/Concepts/dt_time.md +++ b/website/translated_docs/pt/Concepts/dt_time.md @@ -1,87 +1,87 @@ --- id: time -title: Time +title: Hora --- -- A Time field, variable or expression can be in the range of 00:00:00 to 596,000:00:00. -- Times are in 24-hour format. -- A time value can be treated as a number. The number returned from a time is the number of seconds since midnight (00:00:00) that time represents. +- As variáveis, campos ou expressões de tipo Hora podem pertencer a um intervalo entre 00:00:00 e 596,000:00:00. +- As Horas estão no formato 24 horas. +- Um valor de Hora pode ser tratado como um número. O número retornado de uma Hora será o número de segundos desde a maia noite (00:00:00) contidos nesse valor de hora. -**Note:** In the 4D Language Reference manual, Time parameters in command descriptions are denoted as Time, except when marked otherwise. +**Nota:** no manual de referência da linguagem 4D, os parâmetros de tipo Hora nas descrições dos comandos são chamados Hora, exceto quando for indicado o contrário. -## Time literals +## Constantes literais de tipo hora -A time literal constant is enclosed by question marks (?...?). +Uma constante hora está rodeada por sinais de interrogação (?....?). -A time literal constant is ordered hour:minute:second, with a colon (:) setting off each part. Times are specified in 24-hour format. +Uma constante hora se ordena hora:minuto:segundo, com dois pontos (:) para separar cada parte. As horas são especificadas no formato de 24 horas. -Here are some examples of time literals: +Aqui são exemplos de constantes de tipo hora: ```4d -?00:00:00? ` midnight +?00:00:00? ` meia noite ?09:30:00? ` 9:30 am -?13:01:59? ` 1 pm, 1 minute, and 59 seconds +?13:01:59? ` 1 pm, 1 minuto, e 59 segundos ``` -A null time is specified by ?00:00:00? - -**Tip:** The Method Editor includes a shortcut for entering a null time. To type a null time, enter the question mark (?) character and press Enter. - -## Time operators - -| Operation | Syntax | Returns | Expression | Value | -| ------------------------ | -------------- | ------- | ----------------------- | ---------- | -| Addition | Time + Time | Time | ?02:03:04? + ?01:02:03? | ?03:05:07? | -| Subtraction | Time – Time | Time | ?02:03:04? – ?01:02:03? | ?01:01:01? | -| Addition | Time + Number | Number | ?02:03:04? + 65 | 7449 | -| Subtraction | Time – Number | Number | ?02:03:04? – 65 | 7319 | -| Multiplication | Time * Number | Number | ?02:03:04? * 2 | 14768 | -| Division | Time / Number | Number | ?02:03:04? / 2 | 3692 | -| Longint division | Time \ Number | Number | ?02:03:04? \ 2 | 3692 | -| Modulo | Time % Time | Time | ?20:10:00? % ?04:20:00? | ?02:50:00? | -| Modulo | Time % Number | Number | ?02:03:04? % 2 | 0 | -| Equality | Time = Time | Boolean | ?01:02:03? = ?01:02:03? | True | -| | | | ?01:02:03? = ?01:02:04? | False | -| Inequality | Time # Time | Boolean | ?01:02:03? # ?01:02:04? | True | -| | | | ?01:02:03? # ?01:02:03? | False | -| Greater than | Time > Time | Boolean | ?01:02:04? > ?01:02:03? | True | -| | | | ?01:02:03? > ?01:02:03? | False | -| Less than | Time < Time | Boolean | ?01:02:03? < ?01:02:04? | True | -| | | | ?01:02:03? < ?01:02:03? | False | -| Greater than or equal to | Time >= Time | Boolean | ?01:02:03? >=?01:02:03? | True | -| | | | ?01:02:03? >=?01:02:04? | False | -| Less than or equal to | Time <= Time | Boolean | ?01:02:03? <=?01:02:03? | True | -| | | | ?01:02:04? <=?01:02:03? | False | - - -### Example 1 - -To obtain a time expression from an expression that combines a time expression with a number, use the commands `Time` and `Time string`. - -You can combine expressions of the time and number types using the `Time` or `Current time` functions: +Uma hora nula se escreve ?00:00:00? + +**Dica:** o Editor de métodos inclui um acesso direto para introduzir uma hora nula. Para escrever uma hora nula, introduza o sinal de interrogação (?) e aperte Enter. + +## Operadores de horas + +| Operação | Sintaxe | Retorna | Expressão | Valor | +| ------------------ | -------------- | -------- | ----------------------- | ---------- | +| Adição | Hora + Hora | Hora | ?02:03:04? + ?01:02:03? | ?03:05:07? | +| Subtração | Hora – Hora | Hora | ?02:03:04? ?01:02:03? | ?01:01:01? | +| Adição | Hora + Número | Número | ?02:03:04? ?01:02:03? | 7449 | +| Subtração | Hora – Número | Número | ?02:03:04? ?01:02:03? | 7319 | +| Multiplicação | Hora * Número | Número | ?02:03:04? ?01:02:03? | 14768 | +| Divisão | Hora / Número | Número | ?02:03:04? ?02:03:04? | 3692 | +| Divisão inteira | Hora \ Número | Número | ?02:03:04? ?01:02:03? | 3692 | +| Módulo | Hora % Hora | Hora | ?20:10:00? % ?04:20:00? | ?02:50:00? | +| Módulo | Hora % Número | Número | ?02:03:04? % 2 | 0 | +| Igual | Hora = Hora | Booleano | ?01:02:03? >=?01:02:03? | True | +| | | | ?01:02:03? ?01:02:04? | False | +| Desigualdade | Hora # Hora | Booleano | ?01:02:03? ?01:02:03? | True | +| | | | ?01:02:03? ?01:02:03? | False | +| Maior que | Hora > Hora | Booleano | ?01:02:03? < ?01:02:04? | True | +| | | | ?01:02:03? > ?01:02:03? | False | +| Menor que | Hora < Hora | Booleano | ?01:02:03? ?01:02:04? | True | +| | | | ?01:02:03? ?01:02:03? | False | +| Maior ou igual que | Hora >= Hora | Booleano | ?01:02:03? >=?01:02:03? | True | +| | | | ?01:02:03? >=?01:02:04? | False | +| Menor ou igual que | Hora <= Hora | Booleano | ?01:02:03? <=?01:02:03? | True | +| | | | ?01:02:04? <=?01:02:03? | False | + +### Exemplo 1 + +Para obter uma expressão de tipo hora a partir de uma expressão que combina uma expressão de hora com um número, utilize os comandos `Time` e `Time string`. + +Pode combinar expressões dos tipos hora e número utilizando as funções `Time` ou `Current time`: ```4d - //The following line assigns to $vlSeconds the number of seconds - //that will be elapsed between midnight and one hour from now + //A linha abaixo atribuir a $vlSeconds o número de segundos + //que estão entre meia noite e uma hora a partir de agora $vlSeconds:=Current time+3600 - //The following line assigns to $vHSoon the time it will be in one hour + //A linha abaixo atribui a $vHSoon a hora que será em uma hora de tempo $vhSoon:=Time(Current time+3600) ``` -The second line could be written in a simpler way: +A segunda linha pode ser escrita de forma mais simples: ```4d - // The following line assigns to $vHSoon the time it will be in one hour + //A linha abaixo atribui a $vHSoon a hora que será em uma hora $vhSoon:=Current time+?01:00:00? ``` -### Example 2 +### Exemplo 2 -The Modulo operator can be used, more specifically, to add times that take the 24-hour format into account: +O operador Modulo pode ser usado, mais concretamente, para somar tempos que considerem o formato de 24 horas: ```4d -$t1:=?23:00:00? // It is 23:00 p.m. - // We want to add 2 and a half hours -$t2:=$t1 +?02:30:00? // With a simple addition, $t2 is ?25:30:00? -$t2:=($t1 +?02:30:00?)%?24:00:00? // $t2 is ?01:30:00? and it is 1:30 a.m. the next morning -``` \ No newline at end of file +$t1:=?23:00:00? // São 23:00 p.m. + // São 23:00 p.m. + // Queremos adicionar 2 horas e meia +$t2:=$t1 +?02:30:00? // Com uma simples adição, $t2 é?25:30:00? +$t2:=($t1 +?02:30:00?)%?24:00:00? // $t2 é ?01:30:00? e é 1:30 a.m. a manhã seguinte a manhã seguinte a manhã seguinte +``` diff --git a/website/translated_docs/pt/Concepts/dt_variant.md b/website/translated_docs/pt/Concepts/dt_variant.md index 4895ad0482a0a6..f510dc58cb66ea 100644 --- a/website/translated_docs/pt/Concepts/dt_variant.md +++ b/website/translated_docs/pt/Concepts/dt_variant.md @@ -8,22 +8,22 @@ Variant is a variable type which allows encapsulating data of any valid regular A variant type variable can contain a value of the following data types: - BLOB -- boolean +- booleano - collection - date -- longint +- inteiro longo - object -- picture +- imagem - pointer - real -- text +- texto - time - null -- undefined +- indefinido > Arrays cannot be stored in variant variables. -In both interpreted and in compiled modes, a same variant variable can be assigned contents of different types. Unlike regular variable types, the variant variable content type is different from the variant variable type itself. For example: +In both interpreted and in compiled modes, a same variant variable can be assigned contents of different types. Unlike regular variable types, the variant variable content type is different from the variant variable type itself. Por exemplo: ```4d C_VARIANT($variant) @@ -37,7 +37,7 @@ $vtype:=Type($variant) // 12 (Is variant) $vtypeVal:=Value type($variant) // 1 (Is real) ``` -You can use variant variables wherever variables are expected, you only need to make sure than the variable content data type is of the expected type. When accessing variant variables, only their current value is taken into account. For example: +You can use variant variables wherever variables are expected, you only need to make sure than the variable content data type is of the expected type. When accessing variant variables, only their current value is taken into account. Por exemplo: ```4d C_VARIANT($v) @@ -60,4 +60,4 @@ Case of End case ``` -> When variant variables are not necessary (i.e. when the data type is known), it is recommended to use regular typed variables. Regular typed variables provide better performance, make code more clear and are helpful for the compiler to prevent bugs related to passing unexpected data types. \ No newline at end of file +> When variant variables are not necessary (i.e. when the data type is known), it is recommended to use regular typed variables. Regular typed variables provide better performance, make code more clear and are helpful for the compiler to prevent bugs related to passing unexpected data types. diff --git a/website/translated_docs/pt/Concepts/error-handling.md b/website/translated_docs/pt/Concepts/error-handling.md index 0630e9b7affdcc..56b25651f699d6 100644 --- a/website/translated_docs/pt/Concepts/error-handling.md +++ b/website/translated_docs/pt/Concepts/error-handling.md @@ -1,93 +1,91 @@ --- id: error-handling -title: Error handling +title: Gestão de erros --- -Error handling is the process of anticipating and responding to errors that might occur in your application. 4D provides a comprehensive support for catching and reporting errors at runtime, as well as for investigating their conditions. +O manejo de erros é o processo de antecipar e responder aos erros que possam ocorrer em sua aplicação. 4D oferece assistência completa à detecção e notificação de erros no tempo de execução, assim como a análise de suas condições. -Error handling meets two main needs: +Manejo de erros responde à duas necessidades principais: -- finding out and fixing potential errors and bugs in your code during the development phase, -- catching and recovering from unexpected errors in deployed applications; in particular, you can replace system error dialogs (disk full, missing file, etc.) with you own interface. +- descobrir e consertar erros potenciais e bugs no código durante a fase de desenvolvimento, +- detectar e recuperar de erros inesperados nas aplicações implementadas; em particular pode substituir diálogos de erros de sistemas (disco cheio, arquivo faltando, etc) com sua própria interface. +> > É recomendado instalar um método de gerenciamento de erros em 4D Server, para todos os códigos rodando no servidor. Esse método evitaria a aparição de caixas de diálogo inesperadas no servidor e poderia registrar os erros em um arquivo especifico para sua análise posterior. -> It is highly recommended to install an error-handling method on 4D Server, for all code running on the server. This method would avoid unexpected dialog boxes to be displayed on the server machine, and could log errors in a dedicated file for further analyses. +## Instalação de um método de gestão de erros -## Installing an error-handling method +Em 4D todos os erros podem ser capturados e manejados em um método projeto específico, o método **gestão de erros** (ou **captura de erros**). -In 4D, all errors can be catched and handled in a specific project method, the **error-handling** (or **error-catching**) method. - -This project method is installed for the current process and will be automatically called for any error that occurs in the process, in interpreted or compiled mode. To *install* this project method, you just need to call the `ON ERR CALL` command with the project method name as parameter. For example: +Este método projeto se instala para o processo atual e será chamado automaticamente para qualquer erro que se produza no processo, em modo interpretado ou compilado. Para *instalar* este método projeto, basta com chamar ao comando `ON ERR CALL` com o nome do método projeto como parâmetro. Por exemplo: ```4d -ON ERR CALL("IO_ERRORS") //Installs the error-handling method +ON ERR CALL("IO_ERRORS") //Instala o método de gestão de erros ``` -To stop catching errors and give back hand to 4D, call `ON ERR CALL` with an empty string: - +Para deixar de detectar erros e devolver o controle a 4D, chame a `ON ERR CALL` com uma string vazia: ```4d -ON ERR CALL("") //gives back control to 4D +ON ERR CALL("") //devolve o controle a 4D ``` -### Scope and components +### Alcance e componentes -You can define a single error-catching method for the whole application or different methods per application module. However, only one method can be installed per process. +Pode definir um único método de captura de erros para toda a aplicação ou diferentes métodos por módulo de aplicação. Entretanto, apenas um método pode ser instalado por processo. -An error-handling method installed by the `ON ERR CALL` command only applies to the running database. In the case of an error generated by a **component**, the `ON ERR CALL` error-handling method of the host database is not called, and vice versa. +Um método de gestão de erros instalado pelo comando `ON ERR CALL` só se aplica ao banco de dados em execução. No caso de um erro gerado por um **componente**, não se chama ao método `ON ERR CALL` de gestão de erros do banco de dados local, e vice versa. -The `Method called on error` command allows to know the name of the method installed by `ON ERR CALL` for the current process. It is particularly useful in the context of components because it enables you to temporarily change and then restore the host database error-catching method: +O comando `Method called on error` permite conhecer o nome do método instalado por `ON ERR CALL` para o processo atual. É particularmente útil no contexto dos componentes porque permite mudar temporariamente e depois restaurar o método de captura de erros do banco de dados local: ```4d $methCurrent:=Method called on error ON ERR CALL("NewMethod") - //If the document cannot be opened, an error is generated + //Se o documento não pouder ser aberto, um erro é gerado $ref:=Open document("MyDocument") - //Reinstallation of previous method + //Reinstalação do método anterior ON ERR CALL($methCurrent) ``` -### Handling errors within the method +### Manejo de erros dentro do método -Within the custom error method, you have access to several information that will help you identifying the error: +Dentro do método de erro personalizado, tem acesso a várias informações que lhe ajudará a identificar o erro: -- dedicated system variables(*): - - - `Error` (longint): error code - - `Error method` (text): name of the method that triggered the error - - `Error line` (longint): line number in the method that triggered the error - - `Error formula` (text): formula of the 4D code (raw text) which is at the origin of the error. +- 4D automatically maintains a number of variables called **system variables**, meeting different needs (see the *4D Language Reference manual*): -(*) 4D automatically maintains a number of variables called **system variables**, meeting different needs. See the *4D Language Reference manual*. + - `Error` (inteiro longo): código de erro + - `Error method`(texto): nome do método que provocou o erro + - `Error line` (entero largo): número de línea do método que provocou o erro + - `Error formula` (text): fórmula do código 4D (texto bruto) que está na origem do erro. -- the `GET LAST ERROR STACK` command that returns information about the current stack of errors of the 4D application. +- o comando `GET LAST ERROR STACK` que devolve informação sobre a pilha de erros atual da aplicação 4D. +- o comando `Get call chain` que devolve uma coleção de objetos que descrevem cada passo da string de chamadas a métodos dentro do processo atual. -#### Example -Here is a simple error-handling system: +#### Exemplo + +Aqui está um sistema de gestão de erros simples: ```4d -//installing the error handling method +//instalar o método de gestão de erros ON ERR CALL("errorMethod") - //... executing code - ON ERR CALL("") //giving control back to 4D + //... executar o código + ON ERR CALL("") //retorna o controle para 4D ``` ```4d -// errorMethod project method - If(Error#1006) //this is not a user interruption - ALERT("The error "+String(Error)+" occurred". The code in question is: \""+Error formula+"\"") +// método projeto errorMethod + If(Error#1006) //essa não é uma interrupção do usuário + ALERT("Um erro foi produzido "+String(Error)+". O código em questão é: \""+Error formula+"\"") End if ``` -### Using an empty error-handling method +### Utilizar um método de gestão de erro vazio -If you mainly want the standard error dialog box to be hidden, you can install an empty error-handling method. The `Error` system variable can be tested in any method, i.e. outside of the error-handling method: +Se quiser que a caixa de diálogo fique escondida, pode instalar um método de gestão de erros vazio. A variável sistema `Error` pode ser provada em qualquer método, ou seja, fora do método de gestão de erros: ```4d -ON ERR CALL("emptyMethod") //emptyMethod exists but is empty +ON ERR CALL("emptyMethod") //emptyMethod existe mas está vazio $doc:=Open document( "myFile.txt") If (Error=-43) ALERT("File not found.") End if ON ERR CALL("") -``` \ No newline at end of file +``` diff --git a/website/translated_docs/pt/Concepts/flow-control.md b/website/translated_docs/pt/Concepts/flow-control.md index ceb43987b1461b..8a96fc695d2499 100644 --- a/website/translated_docs/pt/Concepts/flow-control.md +++ b/website/translated_docs/pt/Concepts/flow-control.md @@ -6,12 +6,11 @@ title: Control flow overview Regardless of the simplicity or complexity of a method, you will always use one or more of three types of programming structures. Programming structures control the flow of execution, whether and in what order statements are executed within a method. There are three types of structures: - **Sequential**: a sequential structure is a simple, linear structure. A sequence is a series of statements that 4D executes one after the other, from first to last. A one-line routine, frequently used for object methods, is the simplest case of a sequential structure. For example: `[People]lastName:=Uppercase([People]lastName)` -- **[Branching](Concepts/cf_branching.md)**: A branching structure allows methods to test a condition and take alternative paths, depending on the result. The condition is a Boolean expression, an expression that evaluates TRUE or FALSE. One branching structure is the `If...Else...End if` structure, which directs program flow along one of two paths. The other branching structure is the `Case of...Else...End case` structure, which directs program flow to one of many paths. -- **[Looping](Concepts/cf_looping.md)**: When writing methods, it is very common to find that you need a sequence of statements to repeat a number of times. To deal with this need, the 4D language provides the following looping structures: - - `While...End while` - - `Repeat...Until` - - `For...End for` - - `For each...End for each` - The loops are controlled in two ways: either they loop until a condition is met, or they loop a specified number of times. Each looping structure can be used in either way, but `While` loops and `Repeat` loops are more appropriate for repeating until a condition is met, and `For` loops are more appropriate for looping a specified number of times. `For each...End for each` allows mixing both ways and is designed to loop within objects and collections. +- **[Branching](Concepts/cf_branching.md)**: A branching structure allows methods to test a condition and take alternative paths, depending on the result. The condition is a Boolean expression, an expression that evaluates TRUE or FALSE. One branching structure is the `If... End if` structure, which directs program flow along one of two paths. The other branching structure is the `Case of... End case` structure, which directs program flow to one of many paths. +- **[Looping](Concepts/cf_looping.md)**: When writing methods, it is very common to find that you need a sequence of statements to repeat a number of times. To deal with this need, the 4D language provides the following looping structures: + - `While... End while` + - `Repeat... Until` + - `For... End for` + - End for each
    The loops are controlled in two ways: either they loop until a condition is met, or they loop a specified number of times. Each looping structure can be used in either way, but `While` loops and `Repeat` loops are more appropriate for repeating until a condition is met, and `For` loops are more appropriate for looping a specified number of times. End for each allows mixing both ways and is designed to loop within objects and collections. -**Note:** 4D allows you to embed programming structures up to a "depth" of 512 levels. \ No newline at end of file +**Note:** 4D allows you to embed programming structures up to a "depth" of 512 levels. diff --git a/website/translated_docs/pt/Concepts/identifiers.md b/website/translated_docs/pt/Concepts/identifiers.md index 8f098e354b22a7..da7627c1190985 100644 --- a/website/translated_docs/pt/Concepts/identifiers.md +++ b/website/translated_docs/pt/Concepts/identifiers.md @@ -3,89 +3,84 @@ id: identifiers title: Identifiers --- -This section describes the conventions and rules for naming various elements in the 4D language (variables, tables, objects, forms, etc.). +Esta seção descreve as convenções e regras para nomear os vários elementos da linguagem 4D (variáveis, tabelas, objetos, formulários, etc) -## Basic Rules -The following rules apply for all 4D frameworks. +## Regras básicas -- A name can begin with an alphabetic character, an underscore, or a dollar ("$") (note that a dollar sign can denote a local element, see below). -- Thereafter, the name can include alphabetic characters, numeric characters, the space character, and the underscore character ("_"). -- Periods (".") and brackets ("[ ]") are not allowed in table, field, method, or variable names. -- Commas, slashes, quotation marks, and colons are not allowed. -- Characters reserved for use as operators, such as * and +, are not allowed. -- Do not use reserved names, i.e. 4D command names (`Date`, `Time`, etc), keywords (If, For, etc.), and constants. -- Any trailing spaces are ignored. +As regras abaixo são aplicadas à todas as estruturas de 4D. -### Additional rules for object property and ORDA names +- Um nome deve começar por um caractere alfabético, um subscrito ou um sinal de dólar ("$") (lembre que um sinal de dólar pode denotar um elemento local, ver abaixo). +- Depois disso, o nome pode incluir caracteres alfabéticos, numéricos, o caractere espaço e o caractere de sublinhado/traço baixo ("_") . +- Pontos (".") Pontos (".") Pontos (".") e colchetes ("[ ]") não estão permitidos nos nomes de tabelas, campos, métodos ou variáveis. +- Não são permitidos vírgulas, barras inclinadas, aspas nem dois pontos. +- Os caracteres reservados para seu uso como oepradores como * e + não estão permitidos. +- Não use nomes reservados, ou seja, nomes de comando 4D (`Date`, `Time`, etc), palavras chaves (If, For, etc.), e constantes. +- Os espaços finais são ignorados. -- Space characters are not allowed. -- Periods (".") and brackets ("[ ]") are not allowed. -- Names are case sensitive. +### Regras adicionais para as propriedades dos objetos e os nomes ORDA +- Os caracteres de espaço não estão permitidos. +- Pontos (".") Pontos (".") Pontos (".") e os colchetes ("[ ]") não estão permitidos. +- Os nomes são sensíveis às maiúsculas e minúsculas. -### Additional rules for SQL +### Regras adicionais para SQL +- Só são aceitos os caracteres _0123456789abcdefghijklmnopqrstuvwxyz +- Nomes não devem incluir palavras chave SQL (comando, atributo, etc). -- Only the characters _0123456789abcdefghijklmnopqrstuvwxyz are accepted -- Names must not include any SQL keywords (command, attribute, etc.). +**Nota:** a área "SQL" do Inspector no editor de estruturas indica automaticamente qualquer caractere não autorizado no nome de uma tabela ou campo. -**Note:** The "SQL" area of the Inspector in the Structure editor automatically indicates any unauthorized characters in the name of a table or field. -## Tables +## Tabelas -You designate a table by placing its name between brackets: [...]. A table name can contain up to 31 characters. - -Examples: +Uma tabela se designa colocando seu nome entre parênteses: [...]. Um nome de tabela pode conter até 31 caracteres. +Exemplos: ```4d DEFAULT TABLE([Orders]) FORM SET INPUT([Clients];"Entry") ADD RECORD([Letters]) ``` -## Fields - -You designate a field by first specifying the table to which it belongs. The field name immediately follows the table name. A field name can contain up to 31 characters. +## Campos -Examples: +Para designar um campo, primeiro se especifica a tabela a qual pertence. O nome do campo segue imediatamene o nome da tabela. Um nome campo pode conter até 31 caracteres. +Exemplos: ```4d [Orders]Total:=Sum([Line]Amount) QUERY([Clients];[Clients]Name="Smith") [Letters]Text:=Capitalize text([Letters]Text) ``` -## Interprocess Variables - -You designate an interprocess variable by preceding the name of the variable with the symbols (<>) — a “less than” sign followed by a “greater than” sign. +## Variáveis interprocesso -The name of an interprocess variable can be up to 31 characters, not including the <> symbols. +Pode estabelecer uma variável interprocesso ao preceder o nome da variável com os símbolos (<>) — um sinal “menor que” seguido por um sinal “maior que”. -Examples: +O nome de uma variável interprocesso pode ser de até 31 caracteres, sem incluir os símbolos <>. +Exemplos: ```4d <>vlProcessID:=Current process <>vsKey:=Char(KeyCode) If(<>vtName#"") ``` -## Process Variables +## Variáveis processo -You designate a process variable by using its name (which cannot start with the <> symbols nor the dollar sign $). A process variable name can contain up to 31 characters. - -Examples: +Uma variável de processo é determinada com seu nome (que não possa começar com os símbolos <> nem $). A process variable name can contain up to 31 characters. +Exemplos: ```4d <>vrGrandTotal:=Sum([Accounts]Amount) If(bValidate=1) vsCurrentName:="" ``` -## Local Variables - -You designate a local variable by placing a dollar sign ($) before the variable name. A local variable name can contain up to 31 characters, not including the dollar sign. +## Variáveis locais -Examples: +Uma variável local é determinada colocando um sinal de dólar ($) antes do nome da variável. Um nome de variável local pode conter até 31 caracteres, sem incluir o sinal de dólar. +Exemplos: ```4d For($vlRecord;1;100) If($vsTempVar="No") @@ -94,330 +89,286 @@ $vsMyString:="Hello there" ## Arrays -You designate an array by using its name, which is the name you pass to an array declaration (such as ARRAY LONGINT) when you create the array. Arrays are variables, and from the scope point of view, like variables, there are three different types of arrays: - -- Interprocess arrays, -- Process arrays, -- Local arrays. +Um array se designa escrevendo seu nome, que é o nome que se passa a um comando de declaração de array (como ARRAY LONGINT) quando criar o array. Arrays são variáveis, e desde o ponto de vista do escopo,da mesma forma que as variáveis, têm três tipos diferentes de arrays: -### Interprocess Arrays +- Arrays interprocesso, +- Arrays processo, +- Arrays local. -The name of an interprocess array is preceded by the symbols (<>) — a “less than” sign followed by a “greater than” sign. +### Arrays interprocesso +O nome do array interprocesso é precedido pelos símbolos (<>) - um sinal "menor que" seguido por um sinal "maior que". -An interprocess array name can contain up to 31 characters, not including the <> symbols. - -Examples: +Um nome de array interprocesso pode conter até 31 caracteres, sem incluir os símbolos <>. +Exemplos: ```4d ARRAY TEXT(<>atSubjects;Records in table([Topics])) SORT ARRAY(<>asKeywords;>) ARRAY INTEGER(<>aiBigArray;10000) ``` -### Process Arrays - -You designate a process array by using its name (which cannot start with the <> symbols nor the dollar sign $). A process array name can contain up to 31 characters. - -Examples: +### Arrays proceso +Um array processo se designa com seu nome (que não pode começar com os símbolos <> nem com $). Um nome de array processo pode conter até 31 caracteres. +Exemplos: ```4d ARRAY TEXT(atSubjects;Records in table([Topics])) SORT ARRAY(asKeywords;>) ARRAY INTEGER(aiBigArray;10000) ``` -### Local Arrays - -The name of a local array is preceded by the dollar sign ($). A local array name can contain up to 31 characters, not including the dollar sign. - -Examples: +### Arrays locais +O nome de um array local vai precedido do sinal de dólar ($). Um nome de array local pode conter até 31 caracteres, sem incluir o sinal de dólar. +Exemplos: ```4d ARRAY TEXT($atSubjects;Records in table([Topics])) SORT ARRAY($asKeywords;>) ARRAY INTEGER($aiBigArray;10000) ``` -### Elements of arrays +### Elementos de arrays +A referência a um elemento de um array local, processo ou interprocesso se realiza mediante chaves ("{ }"). O elemento ao qual faz referência se indica com uma expressão numérica. -You reference an element of an interprocess, process or local array by using the curly braces("{ }"). The element referenced is denoted by a numeric expression. - -Examples: - -```4d - //Addressing an element of an interprocess array -If(<>asKeywords{1}="Stop") +Exemplos: +```4d + If(<>asKeywords{1}="Stop") <>atSubjects{$vlElem}:=[Topics]Subject $viNextValue:=<>aiBigArray{Size of array(<>aiBigArray)} - //Addressing an element of a process array -If(asKeywords{1}="Stop") + //Direcionar um elemento de um array processo If(asKeywords{1}="Stop") atSubjects{$vlElem}:=[Topics]Subject $viNextValue:=aiBigArray{Size of array(aiBigArray)} - //Addressing an element of a local array -If($asKeywords{1}="Stop") + //Direcionar um elemento de um array local If($asKeywords{1}="Stop") $atSubjects{$vlElem}:=[Topics]Subject $viNextValue:=$aiBigArray{Size of array($aiBigArray)} ``` -### Elements of two-dimensional arrays - -You reference an element of a two-dimensional array by using the curly braces ({…}) twice. The element referenced is denoted by two numeric expressions in two sets of curly braces. - -Examples: +### Elementos de arrays de duas dimensões +A referência a um elemento de um array de duas dimensões se realiza utilizando as chaves ({…}) duas vezes. duas vezes. O elemento ao que se faz referência se denota através de duas expressões numéricas em dois conjuntos de pares de chaves +Exemplos: ```4d - //Addressing an element of a two-dimensional interprocess array -If(<>asKeywords{$vlNextRow}{1}="Stop") + //Direcionamento de um elemento de um array interprocesso de duas dimensões If(<>asKeywords{$vlNextRow}{1}="Stop") <>atSubjects{10}{$vlElem}:=[Topics]Subject $viNextValue:=<>aiBigArray{$vlSet}{Size of array(<>aiBigArray{$vlSet})} - //Addressing an element of a two-dimensional process array -If(asKeywords{$vlNextRow}{1}="Stop") + //Direcionar um elemento de uma array processo de duas dimensões If(asKeywords{$vlNextRow}{1}="Stop") atSubjects{10}{$vlElem}:=[Topics]Subject $viNextValue:=aiBigArray{$vlSet}{Size of array(aiBigArray{$vlSet})} - //Addressing an element of a two-dimensional local array -If($asKeywords{$vlNextRow}{1}="Stop") + //Direcionar um elemento de um array local de duas dimensões If($asKeywords{$vlNextRow}{1}="Stop") $atSubjects{10}{$vlElem}:=[Topics]Subject $viNextValue:=$aiBigArray{$vlSet}{Size of array($aiBigArray{$vlSet})} ``` -## Object attributes +## Atributos de objetos -When object notation is enabled, you designate an object attribute (also called object property) by placing a point (".") between the name of the object (or attribute) and the name of the attribute. An attribute name can contain up to 255 characters and is case sensitive. - -Examples: +Quando a notação objeto estiver ativada, é designado um atributo de objeto (também chamado propriedade de objeto) colocando um ponto (".") entre o nome do objeto (ou do atributo) e o nome do atributo. entre o nome do objeto (ou do atributo) e o nome do atributo. Um nome de atributo pode conter até 255 caracteres e diferencia entre maiúsculas e minúsculas. +Exemplos: ```4d myObject.myAttribute:="10" $value:=$clientObj.data.address.city ``` -**Note:** Additional rules apply to object attribute names (they must conform to the ECMAScript specification). For more information, see [Object property identifiers](Concepts/dt_object.md#object-property-identifiers). - -## Forms +**Nota:** são aplicadas regras adicionais aos nomes de atributos de objetos (devem ser ajustados à especificação ECMAScript). Para saber mais, consulte [Identificadores de propriedades de objetos](Concepts/dt_object.md#object-property-identifiers). -You designate a form by using a string expression that represents its name. A form name can contain up to 31 characters. +## Formulários -Examples: +Um formulário se designa mediante uma expressão de tipo string que representa seu nome. Um nome de formulário pode conter até 31 caracteres. +Exemplos: ```4d FORM SET INPUT([People];"Input") FORM SET OUTPUT([People];"Output") DIALOG([Storage];"Note box"+String($vlStage)) ``` -## Form objects - -You designate a form object by passing its name as a string, preceded by the * parameter. A form object name can contain up to 255 characters. +## Objetos de formulários -Example: +Se designar um objeto de formulário passando seu nome como uma string, precedida pelo parâmetro *. Um nome de objeto de formulário pode conter até 255 caracteres. +Exemplo: ```4d OBJECT SET FONT(*;"Binfo";"Times") ``` -**Note:** Do not confuse form objects (buttons, list boxes, variables that can be entered, etc.) and objects in the 4D language. 4D language objects are created and manipulated via object notation or dedicated commands. +**Nota:** não confunda os objetos de formulário (botões, list boxes, variáveis editáveis, etc.) e os objetos da linguagem 4D. Os objetos da linguagem 4D são criados e manipulados através da notação de objetos ou de comandos dedicados. -## Project methods +## Métodos projeto -You designate a project method (procedure or function) by using its name. A method name can contain up to 31 characters. +Um método projeto (procedimento ou função) se designa utilizando seu nome. Um nome de método pode conter até 31 caracteres. -**Note:** A project method that does not return a result is also called a procedure. A project method that returns a result is also called a function. - -Examples: +**Nota:** um método projeto que não devolve um resultado também se chama um procedimento. Um método projeto que devolve um resultado também se denomina função. +Exemplos: ```4d If(New client) -DELETE DUPLICATED VALUES -APPLY TO SELECTION([Employees];INCREASE SALARIES) +DELETE DUPLICATED VALUES APPLY TO SELECTION([Employees];INCREASE SALARIES) ``` -**Tip:** It is a good programming technique to adopt the same naming convention as the one used by 4D for built-in methods. Use uppercase characters for naming your methods; however if a method is a function, capitalize the first character of its name. By doing so, when you reopen a database for maintenance after a few months, you will already know if a method returns a result by simply looking at its name in the Explorer window. - -**Note:** When you call a method, you just type its name. However, some 4D built-in commands, such as `ON EVENT CALL`, as well as all the Plug-In commands, expect the name of a method as a string when a method parameter is passed. Example: +**Dica:** é uma boa técnica de programação adotar a mesma convenção de nomenclatura que a utilizada por 4D para os métodos integrados. Use maiúsculas para nomear seus métodos, entretanto, se um método for uma função, coloque em maiúsculas o primeiro caractere de seu nome. Dessa maneira, quando reabrir um banco de dados para manutenção depois de alguns meses, já saberá se um método retorna um resultado, simplesmente olhando seu nome na janela do Explorer. -Examples: +**Nota:** quando chamar a um método, só tem que escrever seu nome. Entretanto, alguns comandos integrados em 4D, como `ON EVENT CALL`, assim como todos os comandos de Plug-In, esperam o nome de um método como uma string quando se passar um parâmetro de tipo método. Exemplo: +Exemplos: ```4d - //This command expects a method (function) or formula -QUERY BY FORMULA([aTable];Special query) - //This command expects a method (procedure) or statement -APPLY TO SELECTION([Employees];INCREASE SALARIES) - //But this command expects a method name -ON EVENT CALL("HANDLE EVENTS") + //Este comando espera um método (função) ou uma fórmula QUERY BY FORMULA([aTable];Special query) + //Este comando espera um método (procedimento) ou uma instrução APPLY TO SELECTION([Employees];INCREASE SALARIES) + //Mas este comando espera um nome de método ON EVENT CALL("HANDLE EVENTS") ``` -Project methods can accept parameters (arguments). The parameters are passed to the method in parentheses, following the name of the method. Each parameter is separated from the next by a semicolon (;). The parameters are available within the called method as consecutively numbered local variables: $1, $2,…, $n. In addition, multiple consecutive (and last) parameters can be addressed with the syntax ${n}where n, numeric expression, is the number of the parameter. +Os métodos projeto podem aceitar parâmetros (argumentos). The parameters are passed to the method in parentheses, following the name of the method. Each parameter is separated from the next by a semicolon (;). The parameters are available within the called method as consecutively numbered local variables: $1, $2,…, $n. The parameters are available within the called method as consecutively numbered local variables: $1, $2,…, $n. Além disso, pode direcionar múltiplos parâmetros consecutivos com a sintaxe ${n} onde n, expressão numérica, é o número do parâmetro. The parameters are available within the called method as consecutively numbered local variables: $1, $2,…, $n. Além disso, pode direcionar múltiplos parâmetros consecutivos com a sintaxe ${n} onde n, expressão numérica, é o número do parâmetro. -Inside a function, the $0 local variable contains the value to be returned. - -Examples: +Dentro de uma função, a variável local $0 contém o valor a devolver. +Exemplos: ```4d - //Within DROP SPACES $1 is a pointer to the field [People]Name -DROP SPACES(->[People]Name) - - //Within Calc creator: - //- $1 is numeric and equal to 1 - //- $2 is numeric and equal to 5 - //- $3 is text or string and equal to "Nice" - //- The result value is assigned to $0 -$vsResult:=Calc creator(1;5;"Nice") - - //Within Dump: - //- The three parameters are text or string - //- They can be addressed as $1, $2 or $3 - //- They can also be addressed as, for instance, ${$vlParam} where $vlParam is 1, 2 or 3 - //- The result value is assigned to $0 + //Dentro de DROP SPACES $1 é um ponteiro ao campo [People]Name DROP SPACES(->[People]Name) + + //Dentro de Calc creator: + //- $1 é numérico e igual a 1 + //- $2 é numérico e igual a 5 + //- $3 é texto ou string e igual a "Nice" + //- O valor del resultado se atribui a $0 +$vsResult:=Calc creator(1;5; "Nice") + + //Dentro de Dump: + //- os tres parâmetros são texto ou string + //- Se pode direcionar como $1, $2 ou $3 + //- Também podem ser direcionados como, por exemplo, ${$vlParam} onde $vlParam é 1, 2 ou 3 + //- O valor resultante se atribui a $0 vtClone:=Dump("is";"the";"it") ``` -## Plug-In Commands - -You designate a plug-in command by using its name as defined by the plug-in. A plug-in command name can contain up to 31 characters. +## Comandos de plug-in -Examples: +Para designar um comando de plug-in se utiliza seu nome, tal e como o define o plug-in. O nome de um comando plug-in pode conter até 31 caracteres. +Exemplos: ```4d $error:=SMTP_From($smtp_id;"henry@gmail.com") ``` -## Sets - -From the scope point of view, there are two types of sets: - -- Interprocess sets -- Process sets - -4D Server also includes: - -- Client sets +## Conjuntos -### Interprocess Sets +Desde o ponto de vista do escopo, há dois tipos de conjuntos: -A set is an interprocess set if the name of the set is preceded by the symbols (<>) — a “less than” sign followed by a “greater than” sign. +- Conjuntos interprocesso +- Conjuntos processo -An interprocess set name can contain up to 255 characters, not including the <> symbols. +4D Server também inclui: -### Process Sets +- Conjuntos clientes -You denote a process set by using a string expression that represents its name (which cannot start with the <> symbols or the dollar sign $). A set name can contain up to 255 characters. +### Conjuntos interprocesso +Um conjunto é um conjunto interprocesso quando o nome do conjunto está precedido pelos símbolos (<>) - um sinal "menor que" seguido de um sinal "maior que". -### Client Sets +Um nome de conjunto interprocesso pode conter até 255 caracteres, sem incluir os símbolos <>. -The name of a client set is preceded by the dollar sign ($). A client set name can contain up to 255 characters, not including the dollar sign. +### Conjuntos proceso +Para designar um conjunto processo se utilizar uma expressão de tipo string que represente seu nome (que não pode começar com os símbolos <> ou o sinal de dólar $). O nome de um conjunto processo pode conter até 255 caracteres. -**Note:** Sets are maintained on the Server machine. In certain cases, for efficiency or special purposes, you may need to work with sets locally on the Client machine. To do so, you use Client sets. +### Conjuntos clientes +O nome de um conjunto cliente deve ser precedido do sinal de dólar ($). Um nome de conjunto cliente pode conter até 255 caracteres, sem incluir o sinal de dólar. -Examples: +**Nota:** os conjuntos são mantidos pelo equipamento servidor. Em certos casos, por motivos especiais ou por eficiência, pode querer trabalhar com conjuntos localmente no equipamento Cliente. Para fazer isso, use conjuntos Clientes. +Exemplos: ```4d - //Interprocess sets -USE SET("<>Deleted Records") + //Conjuntos interprocessos USE SET("<>Deleted Records") CREATE SET([Customers];"<>Customer Orders") If(Records in set("<>Selection"+String($i))>0) - //Process sets -USE SET("Deleted Records") + //Conjuntos processos USE SET("Deleted Records") CREATE SET([Customers];"Customer Orders") If(Records in set("<>Selection"+String($i))>0) - //Client sets -USE SET("$Deleted Records") + //Conjuntos clientes USE SET("$Deleted Records") CREATE SET([Customers];"$Customer Orders") If(Records in set("$Selection"+String($i))>0) ``` -## Named Selections +## Seleções temporárias -From the scope point of view, there are two types of named selections: +Relativo ao escopo, há dois tipos de seleções temporárias/named: -- Interprocess named selections -- Process named selections. +- Seleções interprocesso temporárias +- Seleções processo temporárias. -### Interprocess Named Selections +### Seleções interprocesso temporárias +Uma seleção temporária é uma seleção interprocesso temporária se seu nome for precedido dos símbolos (<>) - um sinal "menor que" seguido de um sinal "mayor que". -A named selection is an interprocess named selection if its name is preceded by the symbols (<>) — a “less than” sign followed by a “greater than” sign. +O nome de uma seleção interprocesso temporária pode conter até 255 caracteres, sem incluir os símbolos <>. -An interprocess named selection name can contain up to 255 characters, not including the <> symbols. - -### Process Named Selections - -You denote a process named selection by using a string expression that represents its name (which cannot start with the <> symbols nor the dollar sign $). A named selection name can contain up to 255 characters. - -Examples: +### Seleções processo temporárias +Uma seleção temporária processo é determinada mediante uma expressão de string que represente seu nome (que não pode começar com os símbolos <> nem com o sinal de dólar $). O nome de uma seleção temporária pode conter até 255 caracteres. +Exemplos: ```4d - //Interprocess Named Selection -USE NAMED SELECTION([Customers];"<>ByZipcode") - //Process Named Selection -USE NAMED SELECTION([Customers];"<>ByZipcode") + USE NAMED SELECTION([Customers];"<>ByZipcode") + //Seleção processo temporária USE NAMED SELECTION([Customers];"<>ByZipcode") ``` -## Processes - -In the single-user version, or in Client/Server on the Client side, there are two types of processes: - -- Global processes -- Local processes. +## Processos -### Global Processes +Em modo monousuário, ou em Cliente/Servidor do lado do Cliente, há dois tipos de processos: -You denote a global process by using a string expression that represents its name (which cannot start with the dollar sign $). A process name can contain up to 255 characters. +- Processos globais +- Processos locais. -### Local Processes +### Processos globais +Pode determinar um processo global usando uma expressão string que represente seu nome (que não pode começar com o sinal de dólar $). Um nome de processo pode conter até 255 caracteres. -You denote a local process if the name of the process is preceded by a dollar ($) sign. The process name can contain up to 255 characters, not including the dollar sign. - -Examples: +### Processos locais +Pode determinar um processo local se o nome do processo for precedido pelo sinal de dólar ($). O nome de processo pode conter até 255 caracteres, sem incluir o sinal de dólar. +Exemplos: ```4d - //Starting the global process "Add Customers" + //Lançar o processo global "Add Customers" $vlProcessID:=New process("P_ADD_CUSTOMERS";48*1024;"Add Customers") - //Starting the local process "$Follow Mouse Moves" + //Iniciar o processo local "$Follow Mouse Moves" $vlProcessID:=New process("P_MOUSE_SNIFFER";16*1024;"$Follow Mouse Moves") ``` -## Summary of Naming Conventions - -The following table summarizes 4D naming conventions. - -| Identifier | Max. Length | Example | -| ---------------------------- | ----------- | -------------------------- | -| Table | 31 | [Invoices] | -| Field | 31 | [Employees]Last Name | -| Interprocess Variable/Array | <> + 31 | <>vlNextProcessID | -| Process Variable/Array | 31 | vsCurrentName | -| Local Variable/Array | $ + 31 | $vlLocalCounter | -| Object attribute | 255 | $o.myAttribute | -| Form | 31 | "My Custom Web Input" | -| Form object | 255 | "MyButton" | -| Project method | 31 | M_ADD_CUSTOMERS | -| Plug-in Routine | 31 | PDF SET ROTATION | -| Interprocess Set | <> + 255 | "<>Records to be Archived" | -| Process Set | 255 | "Current selected records" | -| Client Set | $ + 255 | "$Previous Subjects" | -| Named Selection | 255 | "Employees A to Z" | -| Interprocess Named Selection | <> + 255 | "<>Employees Z to A" | -| Local Process | $ + 255 | "$Follow Events" | -| Global Process | 255 | "*P_INVOICES_MODULE*" | -| Semaphore | 255 | "mysemaphore" | - - -**Note:** If non-Roman characters are used in the names of the identifiers, their maximum length may be smaller. - -## Resolving Naming Conflicts - -Be sure to use unique names for the different elements in your database. If a particular object has the same name as another object of a different type (for example, if a field is named Person and a variable is also named Person), 4D uses a priority system. - -4D identifies names used in procedures in the following order: - -1. Fields -2. Commands -3. Methods -4. Plug-in routines -5. Predefined constants -6. Variables. - -For example, 4D has a built-in command called `Date`. If you named a method *Date*, 4D would recognize it as the built-in `Date` command, and not as your method. This would prevent you from calling your method. If, however, you named a field “Date”, 4D would try to use your field instead of the `Date` command. \ No newline at end of file +## Resumo das convenções de escrita em 4D + +A tabela abaixo resume as convenções de nomes em 4D. + +| Identificador | Tamanho Máx | Exemplo | +| ------------------------------ | ----------- | -------------------------- | +| Tabela | 31 | [Invoices] | +| Campo | 31 | [Employees]Last Name | +| Variável/array interprocesso | <> + 31 | <>vlNextProcessID | +| Variável/Array processo | 31 | vsCurrentName | +| Variável/Array local | $ + 31 | $vlLocalCounter | +| Propriedades de objetos | 255 | $o.myAttribute | +| Formulário | 31 | "My Custom Web Input" | +| Objetos de formulário | 255 | "MyButton" | +| Project method | 31 | M_ADD_CUSTOMERS | +| Comando de plug-in | 31 | PDF SET ROTATION | +| Conjuntos interprocesso | <> + 255 | "<>Records to be Archived" | +| Conjuntos processo | 255 | "Current selected records" | +| Conjunto cliente | $ + 255 | "$Previous Subjects" | +| Named Selection | 255 | "Employees A to Z" | +| Seleção temporal interprocesso | <> + 255 | "<>Employees Z to A" | +| Processo local | $ + 255 | "$Follow Events" | +| Processo global | 255 | "*P_INVOICES_MODULE*" | +| Semáforo | 255 | "mysemaphore" | + +**Nota:** se caracteres não romanos, fora do alfabeto latino, forem usados nos nomes dos identificadores, o tamanho máximo pode ser menor. + +## Resolução de conflitos de nomes + +Tenha certeza de usar nomes únicos para os diferentes elementos de seu banco de dados. Se um objeto particular tiver o mesmo nome que outro objeto de diferente tipo (por exemplo, se um campo se chamar Pessoa e uma variável também se chamar Pessoa), 4D utiliza um sistema de prioridade. + +4D identifica os nomes utilizados nos métodos em função na seguinte ordem de ordem de prioridade: + +1. Campos +2. Comandos +3. Métodos +4. Comandos de plug-in +5. Constantes predefinidas +6. Variáveis. + +Por exemplo, 4D tem um comando integrado chamado `Date`. Se chamar a um método *Date*, 4D o reconhecerá como o comando integrado `Date`, e não como seu método. Isso impediria de chamar seu método. Se entretanto, chamar um campo de "Date", 4D tentará usar seu campo ao invés do comando `Date`. diff --git a/website/translated_docs/pt/Concepts/interpreted.md b/website/translated_docs/pt/Concepts/interpreted.md index c81f2a3740f76e..fda06fdf2754d4 100644 --- a/website/translated_docs/pt/Concepts/interpreted.md +++ b/website/translated_docs/pt/Concepts/interpreted.md @@ -6,18 +6,17 @@ title: Interpreted and Compiled modes 4D applications can work in **interpreted** or **compiled** mode: - in interpreted mode, statements are read and translated in machine language at the moment of their execution. You can add or modify the code whenever you need to, the application is automatically updated. -- in compiled mode, all methods are read and translated once, at the compilation step. Afterwards, the application only contains assembly level instructions are available, it is no longer possible to edit the code. +- in compiled mode, all methods are read and translated once, at the compilation step. Afterwards, the application only contains assembly level instructions are available, it is no longer possible to edit the code. The advantages of the compilation are: -- **Speed**: Your database can run from 3 to 1,000 times faster. -- **Code checking**: Your database application is scanned for the consistency of code. Both logical and syntactical conflicts are detected. -- **Protection**: Once your database is compiled, you can delete the interpreted code. Then, the compiled database is functionally identical to the original, except that the structure and methods cannot be viewed or modified, deliberately or inadvertently. -- **Stand-alone double-clickable applications**: compiled databases can also be transformed into stand-alone applications (.EXE files) with their own icon. +- **Velocidade**: seu banco de dados é executa de 3 a 1.000 vezes mais rápido. +- **Verificação de código**: sua aplicação de banco de dados se analisa para comprovar a coerência do código. Both logical and syntactical conflicts are detected. +- **Proteção:**: quando seu banco de dados for compilado, pode eliminar o código interpretado. Então, o banco de dados compilado é funcionalmente idêntico ao original, exceto que a estrutura e métodos não pode ser vista ou modificada, seja de forma deliberada ou por acidente. +- **Aplicações independentes/stand alone com duplo clique**: os bancos compilados também podem se transformar em aplicações independentes (arquivos.EXE) com seu proprio icone. - **Preemptive mode**: only compiled code can be executed in preemptive processes. ## Differences between interpreted and compiled code - Although application will work the same way in interpreted and compiled modes, there are some differences to know when you write code that will be compiled. The 4D interpreter is usually more flexible than the compiler. | Compiled | Interpreted | @@ -31,12 +30,11 @@ Although application will work the same way in interpreted and compiled modes, t | If you have checked the "Can be run in preemptive processes" property for the method, the code must not call any thread-unsafe commands or other thread-unsafe methods. | Preemptive process properties are ignored | | The `IDLE` command is necessary to call 4D in specific loops | It is always possible to interrupt 4D | - ## Using Compiler Directives with the Interpreter -Compiler directives are not required for uncompiled databases. The interpreter automatically types each variable according to how it is used in each statement, and a variable can be freely retyped throughout the database. +Os bancos não compilados não exigem diretivas de compilador. O intérprete digita automaticamente cada variável em função de como é utilizada em cada declaração, e uma variável pode voltar a ser escrita livremente em todo o banco de dados -Because of this flexibility, it is possible that a database can perform differently in interpreted and compiled modes. +Por causa da flexibilidade, é possível que um banco de dado possa atuar diretamente em modos interpretado e compilado. For example, if you write: @@ -44,8 +42,7 @@ For example, if you write: C_LONGINT(MyInt) ``` -and elsewhere in the database, you write: - +e em outras partes do banco de dados, se escreve: ```4d MyInt:=3.1416 ``` @@ -54,7 +51,8 @@ In this example, `MyInt` is assigned the same value (3) in both the interpreted The 4D interpreter uses compiler directives to type variables. When the interpreter encounters a compiler directive, it types the variable according to the directive. If a subsequent statement tries to assign an incorrect value (e.g., assigning an alphanumeric value to a numeric variable) the assignment will not take place and will generate an error. -The order in which the two statements appear is irrelevant to the compiler, because it first scans the entire database for compiler directives. The interpreter, however, is not systematic. It interprets statements in the order in which they are executed. That order, of course, can change from session to session, depending on what the user does. For this reason, it is important to design your database so that your compiler directives are executed prior to any statements containing declared variables. +A ordem na qual as duas declarações aparecem é irrelevante para o compilador porque primeiro escaneia o banco inteiro por diretivas de compilador. The interpreter, however, is not systematic. It interprets statements in the order in which they are executed. That order, of course, can change from session to session, depending on what the user does. Por isso, é importante projetar seu banco de dados de forma que as diretivas de compilador sejam executadas antes de qualquer declarações que contenham variáveis declaradas. + ## Using pointers to avoid retyping @@ -80,24 +78,18 @@ Imagine a function that returns the length (number of charaters) of values that ```4d // Calc_Length (how many characters) - // $1 = pointer to flexible variable type, numeric, text, time, boolean - -C_POINTER($1) -C_TEXT($result) -C_LONGINT($0) + // $1 = pointer to flexible variable type, numeric, text, time, boolean C_POINTER($1) +C_TEXT($result) C_LONGINT($0) $result:=String($1->) $0:=Length($result) ``` Then this method can be called: - ```4d $var1:="my text" $var2:=5.3 $var3:=?10:02:24? $var4:=True -$vLength:=Calc_Length(->$var1)+Calc_Length(->$var2)+Calc_Length (->$var3)+Calc_Length(->$var4) - -ALERT("Total length: "+String($vLength)) -``` \ No newline at end of file +$vLength:=Calc_Length(->$var1)+Calc_Length(->$var2)+Calc_Length (->$var3)+Calc_Length(->$var4) ALERT("Total length: "+String($vLength)) +``` diff --git a/website/translated_docs/pt/Concepts/methods.md b/website/translated_docs/pt/Concepts/methods.md index bb22f2010abf7b..685a3f1c5663b6 100644 --- a/website/translated_docs/pt/Concepts/methods.md +++ b/website/translated_docs/pt/Concepts/methods.md @@ -1,38 +1,37 @@ --- id: methods -title: Methods +title: Métodos --- -A method is basically a piece of code that executes one or several actions. In the 4D Language, there are two categories of methods: +A method is basically a piece of code that executes one or several actions. Na linguagem 4D, há duas categorias de métodos: -- **built-in methods**, which are provided by 4D or third-party developers and can be only called in your code. Built-in methods include: - - - Commands and functions of the 4D API, such as `ALERT` or `Current date`. - - Methods attached to collections or native objects, such as `collection.orderBy()` or `entity.save()`. - - Commands from plug-ins or components, provided by 4D or third-party developers, such as `SVG_New_arc`. - - Built-in methods are detailed in the *4D Language reference* manual or dedicated manuals for plug-ins or components. +- **Os métodos integrados**, que são fornecidos por 4D ou por desenvolvedores externos e que só podem ser chamados em seu código. Os métodos integrados incluem: + - Comandos e funções de 4D API, como `ALERT` ou `Current date`. + - Os métodos associados às coleções ou aos objetos nativos, como `collection.orderBy()` ou `entity.save()`. + - Os comandos dos plug-ins ou componentes, fornecidos por 4D ou por desenvolvedores de terceiros, como `SVG_New_arc`. -- **project methods**, where you can write your own code to execute any custom actions. Once a project method is created, it becomes part of the language of the database in which you create it. A project method is composed of statements; each statement consists of one line in the method. A statement performs an action, and may be simple or complex. Although a statement is always one line, that one line can be as long as needed (up to 32,000 characters, which is probably enough for most tasks). The maximum size of a project method is limited to 2 GB of text or 32,000 lines of command. + Os métodos integrados são detalhados non manual *Linguagem 4D* ou nos manuais dedicados aos plug-ins ou componentes. -**Note:** 4D also provides specific methods that are automatically executed depending on database or form events. See [Specialized methods](#specialized-methods). +- Os **métodos projeto**, onde pode escrever seu próprio código para executar toda ação personalizada. Quando um método projeto for criado, se torna parte parte da linguagem do banco de dados na qual foi criado. Um método projeto é composto de várias linhas de instruções, cada uma das quais consta de uma linha no método. A statement performs an action, and may be simple or complex. Although a statement is always one line, that one line can be as long as needed (up to 32,000 characters, which is probably enough for most tasks). A statement performs an action, and may be simple or complex. -## Calling Project Methods +**Nota:** 4D também oferece métodos específicos que se executam automaticamente em função dos eventos do banco de dados ou dos eventos formulário. Ver [Métodos especializados](#specialized-methods). + + +## Métodos proyecto A project method can have one of the following roles, depending on how it is executed and used: -- Subroutine and function -- Method attached to object +- Subrotina e função +- Método associado a um objeto - Menu method - Process method - Event or Error catching method -### Subroutines and functions - +### Subrotinas e funções A subroutine is a project method that can be thought of as a servant. It performs those tasks that other methods request it to perform. A function is a subroutine that returns a value to the method that called it. -When you create a project method, it becomes part of the language of the database in which you create it. You can then call the project method from other project methods, or from [predefined methods](#predefined-methods) in the same way that you call 4D’s built-in commands. A project method used in this way is called a subroutine. +Quando criar um método projeto, este passa a formar parte da lingagem do banco de dados no qual foi criado. Pode daí chamar o método projeto desde outros métodos projeto ou desde [métodos predefinidos](#predefined-methods) da mesma maneira que chama aos comandos integrados de 4D. A project method used in this way is called a subroutine. You use subroutines to: @@ -41,7 +40,7 @@ You use subroutines to: - Facilitate changes to your methods - Modularize your code -For example, let’s say you have a database of customers. As you customize the database, you find that there are some tasks that you perform repeatedly, such as finding a customer and modifying his or her record. The code to do this might look like this: +Por exemplo, suponha que tenha um banco de dados de clientes. Ao personalizar o banco de dados, pode perceber que ha'tarefas que tem que realizar repetidamente, como achar um cliente e modificar seu registro. The code to do this might look like this: ```4d // Look for a customer @@ -52,44 +51,41 @@ For example, let’s say you have a database of customers. As you customize the MODIFY RECORD([Customers]) ``` -If you do not use subroutines, you will have to write the code each time you want to modify a customer’s record. If there are ten places in your custom database where you need to do this, you will have to write the code ten times. If you use subroutines, you will only have to write it once. This is the first advantage of subroutines—to reduce the amount of code. +If you do not use subroutines, you will have to write the code each time you want to modify a customer’s record. If you do not use subroutines, you will have to write the code each time you want to modify a customer’s record. If you use subroutines, you will only have to write it once. This is the first advantage of subroutines—to reduce the amount of code. -If the previously described code was a method called `MODIFY CUSTOMER`, you would execute it simply by using the name of the method in another method. For example, to modify a customer’s record and then print the record, you would write this method: +Se o código descrito anteriormente fosse um método chamado `MODIFICAR CLIENTE`, executaria simplesmente utilizando o nome do método em outro método. For example, to modify a customer’s record and then print the record, you would write this method: ```4d MODIFY CUSTOMER PRINT SELECTION([Customers]) ``` -This capability simplifies your methods dramatically. In the example, you do not need to know how the `MODIFY CUSTOMER` method works, just what it does. This is the second reason for using subroutines—to clarify your methods. In this way, your methods become extensions to the 4D language. +This capability simplifies your methods dramatically. This capability simplifies your methods dramatically. This is the second reason for using subroutines—to clarify your methods. In this way, your methods become extensions to the 4D language. -If you need to change your method of finding customers in this example database, you will need to change only one method, not ten. This is the next reason to use subroutines—to facilitate changes to your methods. +Se precisar mudar seu método de pesquisa de clientes nesse banco de dados de exemplo, terá que mudar apenas um método, não dez. This is the next reason to use subroutines—to facilitate changes to your methods. -Using subroutines, you make your code modular. This simply means dividing your code into modules (subroutines), each of which performs a logical task. Consider the following code from a checking account database: +Using subroutines, you make your code modular. This simply means dividing your code into modules (subroutines), each of which performs a logical task. Considere o código abaixo de um banco de dados de contas correntes: ```4d - FIND CLEARED CHECKS ` Find the cleared checks - RECONCILE ACCOUNT ` Reconcile the account - PRINT CHECK BOOK REPORT ` Print a checkbook report + FIND CLEARED CHECKS ` Buscar os cheques emitidos + RECONCILE ACCOUNT ` Reconciliar a conta + PRINT CHECK BOOK REPORT ` Imprimir um relatório da conta ``` -Even for someone who doesn’t know the database, it is clear what this code does. It is not necessary to examine each subroutine. Each subroutine might be many lines long and perform some complex operations, but here it is only important that it performs its task. We recommend that you divide your code into logical tasks, or modules, whenever possible. +Mesmo para alguém que não conheça o banco de dados, é claro o que o código faz. It is not necessary to examine each subroutine. Each subroutine might be many lines long and perform some complex operations, but here it is only important that it performs its task. We recommend that you divide your code into logical tasks, or modules, whenever possible. -### Methods attached to objects +### Métodos associados aos objetos You can encapsulate your project methods in **formula** objects and call them from your objects. The `Formula` or `Formula from string` commands allow you to create native formula objects that you can encapsulate in object properties. It allows you to implement custom object methods. -To execute a method stored in an object property, use the **( )** operator after the property name. For example: +To execute a method stored in an object property, use the **( )** operator after the property name. Por exemplo: ```4d -//myAlert -ALERT("Hello world!") +//myAlert ALERT("Hello world!") ``` - Then `myAlert` can be encapsulated in any object and called: - ```4d C_OBJECT($o) $o:=New object("custom_Alert";Formula(myAlert)) @@ -99,46 +95,42 @@ $o.custom_Alert() //displays "Hello world!" Syntax with brackets is also supported: ```4d -$o["custom_Alert"]() //displays "Hello world!" +$o["custom_Alert"]() //exibe "Hello world!" ``` You can also [pass parameters](Concepts/parameters.md) to your formula when you call it by using $1, $2… just like with 4D project methods: ```4d -//fullName method -C_TEXT($0;$1;$2) +//fullName method C_TEXT($0;$1;$2) $0:=$1+" "+$2 ``` - You can encapsulate `fullName` in an object: - ```4d C_OBJECT($o) $o:=New object("full_name";Formula(fullName)) $result:=$o.full_name("John";"Smith") //$result = "John Smith" -// equivalent to $result:=fullName("param1";"param2") +// equivalente a $result:=fullName("param1";"param2") ``` - -Combined with the `This`function, such object methods allow writing powerful generic code. For example: +Combined with the `This`function, such object methods allow writing powerful generic code. Por exemplo: ```4d -//fullName2 method -C_TEXT($0) +//fullName2 method C_TEXT($0) $0:=This.firstName+" "+This.lastName ``` - Then the method acts like a new, calculated attribute that can be added to other attributes: ```4d C_OBJECT($o) $o:=New object("firstName";"Jim";"lastName";"Wesson") -$o.fullName:=Formula(fullName2) //add the method +$o.fullName:=Formula(fullName2) //adicionar o método $result:=$o.fullName() //$result = "Jim Wesson" ``` + + Note that, even if it does not have parameters, an object method to be executed must be called with ( ) parenthesis. Calling only the object property will return a new reference to the formula (and will not execute it): ```4d @@ -146,26 +138,25 @@ $o:=$f.message //returns the formula object in $o ``` ### Menu Methods - -A menu method is invoked when you select the custom menu command to which it is attached. You assign the method to the menu command using the Menu editor or a command of the "Menus" theme. The method executes when the menu command is chosen. This process is one of the major aspects of customizing a database. By creating custom menus with menu methods that perform specific actions, you personalize your database. +A menu method is invoked when you select the custom menu command to which it is attached. You assign the method to the menu command using the Menu editor or a command of the "Menus" theme. The method executes when the menu command is chosen. Este processo é um dos principais aspectos da personalização de um banco de dados. Ao criar menus personalizados com métodos de menu que realizam ações específicas, pode personalizar seu banco de dados. Custom menu commands can cause one or more activities to take place. For example, a menu command for entering records might call a method that performs two tasks: displaying the appropriate input form, and calling the `ADD RECORD` command until the user cancels the data entry activity. -Automating sequences of activities is a very powerful capability of the programming language. Using custom menus, you can automate task sequences and thus provide more guidance to users of the database. +Automating sequences of activities is a very powerful capability of the programming language. Usando menus personalizados, pode automatizar sequências de tarefa e fornecer mais orientação aos usuários do banco de dados. + ### Process Methods A **process method** is a project method that is called when a process is started. The process lasts only as long as the process method continues to execute, except if it is a Worker process. Note that a menu method attached to a menu command with *Start a New Process* property is also the process method for the newly started process. ### Event and Error catching Methods - An **event catching method** runs in a separate process as the process method for catching events. Usually, you let 4D do most of the event handling for you. For example, during data entry, 4D detects keystrokes and clicks, then calls the correct object and form methods so you can respond appropriately to the events from within these methods. For more information, see the description of the command `ON EVENT CALL`. An **error catching method** is an interrupt-based project method. Each time an error or an exception occurs, it executes within the process in which it was installed. For more information, see the description of the command `ON ERR CALL`. -## Recursive Project Methods +## Métodos projeto recursivos -Project methods can call themselves. For example: +Project methods can call themselves. Por exemplo: - The method A may call the method B which may call A, so A will call B again and so on. - A method can call itself. @@ -173,7 +164,6 @@ Project methods can call themselves. For example: This is called recursion. The 4D language fully supports recursion. Here is an example. Let’s say you have a `[Friends and Relatives]` table composed of this extremely simplified set of fields: - - `[Friends and Relatives]Name` - `[Friends and Relatives]ChildrensName` @@ -210,6 +200,8 @@ For this example, we assume the values in the fields are unique (there are no tw If(Records in selection([Friends and Relatives])>0) ALERT("A friend of mine, "+Genealogy of($vsName)+", does this for a living!") End if + End if + End if End if ``` @@ -240,13 +232,14 @@ Some typical uses of recursion in 4D are: **Important:** Recursive calls should always end at some point. In the example, the method `Genealogy of` stops calling itself when the query returns no records. Without this condition test, the method would call itself indefinitely; eventually, 4D would return a “Stack Full” error becuase it would no longer have space to “pile up” the calls (as well as parameters and local variables used in the method). -## Specialized Methods -In addition to generic **project methods**, 4D supports several specific method types, that are automatically called depending on events: +## Métodos especializados + +Além dos **métodos projeto**, 4D oferece vários tipos de métodos específicos, que são chamados automaticamente em função dos eventos: -| Type | Calling context | Accepts parameters | Description | +| Type | Calling context | Accepts parameters | Descrição | | -------------------------------- | ---------------------------------------------------------------------------------------- | ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **Object (widget) method** | Automatic, when an event involves the object to which the method is attached | No | Property of a form object (also called widget) | | **Form method** | Automatic, when an event involves the form to which the method is attached | No | Property of a form. You can use a form method to manage data and objects, but it is generally simpler and more efficient to use an object method for these purposes. | | **Trigger** (aka *Table method*) | Automatic, each time that you manipulate the records of a table (Add, Delete and Modify) | No | Property of a table. Triggers are methods that can prevent “illegal” operations with the records of your database. | -| **Database method** | Automatic, when a working session event occurs | Yes (predefined) | There are 16 database methods in 4D. See Database methods section | \ No newline at end of file +| **Database method** | Automatic, when a working session event occurs | Yes (predefined) | There are 16 database methods in 4D. See Database methods section | diff --git a/website/translated_docs/pt/Concepts/parameters.md b/website/translated_docs/pt/Concepts/parameters.md index 6d8afaa7b29648..2e7b6e94850aa6 100644 --- a/website/translated_docs/pt/Concepts/parameters.md +++ b/website/translated_docs/pt/Concepts/parameters.md @@ -1,118 +1,121 @@ --- id: parameters -title: Parameters +title: Parâmetros --- -## Using parameters +## Utilização de parâmetros -You'll often find that you need to pass data to your methods. This is easily done with parameters. +Frequentemente será preciso passar dados para seus métodos. Isso é facilmente feito com parâmetros. -**Parameters** (or **arguments**) are pieces of data that a method 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: +**Os parâmetros** (ou **argumentos**) são peças de dados que um método necessita para realizar sua tarefa. Os termos *parámetros* e *argumentos* são utilizados indiferentemente neste manual. Parâmetros também são passados para comandos integrados 4D. Neste exemplo, a stirng "Hello" é um argumento para o comando integrado `ALERT`: ```4d ALERT("Hello") ``` -Parameters are passed to methods in the same way. For example, if a project method named DO SOMETHING accepted three parameters, a call to the method might look like this: +Os parâmetros são passados aos métodos da mesma maneira. Por exemplo, se um método projeto chamado DO SOMETHING aceitar três parâmetros, uma chamada ao método poderia ter a seguinte forma: ```4d DO SOMETHING(WithThis;AndThat;ThisWay) ``` +Os parâmetros estão separados por ponto e vírgula (;). Seu valor é avaliado no momento da chamada. -The parameters are separated by semicolons (;). Their value is evaluated at the moment of the call. - -In the subroutine (the method that is called), the value of each parameter is automatically copied into sequentially numbered local variables: $1, $2, $3, and so on. The numbering of the local variables represents the order of the parameters. +Na subrotina (o método chamado), o valor de cada parâmetro se copia automaticamente em variáveis locais numeradas sequencialmente: $1, $2, $3, etc. A numeração das variáveis locais representam a ordem dos parâmetros. A numeração das variáveis locais representam a ordem dos parâmetros. ```4d - //Code of the method DO SOMETHING - //Assuming all parameters are of the text type + //Código do método DO SOMETHING + //Assumindo que todos os parâmetros são de tipo texto C_TEXT($1;$2;$3) ALERT("I received "+$1+" and "+$2+" and also "+$3) - //$1 contains the WithThis parameter - //$2 contains the AndThat parameter - //$3 contains the ThisWay parameter + //$1 contém o parâmetro WithThis + //$2 contém o parâmetro AndThat + //$3 contém o parâmetro ThisWay ``` -Within the subroutine, you can use the parameters $1, $2... in the same way you would use any other local variable. However, in the case where you use commands that modify the value of the variable passed as parameter (for example `Find in field`), the parameters $1, $2, and so on cannot be used directly. You must first copy them into standard local variables (for example: `$myvar:=$1`). +Dentro da subrotina, pode utilizar os parâmetros $1, $2... da mesma maneira que utilizaria qualquer outra variável local. Entretanto, no caso de usar comandos que modifiquem o valor da variável passada como parâmetro (por exemplo `Find in field`), os parâmetros $1, $2, etc. não podem ser utilizardos diretamente. Primeiro deve copiá-los nas variáveis locais padrão (por exemplo: `$myvar:=$1`). -The same principles are used when methods are executed through dedicated commands, for example: +Os mesmos princípios são usados quando métodos forem executados através de comandos dedicados, por exemplo: ```4d EXECUTE METHOD IN SUBFORM("Cal2";"SetCalendarDate";*;!05/05/10!) -//pass the !05/05/10! date as parameter to the SetCalendarDate -// in the context of a subform +//passe a data !05/05/10! +//passe a data !05/05/10! como parâmetro del SetCalendarDate +// no contexto de um subformulário ``` -**Note:** For a good execution of code, you need to make sure that all `$1`, `$2`... parameters are correctly declared within called methods (see [Declaring parameters](#declaring-parameters) below). +**Nota:** para uma boa execução do código, é necessário ter certeza de que todos os parâmetros `$1`, `$2`... estejam corretamente declarados dentro dos métodos chamados (ver [Declaração de parâmetros](#declaring-parameters) mais abaixo). + -### Supported expressions +### Expressões compatíveis -You can use any [expression](Concepts/quick-tour.md#expression-types) as parameter, except: +Pode utilizar toda [expressão](Concepts/quick-tour.md#expression-types) como parâmetro, exceto: -- tables +- tabelas - arrays -Tables or array expressions can only be passed [as reference using a pointer](Concepts/dt_pointer.md#pointers-as-parameters-to-methods). +As expressões de tabelas ou arrays só podem ser passadas [como referência utilizando um ponteiro](Concepts/dt_pointer.md#pointers-as-parameters-to-methods). + -## Functions +## Funções -Data can be returned from methods. A method that returns a value is called a function. +Os dados podem ser devolvidos pelos métodos. Um método que devolve um valor se chama uma função. -4D or 4D Plug-in commands that return a value are also called functions. +Os comandos de 4D ou 4D Plug-in que devolvem um valor também são chamados funções. -For example, the following line is a statement that uses the built-in function, `Length`, to return the length of a string. The statement puts the value returned by `Length` in a variable called *MyLength*. Here is the statement: +Por exemplo, a linha abaixo é uma sentença que usa a função integrada, `Length`, para devolver a longitude de uma string. As instruções põe o valor devolvido por `Length` em uma variável chamada *MyLength*. Esta é a instrução: ```4d MyLength:=Length("How did I get here?") ``` -Any subroutine can return a value. The value to be returned is put into the local variable `$0`. +Qualquer subrotina pode retornar um valor. O valor a devolver é posto na variável local `$0`. -For example, the following function, called `Uppercase4`, returns a string with the first four characters of the string passed to it in uppercase: +Por exemplo, a função abaixo, chamada `Uppercase4`, devolve uma string com os quatro primeiros caracteres da string que foram passados em maiúsculas: ```4d $0:=Uppercase(Substring($1;1;4))+Substring($1;5) ``` -The following is an example that uses the Uppercase4 function: +Abaixo está um exemplo que utiliza a função Uppercase4: ```4d NewPhrase:=Uppercase4("This is good.") ``` -In this example, the variable *NewPhrase* gets “THIS is good.” +Neste exemplo, a variável *NewPhrase* recebe “THIS is good.” -The function result, `$0`, is a local variable within the subroutine. It can be used as such within the subroutine. For example, in the previous `DO SOMETHING` example, `$0` was first assigned the value of `$1`, then used as parameter to the `ALERT` command. Within the subroutine, you can use `$0` in the same way you would use any other local variable. It is 4D that returns the value of `$0` (as it is when the subroutine ends) to the called method. +O resultado da função, `$0`, é uma variável local dentro da subrotina. Pode ser usado como tal dentro da subrotina. Por exemplo, no exemplo anterior `DO SOMETHING`, `$0` atribuiu o primeiro o valor de `$1`, e depois se usou como parâmetro do comando `ALERT`. Dentro de la subrotina, pode utilizar `$0` da mesma maneira que utilizaria qualquer outra variável local. É 4D quem devolve o valor de `$0` (como estiver quando a subrotina terminar) ao método chamado. -## Declaring parameters -Even if it is not mandatory in [interpreted mode](Concepts/interpreted.md), you must declare each parameter in the called methods to prevent any trouble. +## Declaração de parâmetros -In the following example, the `OneMethodAmongOthers` project method declares three parameters: +Mesmo não sendo obrigatório em [modo interpretado](Concepts/interpreted.md), deve declarar cada parâmetro nos métodos chamados para evitar problemas. + +No exemplo abaixo, o método de projeto `OneMethodAmongOthers` declara três parâmetros: ```4d - // OneMethodAmongOthers Project Method + // Método projeto OneMethodAmongOthers // OneMethodAmongOthers ( Real ; Date { ; Long } ) // OneMethodAmongOthers ( Amount ; Date { ; Ratio } ) - C_REAL($1) // 1st parameter is of type Real - C_DATE($2) // 2nd parameter is of type Date - C_LONGINT($3) // 3rd parameter is of type Long Integer + C_REAL($1) // O primeiro parâmetro é de tipo Real + C_DATE($2) // O segundo parâmetro é de tipo Data + C_LONGINT($3) // O terceiro parâmetro é de tipo Inteiro longo ``` -In the following example, the `Capitalize` project method accepts a text parameter and returns a text result: +No exemplo abaixo, o método projeto `Capitalize` aceita um parâmetro texto e devolve um resultado texto: ```4d - // Capitalize Project Method - // Capitalize ( Text ) -> Text - // Capitalize ( Source string ) -> Capitalized string + // Método projeto Maiúsculas + // Maiúsculas( Texto ) -> Texto + // Maiúsculas( Cadena fuente ) -> String com a primeira letra em maiúscula C_TEXT($0;$1) $0:=Uppercase(Substring($1;1;1))+Lowercase(Substring($1;2)) ``` -Using commands such as `New process` with process methods that accept parameters also require that parameters are explicitely declared in the called method. For example: +A utilização de comandos tais como `New process` com métodos processo que aceitem parâmetros também requer que os parâmetros se declarem explicitamente no método chamado. Por exemplo: ```4d C_TEXT($string) @@ -122,37 +125,32 @@ C_OBJECT($obj) $idProc:=New process("foo_method";0;"foo_process";$string;$int;$obj) ``` -This code can be executed in compiled mode only if "foo_method" declares its parameters: +Este código pode ser executado em modo compilado só se "foo_method" declarar seus parâmetros: ```4d -//foo_method -C_TEXT($1) +//foo_method C_TEXT($1) C_LONGINT($2) C_OBJECT($3) ... ``` -**Note:** For compiled mode, you can group all local variable parameters for project methods in a specific method with a name starting with "Compiler". Within this method, you can predeclare the parameters for each method, for example: - +**Nota:** em modo compilado, pode agrupar todos os parámetros das variáveis locais dos métodos projeto em um método específico com um nome que comece por "Compiler". Dentro deste método, pode pré-declarar os parâmetros de cada método, por exemplo: ```4d C_REAL(OneMethodAmongOthers;$1) ``` +Ver a página [Modos interpretado e compilado](Concepts/interpreted.md) para mais informação. -See [Interpreted and compiled modes](Concepts/interpreted.md) page for more information. +A declaração de parâmetros também é obrigatóiria nos contextos abaixo (esses contextos não são compatíveis com declarações em um método "Compiler"): -Parameter declaration is also mandatory in the following contexts (these contexts do not support declaration in a "Compiler" method): - -- Database methods For example, the `On Web Connection Database Method` receives six parameters, $1 to $6, of the data type Text. At the beginning of the database method, you must write (even if all parameters are not used): +- Métodos de banco de dados Por exemplo, o método banco `On Web Connection` recebe seis parâmetros, de $1 a $6, del tipo Texto. No começo do método database, tem que escrever (mesmo se todos os parâmetros não forem usados): ```4d -// On Web Connection -C_TEXT($1;$2;$3;$4;$5;$6) +// On Web Connection C_TEXT($1;$2;$3;$4;$5;$6) ``` -- Triggers The $0 parameter (Longint), which is the result of a trigger, will be typed by the compiler if the parameter has not been explicitly declared. Nevertheless, if you want to declare it, you must do so in the trigger itself. - -- Form objects that accept the `On Drag Over` form event The $0 parameter (Longint), which is the result of the `On Drag Over` form event, is typed by the compiler if the parameter has not been explicitly declared. Nevertheless, if you want to decalre it, you must do so in the object method. **Note:** The compiler does not initialize the $0 parameter. So, as soon as you use the `On Drag Over` form event, you must initialize $0. For example: +- Triggers O parâmetro $0 (Inteiro longo), que é o resultado de um trigger, será digitado pelo compilador se o parâmetro não tiver sido declarado explicitamente. Entretanto, se quiser declará-lo, deve fazer isso no próprio trigger. +- Objetos formulário que aceitam o evento formulário `On Drag Over` O parâmetro $0 (Inteiro longo), que é o resultado do evento formulário `On Drag Over`, será digitado pelo compilador se o parâmetro não tiver sido declarado explícita mente. Entretanto, se quiser fazer a declaração, deve fazer isso no método objeto. **Nota:** o compilador não inicializa o parâmetro $0. Portanto, logo que utilizar o evento formulário `On Drag Over`, deve inicializar $0. Por exemplo: ```4d C_LONGINT($0) If(Form event=On Drag Over) @@ -165,162 +163,153 @@ C_TEXT($1;$2;$3;$4;$5;$6) End if ``` -## Values or references +## Valores ou referências -When you pass a parameter, 4D always evaluates the parameter expression in the context of the calling method and sets the **resulting value** to the $1, $2... local variables in the subroutine (see [Using parameters](#using-parameters)). The local variables/parameters are not the actual fields, variables, or expressions passed by the calling method; they only contain the values that have been passed. Since its scope is local, if the value of a parameter is modified in the subroutine, it does not change the value in the calling method. For example: +Quando passar um parâmetro, 4D sempre avalia a expressão do parâmetro no contexto do método que chama e define o **valor resultante** nas variáveis locais $1, $2... da subrotina (ver [Utilização dos parâmetros](#using-parameters)). As variáveis locais/parâmetros não são os campos, variáveis ou expressões realmente passadas pelo método chamada; eles apenas contém os valores que foram passados. Como seu alcance é local, se o valor de um parâmetro for modificado na subrotina, não muda o valor no método chamada. Por exemplo: ```4d - //Here is some code from the method MY_METHOD -DO_SOMETHING([People]Name) //Let's say [People]Name value is "williams" -ALERT([People]Name) + //Esta é uma parte do código do método MY_METHOD DO_SOMETHING([People]Name) //Suponha que o valor [People]Name seja "williams" ALERT([People]Name) - //Here is the code of the method DO_SOMETHING + //Este é o código do método DO_SOMETHING $1:=Uppercase($1) ALERT($1) ``` -The alert box displayed by `DO_SOMETHING` will read "WILLIAMS" and the alert box displayed by `MY_METHOD` will read "williams". The method locally changed the value of the parameter $1, but this does not affect the value of the field `[People]Name` passed as parameter by the method `MY_METHOD`. +A caixa de alerta mostrada por `DO_SOMETHING` dirá "WILLIAMS" e a caixa de alerta mostrada por `MY_METHOD` dirá "williams". O método mudou localmente o valor do parâmetro $1, ma isso não afeta o valor de campo `[People]Name` passado como parâmetro pelo método `MY_METHOD`. -There are two ways to make the method `DO_SOMETHING` change the value of the field: +Há duas formas de fazer com que o método `DO_SOMETHING` mude o valor de campo: -1. Rather than passing the field to the method, you pass a pointer to it, so you would write: +1. Ao invés de passar o campo para o método, passa um ponteiro para ele, por isso pode escrever: ```4d - //Here is some code from the method MY_METHOD - DO_SOMETHING(->[People]Name) //Let's say [People]Name value is "williams" + //Esta é uma parte do código do método MY_METHOD + DO_SOMETHING(->[People]Name) //Suponha que o valor de [People]Name value seja "williams" ALERT([People]Last Name) - //Here the code of the method DO_SOMETHING + //Este é o código do método DO_SOMETHING $1->:=Uppercase($1->) ALERT($1->) ``` -Here the parameter is not the field, but a pointer to it. Therefore, within the `DO SOMETHING` method, $1 is no longer the value of the field but a pointer to the field. The object **referenced** by $1 ($1-> in the code above) is the actual field. Consequently, changing the referenced object goes beyond the scope of the subroutine, and the actual field is affected. In this example, both alert boxes will read "WILLIAMS". +Aqui é o parâmetro não for o campo, mas sim um ponteiro ao mesmo. Portanto, dentro do método `DO SOMETHING`, $1 já não é o valor do campo mas um ponteiro ao campo. O objeto **referenciado** por $1 ($1-> no código anterior) é o campo real. Portanto, mudar o objeto referenciado vai além do escopo da subrotina, e o campo real não é afetado. Neste exemplo, as duas caixas de alerta dirão "WILLIAMS". -2. Rather than having the method `DO_SOMETHING` "doing something," you can rewrite the method so it returns a value. Thus you would write: +2. Ao invés de ter o método `DO_SOMETHING` "faça algo", pode reescrever o método para que devolva um valor. Portanto escreveria: ```4d - //Here is some code from the method MY METHOD - [People]Name:=DO_SOMETHING([People]Name) //Let's say [People]Name value is "williams" + //Esta é uma parte do código do método MY_METHO + [People]Name:=DO_SOMETHING([People]Name) //Suponha que o valor de [People]Name seja "williams" ALERT([People]Name) - //Here the code of the method DO SOMETHING + //Este é o código do método DO_SOMETHING $0:=Uppercase($1) ALERT($0) ``` -This second technique of returning a value by a subroutine is called “using a function.” This is described in the [Functions](#functions) paragraph. +Esta segunda técnica de retornar um valor por uma subrotina se chama " utilizar uma função" É descrita no parágrafo [Funções](#functions). É descrita no parágrafo [Funções](#functions). + -### Particular cases: objects and collections +### Casos particulares: objetos e coleções -You need to pay attention to the fact that Object and Collection data types can only be handled through a reference (i.e. an internal *pointer*). +Deve prestar atenção ao fato de que os tipos de dados Objeto e Coleção só podem ser manejados através de uma referência (ou seja, um *ponteiro* interno). -Consequently, when using such data types as parameters, `$1, $2...` do not contain *values* but *references*. Modifying the value of the `$1, $2...` parameters within the subroutine will be propagated wherever the source object or collection is used. This is the same principle as for [pointers](Concepts/dt_pointer.md#pointers-as-parameters-to-methods), except that `$1, $2...` parameters do not need to be dereferenced in the subroutine. +Por isso, quando usar esses tipos de dados como parâmetros, `$1, $2...` não contém *valores* mas sim *referências*. A modificação do valor dos parâmetros `$1, $2...` dentro da subrotina se propagará a qualquer lugar onde se utilize o objeto ou coleção fonte. Este é o mesmo principio que [os ponteiros](Concepts/dt_pointer.md#pointers-as-parameters-to-methods), exceto que os parâmetros `$1, $2...` não necessitam ser desreferenciados na subrotina. -For example, consider the `CreatePerson` method that creates an object and sends it as a parameter: +Por exemplo, considere o método `CreatePerson` que cria um objeto e o envia como parâmetro: ```4d //CreatePerson C_OBJECT($person) $person:=New object("Name";"Smith";"Age";40) ChangeAge($person) - ALERT(String($person.Age)) + ALERT(String($person. ``` -The `ChangeAge` method adds 10 to the Age attribute of the received object +O método `ChangeAge` adiciona 10 ao atributo Age do objeto recebido ```4d - //ChangeAge + //Mudar Age C_OBJECT($1) $1.Age:=$1.Age+10 ALERT(String($1.Age)) ``` -When you execute the `CreatePerson` method, both alert boxes will read "50" since the same object reference is handled by both methods. +Quando executar o método `CreatePerson`, as duas caixas de alerta dirão "50" já que a mesma referência de objeto é manejada por ambos métodos. + +**4D Server:** quando são passados parâmetros entre métodos que não são executados na mesma máquina (utilizando por exemplo a opção "Executar no servidor"), as referencias não são utilizáveis. Nestes casos, são enviadas cópias dos parâmetros de objetos e coleções ao invés de referências. -**4D Server:** When parameters are passed between methods that are not executed on the same machine (using for example the "Execute on Server" option), references are not usable. In these cases, copies of object and collection parameters are sent instead of references. -## Named parameters +## Parâmetros com nomes -Using objects as parameters allow you to handle **named parameters**. This programming style is simple, flexible, and easy to read. +A utilização de objetos como parâmetros permite manejar **parâmetros com nome**. Este estilo de programação é simples, flexível e fácil de ler. -For example, using the `CreatePerson` method: +Por exemplo, utilizando o método `CreatePerson`: ```4d //CreatePerson C_OBJECT($person) $person:=New object("Name";"Smith";"Age";40) ChangeAge($person) - ALERT(String($person.Age)) + ALERT(String($person. ``` - -In the `ChangeAge` method you can write: +No método `ChangeAge` pode escrever: ```4d //ChangeAge C_OBJECT($1;$para) $para:=$1 - $para.Age:=$para.Age+10 - ALERT($para.Name+" is "+String($para.Age)+" years old.") + $para. Age:=$para. Age+10 + ALERT($para. Name+" is "+String($para. ``` -This provides a powerful way to define [optional parameters](#optional-parameters) (see also below). To handle missing parameters, you can either: - -- check if all expected parameters are provided by comparing them to the `Null` value, or -- preset parameter values, or -- use them as empty values. +Isso oferece uma poderosa maneira de definir [parâmetros opcionais](#optional-parameters) (ver também abaixo). Para manejar os parâmetros que faltam, pode: +- veja se todos os parâmetros esperados são fornecidos comparando-os com o valor `Null`, ou +- pré-definir os valores dos parâmetros, ou +- usá-los como valores vazios. -In the `ChangeAge` method above, both Age and Name properties are mandatory and would produce errors if they were missing. To avoid this case, you can just write: +No método `ChangeAge` anterior, as propriedades Age e Name são obrigatórias e produzirão erross se faltarão. Para evitar isso, pode escrever: ```4d //ChangeAge C_OBJECT($1;$para) $para:=$1 - $para.Age:=Num($para.Age)+10 - ALERT(String($para.Name)+" is "+String($para.Age)+" years old.") + $para. Age:=Num($para. Age)+10 + ALERT(String($para. Name)+" is "+String($para. ``` +Ambos parâmetros são opcionais: se não forem preenchidos, o resultado será "é 10 anos de idade", mas nenhum erro será gerado. -Then both parameters are optional; if they are not filled, the result will be " is 10 years old", but no error will be generated. - -Finally, with named parameters, maintaining or refactoring applications is very simple and safe. Imagine you later realize that adding 10 years is not always appropriate. You need another parameter to set how many years to add. You write: +Finalmente, com parâmetros com nome, a manutenção ou a reprodução das aplicações é muito simples e seguro. Imagine que depois perceba de que adicionar 10 anos não funciona sempre. Precisa de outro parâmetro para definir quantos anos tem que adicionar. Escreva: ```4d $person:=New object("Name";"Smith";"Age";40;"toAdd";10) ChangeAge($person) -//ChangeAge -C_OBJECT($1;$para) -$para:=$1 -If ($para.toAdd=Null) - $para.toAdd:=10 -End if -$para.Age:=Num($para.Age)+$para.toAdd -ALERT(String($para.Name)+" is "+String($para.Age)+" years old.") +//ChangeAge C_OBJECT($1;$para) +$para:=$1 If ($para.toAdd=Null) + $para.toAdd:=10 End if +$para. Age:=Num($para. Age)+$para.toAdd ALERT(String($para. Name)+" is "+String($para. ``` +Não precisará mudar seu código existente. Sempre funcionará como na versão anterior, mas se for necessário, é possível usar outro valor diferente de 10 anos. -The power here is that you will not need to change your existing code. It will always work as in the previous version, but if necessary, you can use another value than 10 years. +Com variáveis com nome, qualquer parâmetro pode ser opcional. No exemplo acima, todos os parâmetros são opcionais e qualquer pode ser dado em qualquer ordem. -With named variables, any parameter can be optional. In the above example, all parameters are optional and anyone can be given, in any order. -## Optional parameters - -In the *4D Language Reference* manual, the { } characters (braces) indicate optional parameters. For example, `ALERT (message{; okButtonTitle})` means that the *okButtonTitle* parameter may be omitted when calling the command. You can call it in the following ways: +## Parâmetros opcionais +No manual *Linguagem de 4D*, os caracteres { } (chaves) indicam parâmetros opcionais. Por exemplo, `ALERT (message{; okButtonTitle})` significa que o parâmetro *okButtonTitle* pode omitir o chamado ao comando. Pode fazer a chamada de duas maneiras: ```4d -ALERT("Are you sure?";"Yes I am") //2 parameters -ALERT("Time is over") //1 parameter +ALERT("Are you sure?";"Yes I am") //2 parâmetros ALERT("Time is over") //1 parâmetro ``` -4D project methods also accept such optional parameters, starting from the right. The issue with optional parameters is how to handle the case where some of them are missing in the called method - it should never produce an error. A good practice is to assign default values to unused parameters. +Os métodos projeto 4D também aceitam esses parâmetros opcionais, começando pela direita. O problema com os parâmetros opcionais é como manejar o caso em que alguns deles estejam faltando no método chamado, nunca deveria produzir um erro. Uma boa prática é atribuir valores padrão aos parâmetros não utilizados. -> When optional parameters are needed in your methods, you might also consider using [Named parameters](#named-parameters) which provide a flexible way to handle variable numbers of parameters. +> Quando os parâmetros opcionais forem necessários em seus métodos, também pode considerar o uso de [parâmetros com nome](#named-parameters) que oferecem uma forma flexível de manejar um número variável de parâmetros. -Using the `Count parameters` command from within the called method, you can detect the actual number of parameters and perform different operations depending on what you have received. +Utilizando o comando `Count parameters` desde dentro do método chamado, pode detectar o número real de parâmetros e realizar diferentes operações dependendo do que tenha recebido. -The following example displays a text message and can insert the text into a document on disk or in a 4D Write Pro area: +O exemplo abaixo mostra uma mensagem de texto e pode inserir o texto em um documento no disco ou em uma área de 4D Write Pro: ```4d -// APPEND TEXT Project Method +// Método projeto APPEND TEXT // APPEND TEXT ( Text { ; Text { ; Object } } ) // APPEND TEXT ( Message { ; Path { ; 4DWPArea } } ) @@ -336,23 +325,21 @@ The following example displays a text message and can insert the text into a doc End if End if ``` +Depois de adicionar este método projeto a sua aplicação, pode escrever: -After this project method has been added to your application, you can write: - -```4d -APPEND TEXT(vtSomeText) //Will only display the message -APPEND TEXT(vtSomeText;$path) //Displays text message and appends it to document at $path -APPEND TEXT(vtSomeText;"";$wpArea) //Displays text message and writes it to $wpArea +```4d +APPEND TEXT(vtSomeText) //Só mostrará a mensagem APPEND TEXT(vtSomeText;$path) //Mostra a mensagem e o anexo ao documento em $path APPEND TEXT(vtSomeText;"";$wpArea) //Mostra a mensagem e escreve em $wpArea ``` -## Parameter indirection -4D project methods accept a variable number of parameters of the same type, starting from the right. This principle is called **parameter indirection**. Using the `Count parameters` command you can then address those parameters with a `For...End for` loop and the parameter indirection syntax. +## Indireção dos parâmetros + +Os métodos projeto 4D aceitam um número variável de parametros do mesmo tipo, começando pela direita. Este princípio se chama **la indireção de parâmetros**. Ao utilizar o comando `Count parameters` pode endereçar esses parâmetros com um loop `For... End for` e a sintaxe de indireção de parâmetros. -In the following example, the project method `SEND PACKETS` accepts a time parameter followed by a variable number of text parameters: +No exemplo abaixo, o método projeto `SEND PACKETS` aceita um parâmetro de tempo seguido de um número variável de parâmetros de texto: ```4d - //SEND PACKETS Project Method + //Método projeto SEND PACKETS //SEND PACKETS ( Time ; Text { ; Text2... ; TextN } ) //SEND PACKETS ( docRef ; Data { ; Data2... ; DataN } ) @@ -365,21 +352,20 @@ In the following example, the project method `SEND PACKETS` accepts a time param End for ``` -Parameter indirection is best managed if you respect the following convention: if only some of the parameters are addressed by indirection, they should be passed after the others. Within the method, an indirection address is formatted: ${$i}, where $i is a numeric variable. ${$i} is called a **generic parameter**. +A indireção de parâmetros se gerencia melhor se respeitar a convenção abaixo: se só alguns dos parâmetros forem endereçados por indireção, devem ser passados depois dos outros. Dentro do método, um endereço de indireçao é formatado: ${$i}, onde $i for uma variável numérica. ${$i} se denomina **parâmetro genérico**. -For example, consider a function that adds values and returns the sum formatted according to a format that is passed as a parameter. Each time this method is called, the number of values to be added may vary. We must pass the values as parameters to the method and the format in the form of a character string. The number of values can vary from call to call. +Por exemplo, considere uma função que some os valores e devolva a soma formatada segundo um formato que se passa como parâmetro. Cada vez que chamar a esse método, o número de valores a somar pode variar. Devemos passar os valores como parâmetros ao método e o formato em forma de string dos caracteres. O número de valores pode variar de chamada a chamada. -This function is called in the following manner: +Essa função é chamada da maneira abaixo: ```4d Result:=MySum("##0.00";125,2;33,5;24) ``` -In this case, the calling method will get the string “182.70”, which is the sum of the numbers, formatted as specified. The function's parameters must be passed in the correct order: first the format and then the values. - -Here is the function, named `MySum`: +Neste caso, o método que chama obterá a string "182,70", que é a soma dos números, com o formato especificado. Os parâmetros da função devem ser passados na ordem correta: primeiro o formato e depois os valores. +Aqui está a função, chamada `MySum`: ```4d $Sum:=0 For($i;2;Count parameters) @@ -388,21 +374,22 @@ Here is the function, named `MySum`: $0:=String($Sum;$1) ``` -This function can now be called in various ways: +Esta função pode ser chamada agora de várias formas: ```4d Result:=MySum("##0.00";125,2;33,5;24) Result:=MySum("000";1;18;4;23;17) ``` -### Declaring generic parameters -As with other local variables, it is not mandatory to declare generic parameters by compiler directive. However, it is recommended to avoid any ambiguity. To declare these parameters, you use a compiler directive to which you pass ${N} as a parameter, where N specifies the first generic parameter. +### Declaração de parâmetros genéricos + +Da mesma forma que com outras variáveis locais, não é obrigatório declarar os parâmetros genéricos mediante uma diretiva de compilador. Entretanto é recomendado que se evite qualquer ambiguidade. Para declarar estes parâmetros, se utiliza uma diretriz do compilador à qual se passa ${N} como parâmetro, onde N especifica o primeiro parâmetro genérico. ```4d C_LONGINT(${4}) ``` -This command means that starting with the fourth parameter (included), the method can receive a variable number of parameters of longint type. $1, $2 and $3 can be of any data type. However, if you use $2 by indirection, the data type used will be the generic type. Thus, it will be of the data type Longint, even if for you it was, for instance, of the data type Real. +Esse comando significa que a partir do quarto parâmetro (incluído), o método pode receber um número variável de parâmetros de tipo longint. $1, $2 e $3 podem ser de qualquer tipo de dados. Entretanto, se usar $2 por indireção, o tipo de dados usados será do tipo genérico. Assim, será do tipo de dados LongInt, mesmo se para você fosse, por exemplo, do tipo de dados Real. -**Note:** The number in the declaration has to be a constant and not a variable. \ No newline at end of file +**Nota:** O número na declaração tem que ser uma constante e não uma variável. diff --git a/website/translated_docs/pt/Concepts/plug-ins.md b/website/translated_docs/pt/Concepts/plug-ins.md index 0576ddc26ae34a..849d2dba533d56 100644 --- a/website/translated_docs/pt/Concepts/plug-ins.md +++ b/website/translated_docs/pt/Concepts/plug-ins.md @@ -18,7 +18,6 @@ The modular nature of the 4D environment allows the creation of basic applicatio A plug-in is a piece of code that 4D launches at start up. It adds functionality to 4D and thus increases its capacity. Usually, a plug-in does things that: - - 4D cannot do (ie, specific platform technology), - will be very hard to write just using 4D, - are only available as Plug-in Entrypoint @@ -31,7 +30,7 @@ A plug-in usually contains a set of routines given to the 4D Developer. It can h ### Important note -A plug-in can be very simple, with just one routine performing a very small task, or it can be very complex, involving hundred of routines and areas. There is virtually no limit to what a plug-in can do, however every plug-in developer should remember that a plug-in is a "sample" piece of code. It is the plug-in that runs within 4D, not the opposite. As a piece of code, it is the host of 4D; it is not a stand-alone application. It shares CPU time and memory with 4D and other plug-ins, thus, it should be a polite code, using just what is necessary to run. For example, in long loops, a plug-in should call `PA_Yield()` to give time to the 4D scheduler unless its task is critical for both it and the database. +A plug-in can be very simple, with just one routine performing a very small task, or it can be very complex, involving hundred of routines and areas. There is virtually no limit to what a plug-in can do, however every plug-in developer should remember that a plug-in is a "sample" piece of code. It is the plug-in that runs within 4D, not the opposite. As a piece of code, it is the host of 4D; it is not a stand-alone application. It shares CPU time and memory with 4D and other plug-ins, thus, it should be a polite code, using just what is necessary to run. Por exemplo, nos loops longos, um plug-in deve chamar a `PA_Yield()` para dar tempo ao planificador 4D, a menos que sua tarefa seja crítica tanto para ele quanto para o banco de dados. ## How to create a plug-in? @@ -44,18 +43,18 @@ A plug-in can be very simple, with just one routine performing a very small task You install plug-ins in the 4D environment by copying their files into the appropriate folder. -“PluginName.bundle” folders contain both Windows and macOS versions of 4D plug-ins. Their specific internal architecture lets 4D Server load the appropriate version according to the platform where the client machine will be run. To install a plug-in in your environment, you just need to put the “PluginName.bundle” folder or package concerned into the desired **PlugIns** folder. +“PluginName.bundle” folders contain both Windows and macOS versions of 4D plug-ins. Their specific internal architecture lets 4D Server load the appropriate version according to the platform where the client machine will be run. Para instalar um plug-in em seu ambiente, só precisa colocar a pasta "PluginName.bundle" ou o pacote correspondente na pasta **PlugIns** desejada. -You can put the PlugIns folder in two different places: +Pode colocar a pasta PlugIns em dois lugares diferentes: -- At the level of the 4D executable application, i.e.: +- At the level of the 4D executable application, i.e.: - Under Windows: next to the .exe file - - Under macOS: at the first level of the Contents folder inside the application package. - In this case, plug-ins are available in every database opened by this application. -- At the same level as the database structure file. In this case, plug-ins are only available in this particular database. + - Em macOS: no primeiro nível da pasta Contents dentro do pacote da aplicação. + Neste caso, os plug-ins estão disponíveis em todos os bancos de dados abertos por essa aplicação. +- No mesmo nível que o arquivo de estrutura do banco de dados. Nesse caso, plug-ins só estão disponíveis no banco de dados em particular. The choice of location depends on how you want to use the plug-in. If the same plug-in is placed in both locations, 4D will only load the one located next to the structure. In an application that is compiled and merged using 4D Volume Desktop, if there are several instances of the same plug-in present, this will prevent the application from opening. -Plug-ins are loaded by 4D when the application is launched so you will need to quit your 4D application before installing them. Then open your database with 4D. If any plug-in requires a specific license for use, it will be loaded but not available for use. \ No newline at end of file +Plug-ins are loaded by 4D when the application is launched so you will need to quit your 4D application before installing them. Plug-ins are loaded by 4D when the application is launched so you will need to quit your 4D application before installing them. If any plug-in requires a specific license for use, it will be loaded but not available for use. diff --git a/website/translated_docs/pt/Concepts/quick-tour.md b/website/translated_docs/pt/Concepts/quick-tour.md index 09013471464d6c..d3c2993fc4c3fc 100644 --- a/website/translated_docs/pt/Concepts/quick-tour.md +++ b/website/translated_docs/pt/Concepts/quick-tour.md @@ -4,60 +4,60 @@ title: A Quick Tour sidebar_label: A Quick Tour --- -Using the 4D language, printing the traditional "Hello, world!" message on screen can be done in several ways. The most simple is probably to write the following single line in a project method: +Usando a linguagem 4D, imprimir a mensagem tradicional ""Hello, world!" na tela pode ser feito de várias maneiras. A maneira mais simples é provavelmente escrever a linha única abaixo em um método de projeto: -```4d +```4d ALERT("Hello, World!") ``` -This code will display a platform-standard alert dialog box with the "Hello, World!" message, containing an OK button. To execute the code, you just need to click on the execution button in the Method editor: +Esse código vai exibir um alerta normal de plataforma com a mensagem "hello world" contendo um botão OK. Para executar o código, precisa clicar no botão de execução do editor de Método: ![alt-text](assets/en/Concepts/helloworld.png) -Or, you could attach this code to a button in a form and execute the form, in which case clicking on the button would display the alert dialog box. In any cases, you have just executed your first line of 4D code! +Ou poderia anexar esse código a um botão em um formulário e executar o formulário, nesse caso, clicar no botão exibira a caixa de diálogo de alerta. Em qualquer caso, acabou de executar sua primeira linha de código 4D! + -## Assigning Values +## Atribuir valores -Data can be put into and copied out of variables, fields, array elements... Putting data into a variable is called assigning the data to the variable and is done with the assignment operator (:=). The assignment operator is also used to assign data to fields or array elements. +Dados podem ser colocado ou copiados de ou em variáveis, campos, elementos arrays... Colocar dados em uma variável é chamado atribuiindo os dados a uma variável e é feito com o operador de atribuição (:=). O operador de atribuição também é usado para atribuir dados para elementos campos ou arrays. ```4d -$MyNumber:=3 //assigns 3 to MyNumber variable -[Products]Size:=$MyNumber //assigns MyNumber variable to [Products]Size field -arrDays{2}:="Tuesday" //assigns "Tuesday" string to the 2nd arrDays element -MyVar:=Length("Acme") //assigns the result of the function (4) to MyVar -$myDate:=!2018/01/21! //assigns a date literal -$myHour:=?08:12:55? //assigns a time literal +$MyNumber:=3 //atribui 3 a variável MyNumber +[Products]Size:=$MyNumber //atribui variável MyNumber ao campo [Products]Size +arrDays{2}:="Tuesday" //atribui a string"Tuesday" ao segundo elemento arrDays MyVar:=Length("Acme") //atribui o resultado da função (4) a MyVar +$myDate:=!2018/01/21! //atribui uma data literal +$myHour:=?08:12:55? //atribui uma hora literal ``` -You MUST distinguish the assignment operator := from the other operators. Rather than combining expressions into a new one, the assignment operator copies the value of the expression to the right of the assignment operator into the variable or field to the left of the operator. +Você DEVE diferenciar o operador atribuição := dos outros operadores. Ao invés de combinar expressões a uma nova, o operador de atribuição copia o valor da expressão para a direita do operador de atribuição para a variável ou campo para a esquerda do operador. -**Important:** Do NOT confuse the assignment operator := with the equality comparison operator =. A different assignment operator (and not =) was deliberately chosen to avoid issues and confusion which often occur with == or === in other programming languages. Such errors are often difficult to recognize by the compiler and lead to time-consuming troubleshooting. +**Importante:** Não confunda o operador de atribuição := com o operador de comparação de igualdade =. Um operador de atribuição diferente (e não =) foi escolhido deliberadamente para evitar problemas e confusão que ocorrem frequentemente em outras linguagens com operadores como == ou ===. Esses erros são geralmente difíceis de reconhecer pelo compilador e geram problemas trabalhosos. -## Variables +## Variáveis -The 4D language is strongly typed, although some flexibility is allowed in many cases. You create a typed variable using a `C_XXX` command. For example, to create a variable of the date type, you can write: +A linguagem 4D é baseada em tipos, mas com alguma flexibilidade. Pode criar uma variável digitada utilizando um comando `C_XXX`. Por exemplo, para criar uma variável do tipo dados, pode escrever: ```4d -C_DATE(MyDate) //Date type for MyDate variable +C_DATE(MyDate) //Tipo data para a variável MyDate ``` -Even if it is usually not recommended, you can create variables simply by using them; you do not necessarily need to formally define them as you do with fields. For example, if you want a variable that will hold the current date plus 30 days, you can write: +Mesmo geralmente não sendo recomendado, é possível criar variáveis simplesmente usando-as; não precisa defini-las formalmente como se faz com campos. Por exemplo, se quiser criar uma variável que contenha a data atual mais 30 dias, pode escrever: ```4d MyOtherDate:=Current date+30 ``` -The line of code reads “MyOtherDate gets the current date plus 30 days.” This line creates the variable, assigns it with both the (temporary) date type and a content. A variable created by assignment is interpreted as typeless, that is, it can be assigned with other types in other lines and then changes the type dynamically. A variable typed with `C_XXX` cannot change the type. In compiled mode, the type can never be changed, regardless of how the variable was created. +A linha de código lê “MyOtherDate gets the current date plus 30 days.” Essa linha cria a variável e a atribuiu com o tipo de data (temporário) e um conteúdo. Uma variável criada por atribuição é interpretada como sem tipo, ou seja, pode ser atribuída com outros tipos em outras linhas e então muda o tipo dinamicamente. Uma variável digitada com `C_XXX` não pode mudar de tipo. Em modo compilado, o tipo não pode ser modificado nunca, independentemente de como tenha criado a variável. -## Commands +## Comandos -4D commands are built-in methods to perform an action. All 4D commands, such as `CREATE RECORD`, or `ALERT`, are described in the *4D Language Reference* manual, grouped by theme. Commands are often used with parameters, which are passed in brackets () and separated by semicolons (;). Example: +Os comandos 4D são métodos integrados para realizar uma ação. Todos os comandos 4D, como `CREATE RECORD`, o `ALERT`, se descrevem no manual _Linguagem de 4D_, agrupados por temas. Comandos são frequentemente usados com parâmetros, que são passados em parênteses () e separados por ponto e vírgula (;). Exemplo: ```4d COPY DOCUMENT("folder1\\name1";"folder2\\" ; "new") ``` -Some commands are attached to collections or objects, in which case they are named methods and are used using the dot notation. For example: +Alguns comandos são anexados à coleções ou objetos, em cujo caso são métodos temporais que se utilizam com a notação de pontos. Por exemplo: ```4d $c:=New collection(1;2;3;4;5) @@ -66,75 +66,75 @@ $nc:=$c.slice(0;3) //$nc=[1,2,3] $lastEmployee:=$employee.last() ``` -You can use 4D plug-ins or 4D components that add new commands to your 4D development environment. +Pode utilizar os plug-ins ou os componentes 4D que adicionem novos comandos a seu entorno de desenvolvimento 4D. -There are many plug-ins proposed by the 4D user community or 3rd-party developers on the market. For example, using the [4d-plugin-pdf-pages](https://github.com/miyako/4d-plugin-pdf-pages) on macOS: +Há vários plug-ins propostos pela comunidade de usuários 4D ou desenvolvedores de terceira parte no mercado. Por exemplo, usar [4d-plugin-pdf-pages](https://github.com/miyako/4d-plugin-pdf-pages) em macOS: ```4d PDF REMOVE PAGE(path;page) ``` -4D SVG is an example of a utility component extending the capabilities of your application: +4D SVG é um exemplo de componente utilitário que aumenta as capacidades de sua aplicação: ```4d -//drawing a picture +//desenhar uma imagem svgRef:=SVG_New objectRef:=SVG_New_arc(svgRef;100;100;90;90;180) ``` - -4D SVG is included in 4D. +4D SVG é incluído em 4D. ## Constants -4D proposes an extensed set of predefined constants, whose values are accessible by name. For example, `Read Mode` is a constant (value 2). Predefined constants appear underlined by default in the 4D Method editor. They allow writing more readable code. +4D oferece um conjunto extensivo de constantes predefinidas, cujos valores são acessíveis por nome. Por exemplo, `Read Mode` é uma constante (valor 2). As constantes pré-definidas aparecem sublinhadas como padrão no editor de métodos 4D. Isso permite escrever código mais legível. ```4d -vRef:=Open document("PassFile";"TEXT";Read Mode) // open doc in read only mode +vRef:=Open document("PassFile";"TEXT";Read Mode) // abre documento em modo apenas leitura ``` -## Methods +## Métodos -4D provides a large number of built-in methods (or commands) but also lets you can create your own **project methods**. Project methods are user-defined methods that contain commands, operators, and other parts of the language. Project methods are generic methods, but there are other kinds of methods: Object methods, Form methods, Table methods (Triggers), and Database methods. +4D oferece un grande número de métodos (ou comandos) integrados, mas também lhe permite criar seus próprios **métodos de projeto**. Os métodos de projeto são métodos definidos pelo usuário que contenham comandos, operadores e outras partes da linguaje. Los métodos projeto são métodos genéricos, mas há outros tipos de métodos: métodos objeto, métodos formulário, métodos tabela (Triggers) e métodos base. -A method is composed of statements; each statement consists of one line in the method. A statement performs an action, and may be simple or complex. +Um método projeto é composto de várias linhas de instruções, cada uma das quais consta de uma linha no método. Uma linha de instrução realiza uma ação e pode ser simples ou complexa. -For example, the following line is a statement that will display a confirmation dialog box: +Por exemplo, a linha abaixo é uma declaração que mostará uma caixa de diálogo de confirmação: ```4d -CONFIRM("Do you really want to close this account?";"Yes";"No") +CONFIRM("Quer realmente fechar esta conta?"; "Sím"; "Não") ``` -A method also contains tests and loops that control the flow of the execution. 4D methods support `If...Else...End if` and `Case of...Else...End case` branching structures as well as looping structures: `While...End while`, `Repeat...Until`, `For...End for`, and `For each...End for each`: +Um método também contém testes e loops que controlam o fluxo da execução. Os métodos 4D são compatíveis com estruturas `If... End if` e `Case of... End case`, assim como os loops: `While... End while`, `Repeat... Until`, `For... End for`, e `For each... End for each`: -The following example goes through all the characters of the text vtSomeText: +O exemplo abaixo recorre todos os caracteres do texto vtSomeText: ```4d -For($vlChar;1;Length(vtSomeText)) - //Do something with the character if it is a TAB - If(Character code(vtSomeText[[$vlChar]])=Tab) - //... - End if -End for +For ($vCounter;1;100) +/* +comentarios + /* + outros comentarios + */ +*/ +... + End for ``` -A project method can call another project method with or without parameters (arguments). The parameters are passed to the method in parentheses, following the name of the method. Each parameter is separated from the next by a semicolon (;). The parameters are available within the called method as consecutively numbered local variables: $1, $2,…, $n. A method can return a single value in the $0 parameter. When you call a method, you just type its name: +Um método projeto pode chamar a outro método projeto com ou sem parâmetros (argumentos). Os parâmetros se passam ao método entre parêntesis, depois do nome do método. Cada parâmetro está separado do próximo por um ponto e vírgula (;). Os parâmetros estão disponíveis dentro do método chamado como variáveis locais numeradas sequencialmente: $1, $2,..., $n. Um método pode devolver um único valor no parâmetro $0. Quando chamar um método, apenas digite seu nome: ```4d -$myText:="hello" -$myText:=Do_Something($myText) //Call the Do_Something method -ALERT($myText) //"HELLO" - - //Here the code of the method Do_Something -$0:=Uppercase($1) +$f:=New object +$f.message:=New formula(ALERT("Hello world!")) +$f.message() //displays "Hello world!" ``` -## Data Types -In the language, the various types of data that can be handled are referred to as data types. There are basic data types (string, numeric, date, time, Boolean, picture, pointers, arrays), and also composite data types (BLOBs, objects, collections). +## Tipos de dados + +Na linguagem, os diferentes tipos de dados que podem ser manejados são denominados tipos de dados. Existem tipos de dados básicos (string, numérico, data, hora, booleano, imagem, ponteiros, arrays), e também tipos de dados compostos (BLOBs, objetos, coleções). -Note that string and numeric data types can be associated with more than one type of field. When data is put into a field, the language automatically converts the data to the correct type for the field. For example, if an integer field is used, its data is automatically treated as numeric. In other words, you need not worry about mixing similar field types when using the language; it will manage them for you. +Lembre que os dados de tipo string e numérico podem ser associados a mais de um tipo de campo. Quando são introduzidos dados em um campo, a linguagem converte automaticamente os dados no tipo correto para o campo. Por exemplo, se um campo inteiro for usado, seus dados são tratados automaticamente como numéricos. Em outras palavras não precisa se preocupar sobre misturar tipos de campos similares quando usando a linguagem; vai ser gerenciada por você. -However, when using the language it is important that you do not mix different data types. In the same way that it makes no sense to store “ABC” in a Date field, it makes no sense to put “ABC” in a variable used for dates. In most cases, 4D is very tolerant and will try to make sense of what you are doing. For example, if you add a number to a date, 4D will assume that you want to add that number of days to the date, but if you try to add a string to a date, 4D will tell you that the operation cannot work. +Entretanto, quando usar a linguagem é importante que não misture diferentes tipos de dados. Da mesma forma que não tem sentido armazenar "ABC" em um campo de data, tampouco tem sentido por "ABC" em uma variável utilizada para datas. Na maioria dos casos, 4D é muito tolerante e tentará dar sentido ao que está fazendo. For example, if you add a number to a date, 4D will assume that you want to add that number of days to the date, but if you try to add a string to a date, 4D will tell you that the operation cannot work. There are cases in which you need to store data as one type and use it as another type. The language contains a full complement of commands that let you convert from one data type to another. For example, you may need to create a part number that starts with a number and ends with characters such as “abc”. In this case, you might write: @@ -142,13 +142,13 @@ There are cases in which you need to store data as one type and use it as anothe [Products]Part Number:=String(Number)+"abc" ``` -If *Number* is 17, then *[Products]Part Number* will get the string “17abc”. +If _Number_ is 17, then _[Products]Part Number_ will get the string “17abc”. The data types are fully defined in the section [Data Types](Concepts/data-types.md). ## Objects and collections -You can handle 4D language objects and collections using the object notation to get or to set their values. For example: +You can handle 4D language objects and collections using the object notation to get or to set their values. Por exemplo: ```4d employee.name:="Smith" @@ -160,7 +160,7 @@ You can also use a string within square brackets, for example: $vName:=employee["name"] ``` -Since an object property value can be an object or a collection, object notation accepts a sequence of symbols to access sub-properties, for example: +Uma vez que um valor de propriedade de objeto pode ser um objeto ou uma coleção, a notação de objeto aceita uma sequência de símbolos para acessar subpropriedades, por exemplo: ```4d $vAge:=employee.children[2].age @@ -168,10 +168,12 @@ $vAge:=employee.children[2].age Note that if the object property value is an object that encapsulates a method (a formula), you need to add parenthesis () to the property name to execute the method: - $f:=New object - $f.message:=New formula(ALERT("Hello world!")) - $f.message() //displays "Hello world!" - +``` +$f:=New object +$f.message:=New formula(ALERT("Hello world!")) +$f.message() //displays "Hello world!" +$f.message() //displays "Hello world!" +``` To access a collection element, you have to pass the element number embedded in square brackets: @@ -181,25 +183,23 @@ myColl:=New collection("A";"B";1;2;Current time) myColl[3] //access to 4th element of the collection ``` -## Operators - +## Operadores When you use the language, it is rare that you will simply want a piece of data. It is more likely that you will want to do something to or with that data. You perform such calculations with operators. Operators, in general, take two pieces of data and perform an operation on them that results in a new piece of data. You are already familiar with many operators. For example, 1 + 2 uses the addition (or plus sign) operator to add two numbers together, and the result is 3. This table shows some familiar numeric operators: -| Operator | Operation | Example | -| -------- | -------------- | ------------------ | -| + | Addition | 1 + 2 results in 3 | -| – | Subtraction | 3 – 2 results in 1 | -| * | Multiplication | 2 * 3 results in 6 | -| / | Division | 6 / 2 results in 3 | - +| Operator | Operação | Exemplo | +| -------- | ------------- | ------------------ | +| + | Addition | 1 + 2 results in 3 | +| – | Subtração | 3 – 2 results in 1 | +| * | Multiplicação | 2 * 3 results in 6 | +| / | Division | 6 / 2 results in 3 | Numeric operators are just one type of operator available to you. 4D supports many different types of data, such as numbers, text, dates, and pictures, so there are operators that perform operations on these different data types. The same symbols are often used for different operations, depending on the data type. For example, the plus sign (+) performs different operations with different data: -| Data Type | Operation | Example | +| Tipo de dados | Operação | Exemplo | | --------------- | ------------- | ---------------------------------------------------------------------------------------------------- | -| Number | Addition | 1 + 2 adds the numbers and results in 3 | +| Número | Addition | 1 + 2 adds the numbers and results in 3 | | String | Concatenation | “Hello ” + “there” concatenates (joins together) the strings and results in “Hello there” | | Date and Number | Date addition | !1989-01-01! + 20 adds 20 days to the date January 1, 1989, and results in the date January 21, 1989 | @@ -218,64 +218,59 @@ Expressions rarely “stand alone.” There are several places in 4D where an ex - Debugger where the value of expressions can be checked - Quick Report editor as a formula for a column -### Expression types +### Expression types You refer to an expression by the data type it returns. There are several expression types. The following table gives examples of each type of expression. -| Expression | Type | Description | +| Expressão | Type | Descrição | | ------------------------ | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | “Hello” | String | The word Hello is a string constant, indicated by the double quotation marks. | | “Hello ” + “there” | String | Two strings, “Hello ” and “there”, are added together (concatenated) with the string concatenation operator (+). The string “Hello there” is returned. | | “Mr. ” + [People]Name | String | Two strings are concatenated: the string “Mr. ” and the current value of the Name field in the People table. If the field contains “Smith”, the expression returns “Mr. Smith”. | | Uppercase("smith") | String | This expression uses `Uppercase`, a command from the language, to convert the string “smith” to uppercase. It returns “SMITH”. | -| 4 | Number | This is a number constant, 4. | -| 4 * 2 | Number | Two numbers, 4 and 2, are multiplied using the multiplication operator (*). The result is the number 8. | -| myButton | Number | This is a variable associated to a button. It returns the current value of the button: 1 if it was clicked, 0 if not. | +| 4 | Número | This is a number constant, 4. | +| 4 * 2 | Número | Two numbers, 4 and 2, are multiplied using the multiplication operator (*). The result is the number 8. | +| myButton | Número | This is a variable associated to a button. It returns the current value of the button: 1 if it was clicked, 0 if not. | | !1997-01-25! | Date | This is a date constant for the date 1/25/97 (January 25, 1997). | | Current date+ 30 | Date | This is a date expression that uses the `Current date` command to get today’s date. It adds 30 days to today’s date and returns the new date. | -| ?8:05:30? | Time | This is a time constant that represents 8 hours, 5 minutes, and 30 seconds. | -| ?2:03:04? + ?1:02:03? | Time | This expression adds two times together and returns the time 3:05:07. | -| True | Boolean | This command returns the Boolean value TRUE. | -| 10 # 20 | Boolean | This is a logical comparison between two numbers. The number sign (#) means “is not equal to”. Since 10 “is not equal to” 20, the expression returns TRUE. | -| “ABC” = “XYZ” | Boolean | This is a logical comparison between two strings. They are not equal, so the expression returns FALSE. | -| My Picture + 50 | Picture | This expression takes the picture in My Picture, moves it 50 pixels to the right, and returns the resulting picture. | -| ->[People]Name | Pointer | This expression returns a pointer to the field called [People]Name. | -| Table (1) | Pointer | This is a command that returns a pointer to the first table. | -| JSON Parse (MyString) | Object | This is a command that returns MyString as an object (if proper format) | -| JSON Parse (MyJSONArray) | Collection | This is a command that returns MyJSONArray as a collection (if proper format) | +| ?8:05:30? | Hora | This is a time constant that represents 8 hours, 5 minutes, and 30 seconds. | +| ?2:03:04? + ?1:02:03? | Hora | This expression adds two times together and returns the time 3:05:07. | +| True | Booleano | This command returns the Boolean value TRUE. | +| 10 # 20 | Booleano | This is a logical comparison between two numbers. The number sign (#) means “is not equal to”. Since 10 “is not equal to” 20, the expression returns TRUE. | +| “ABC” = “XYZ” | Booleano | This is a logical comparison between two strings. They are not equal, so the expression returns FALSE. | +| My Picture + 50 | Imagem | This expression takes the picture in My Picture, moves it 50 pixels to the right, and returns the resulting picture. | +| ->[People]Name | Ponteiro | This expression returns a pointer to the field called [People]Name. | +| Table(1) | Ponteiro | This is a command that returns a pointer to the first table. | +| JSON Parse (MyString) | Objeto | This is a command that returns MyString as an object (if proper format) | +| JSON Parse (MyJSONArray) | Coleção | This is a command that returns MyJSONArray as a collection (if proper format) | | Form.pageNumber | Object property | An object property is an expression that can be of any supported type | | Col[5] | Collection element | A collection element is an expression that can be of any supported type | | $entitySel[0] | Entity | A element of an ORDA entity selection is an expression of the entity type. This kind of expression is **non-assignable** | - ### Assignable vs non-assignable expressions -An expression can simply be a literal constant, such as the number 4 or the string "Hello", or a variable like `$myButton`. It can also use operators. For example, 4 + 2 is an expression that uses the addition operator to add two numbers together and return the result 6. In any cases, these expressions are **non-assignable**, which means that you cannot assign a value to them. In 4D, expressions can be **assignable**. An expression is assignable when it can be used on the right side of an assignation. For example: +An expression can simply be a literal constant, such as the number 4 or the string "Hello", or a variable like `$myButton`. It can also use operators. For example, 4 + 2 is an expression that uses the addition operator to add two numbers together and return the result 6. In any cases, these expressions are **non-assignable**, which means that you cannot assign a value to them. In 4D, expressions can be **assignable**. An expression is assignable when it can be used on the left side of an assignation. Por exemplo: -```4d +```4d //$myVar variable is assignable, you can write: $myVar:="Hello" //assign "Hello" to myVar -//Form.pageNumber is assignable, you can write: -Form.pageNumber:=10 //assign 10 to Form.pageNumber -//Form.pageTotal-Form.pageNumber is not assignable: -Form.pageTotal- Form.pageNumber:=10 //error, non-assignable +//Form.pageNumber is assignable, you can write: Form.pageNumber:=10 //assign 10 to Form.pageNumber +//Form.pageTotal-Form.pageNumber is not assignable: Form.pageTotal- Form.pageNumber:=10 //error, non-assignable ``` - In general, expressions that use an operator are non-assignable. For example, `[Person]FirstName+" "+[Person]LastName` is not assignable. -## Pointers + +## Ponteiro The 4D language provides an advanced implementation of pointers, that allow writing powerful and modular code. You can use pointers to reference tables, fields, variables, arrays, and array elements. A pointer to an element is created by adding a "->" symbol before the element name, and can be dereferenced by adding the "->" symbol after the pointer name. ```4d -MyVar:="Hello" -MyPointer:=->MyVar -ALERT(MyPointer->) +MyVar:="Hello" MyPointer:=->MyVar ALERT(MyPointer->) ``` -## Comments +## Comentários Comments are inactive lines of code. These lines are not interpreted by the 4D language and are not executed when the code is called. @@ -288,11 +283,10 @@ Both styles of comments can be used simultaneously. #### Single line comments (//) -Insert `//` at the beginning of a line or after a statement to add a single line comment. Example: +Insert `//` at the beginning of a line or after a statement to add a single line comment. Exemplo: ```4d -//This is a comment -For($vCounter;1;100) //Starting loop +//This is a comment For($vCounter;1;100) //Starting loop //comment //comment //comment @@ -303,7 +297,7 @@ For($vCounter;1;100) //Starting loop Surround contents with `/*` ... `*/` characters to create inline comments or multiline comment blocks. Both inline and multiline comment blocks begin with `/*` and end with `*/`. -- **Inline comments** can be inserted anywhere in the code. Example: +- **Inline comments** can be inserted anywhere in the code. Exemplo: ```4d For /* inline comment */ ($vCounter;1;100) @@ -311,16 +305,16 @@ For /* inline comment */ ($vCounter;1;100) End for ``` -- **Multiline comment blocks** allows commenting an unlimited number of lines. Comment blocks can be nested (useful since the 4D code editor supports block collapsing). Example: +- **Multiline comment blocks** allows commenting an unlimited number of lines. Comment blocks can be nested (useful since the 4D code editor supports block collapsing). Exemplo: ```4d For ($vCounter;1;100) /* -comments +comentarios /* - other comments + outros comentarios */ */ ... End for -``` \ No newline at end of file +``` diff --git a/website/translated_docs/pt/Concepts/shared.md b/website/translated_docs/pt/Concepts/shared.md index c1dd321d753cdf..ef73b1f4bb81cd 100644 --- a/website/translated_docs/pt/Concepts/shared.md +++ b/website/translated_docs/pt/Concepts/shared.md @@ -3,8 +3,7 @@ id: shared title: Shared objects and collections --- -## Overview - +## Visão Geral **Shared objects** and **shared collections** are specific [objects](Concepts/dt_object.md) and [collections](Concepts/dt_collection.md) whose contents are shared between processes. In contrast to [interprocess variables](Concepts/variables.md#interprocess-variables), shared objects and shared collections have the advantage of being compatible with **preemptive 4D processes**: they can be passed by reference as parameters to commands such as `New process` or `CALL WORKER`. Shared objects and shared collections can be stored in variables declared with standard `C_OBJECT` and `C_COLLECTION` commands, but must be instantiated using specific commands: @@ -14,22 +13,20 @@ Shared objects and shared collections can be stored in variables declared with s **Note:** Shared objects and collections can be set as properties of standard (not shared) objects or collections. -In order to modify a shared object/collection, the **Use...End use** structure must be called. Reading a shared object/collection value does not require **Use...End use**. - -A unique, global catalog returned by the `Storage` command is always available throughout the database and its components, and can be used to store all shared objects and collections. +In order to modify a shared object/collection, the **Use... End use** structure must be called. Reading a shared object/collection value does not require **Use... End use**. -## Using shared objects or collections +Um catálogo único e global devolvido pelo comando `Storage` está sempre disponível em todo o banco de dados e seus componentes, e pode ser utilizado para armazenar todos os objetos e coleções compartidos. +## Utilização de objetos ou coleções compartidos Once instantiated with the `New shared object` or `New shared collection` commands, shared object/collection properties and elements can be modified or read from any process of the application. ### Modification - Modifications can be applied to shared objects and shared collections: - adding or removing object properties, - adding or editing values (provided they are supported in shared objects), including other shared objects or collections (which creates a shared group, see below). -However, all modification instructions in a shared object or collection must be surrounded by the `Use...End use` keywords, otherwise an error is generated. +However, all modification instructions in a shared object or collection must be surrounded by the `Use... End use` keywords, otherwise an error is generated. ```4d $s_obj:=New shared object("prop1";"alpha") @@ -38,11 +35,11 @@ However, all modification instructions in a shared object or collection must be End Use ``` -A shared object/collection can only be modified by one process at a time. `Use` locks the shared object/collection from other threads, while the last `End use` unlocks all objects and collections. Trying to modify a shared object/collection without at least one `Use...End use` generates an error. When a process calls `Use...End use` on a shared object/collection that is already in use by another process, it is simply put on hold until the `End use` unlocks it (no error is generated). Consequently, instructions within `Use...End use` structures should execute quickly and unlock the elements as soon as possible. Thus, it is strongly advised to avoid modifying a shared object or collection directly from the interface, e.g. through a dialog box. +A shared object/collection can only be modified by one process at a time. `Use` bloqueia o objeto/coleção compartido para outras threads, enquanto que o último `End use` desbloqueia todos os objetos e coleções. Trying to modify a shared object/collection without at least one `Use... End use` generates an error. When a process calls `Use... End use` on a shared object/collection that is already in use by another process, it is simply put on hold until the `End use` unlocks it (no error is generated). Consequently, instructions within `Use... End use` structures should execute quickly and unlock the elements as soon as possible. Thus, it is strongly advised to avoid modifying a shared object or collection directly from the interface, e.g. through a dialog box. Assigning shared objects/collections to properties or elements of other shared objects/collections is allowed and creates **shared groups**. A shared group is automatically created when a shared object/collection is set as property value or element of another shared object/collection. Shared groups allow nesting shared objects and collections but enforce additional rules: -- Calling `Use` on a shared object/collection of a group will lock properties/elements of all shared objects/collections belonging to the same group. +- Ao chamar a `Use` em um objeto/colección compartido de um grupo se bloquearão as propriedades/elementos de todos os objetos/coleções compartidos que pertençam ao mesmo grupo. - A shared object/collection can only belong to one shared group. An error is returned if you try to set an already grouped shared object/collection to a different group. - Grouped shared objects/collections cannot be ungrouped. Once included in a shared group, a shared object/collection is linked permanently to that group during the whole session. Even if all references of an object/collection are removed from the parent object/collection, they will remain linked. @@ -50,27 +47,23 @@ Please refer to example 2 for an illustration of shared group rules. **Note:** Shared groups are managed through an internal property named *locking identifier*. For detailed information on this value, please refer to the 4D Developer's guide. -### Read +### Leitura +Reading properties or elements of a shared object/collection is allowed without having to call the `Use... End use` structure, even if the shared object/collection is in use by another process. -Reading properties or elements of a shared object/collection is allowed without having to call the `Use...End use` structure, even if the shared object/collection is in use by another process. - -However, it is necessary to read a shared object/collection within `Use...End use` when several values are linked together and must be read at once, for consistency reasons. +However, it is necessary to read a shared object/collection within `Use... End use` when several values are linked together and must be read at once, for consistency reasons. ### Duplication - Calling `OB Copy` with a shared object (or with an object containing shared object(s) as properties) is possible, but will return a standard (not shared) object including its contained objects (if any). ### Storage - **Storage** is a unique shared object, automatically available on each application and machine. This shared object is returned by the `Storage` command. You can use this object to reference all shared objects/collections defined during the session that you want to be available from any preemptive or standard processes. Note that, unlike standard shared objects, the `storage` object does not create a shared group when shared objects/collections are added as its properties. This exception allows the **Storage** object to be used without locking all connected shared objects or collections. For more information, refer to the `Storage` command description. -## Use...End use - -The formal syntax of the `Use...End use` structure is: +## Use... End use +The formal syntax of the `Use... End use` structure is: ```4d Use(Shared_object_or_Shared_collection) @@ -78,20 +71,21 @@ The formal syntax of the `Use...End use` structure is: End use ``` -The `Use...End use` structure defines a sequence of statements that will execute tasks on the *Shared_object_or_Shared_collection* parameter under the protection of an internal semaphore. *Shared_object_or_Shared_collection* can be any valid shared object or shared collection. +The `Use... End use` structure defines a sequence of statements that will execute tasks on the *Shared_object_or_Shared_collection* parameter under the protection of an internal semaphore. *Shared_object_or_Shared_collection* can be any valid shared object or shared collection. -Shared objects and shared collections are designed to allow communication between processes, in particular, **preemptive 4D processes**. They can be passed by reference as parameters from a process to another one. For detailed information on shared objects or shared collections, refer to the **Shared objects and shared collections** page. Surrounding modifications on shared objects or shared collections by the `Use...End use` keywords is mandatory to prevent concurrent access between processes. +Shared objects and shared collections are designed to allow communication between processes, in particular, **preemptive 4D processes**. They can be passed by reference as parameters from a process to another one. For detailed information on shared objects or shared collections, refer to the **Shared objects and shared collections** page. Surrounding modifications on shared objects or shared collections by the `Use... End use` keywords is mandatory to prevent concurrent access between processes. -- Once the **Use** line is successfully executed, all *Shared_object_or_Shared_collection* properties/elements are locked for all other process in write access until the corresponding `End use` line is executed. -- The *statement(s)* sequence can execute any modification on the Shared_object_or_Shared_collection properties/elements without risk of concurrent access. -- If another shared object or collection is added as a property of the *Shared_object_or_Shared_collection* parameter, they become connected within the same shared group (see **Using shared objects or collections**). -- If another process tries to access one of the *Shared_object_or_Shared_collection* properties or connected properties while a **Use...End use** sequence is being executed, it is automatically put on hold and waits until the current sequence is terminated. -- The **End use** line unlocks the *Shared_object_or_Shared_collection* properties and all objects sharing the same locking identifier. -- Several **Use...End use** structures can be nested in the 4D code. In that case, all locks are stacked and properties/elements will be released only when the last End use call is executed. +- Once the **Use** line is successfully executed, all _Shared_object_or_Shared_collection_ properties/elements are locked for all other process in write access until the corresponding `End use` line is executed. +- The _statement(s)_ sequence can execute any modification on the Shared_object_or_Shared_collection properties/elements without risk of concurrent access. +- If another shared object or collection is added as a property of the _Shared_object_or_Shared_collection_ parameter, they become connected within the same shared group (see **Using shared objects or collections**). +- If another process tries to access one of the _Shared_object_or_Shared_collection_ properties or connected properties while a **Use... End use** sequence is being executed, it is automatically put on hold and waits until the current sequence is terminated. +- A linha **End use** desbloqueia as propriedades _Shared_object_or_Shared_collection_ e todos os objetos que compartem o mesmo identificador de bloqueio. +- Several **Use... End use** structures can be nested in the 4D code. Nesse caso, todos os bloqueios são empilhados e as propriedades/elementos se libertarão só quando se execute a última chamada de End use. **Note:** If a collection method modifies a shared collection, an internal **Use** is automatically called for this shared collection while the function is executed. -## Example 1 + +## Exemplo 1 You want to launch several processes that perform an inventory task on different products and update the same shared object. The main process instantiates an empty shared object and then, launches the other processes, passing the shared object and the products to count as parameters: @@ -128,7 +122,7 @@ In the "HowMany" method, inventory is done and the $inventory shared object is u End use ``` -## Example 2 +## Exemplo 2 The following examples highlight specific rules when handling shared groups: @@ -160,4 +154,4 @@ The following examples highlight specific rules when handling shared groups: //$ob4 still belongs to group 2 //assignment is not allowed End use -``` \ No newline at end of file +``` diff --git a/website/translated_docs/pt/Concepts/variables.md b/website/translated_docs/pt/Concepts/variables.md index b28455cd8c79d6..0538a586010f6c 100644 --- a/website/translated_docs/pt/Concepts/variables.md +++ b/website/translated_docs/pt/Concepts/variables.md @@ -1,6 +1,6 @@ --- id: variables -title: Variables +title: Variáveis --- Data in 4D is stored in two fundamentally different ways. **Fields** store data permanently on disk; **variables** store data temporarily in memory. @@ -9,11 +9,11 @@ When you set up your 4D database, you specify the names and types of fields that Variables are language objects; you can create and use variables that will never appear on the screen. In your forms, you can display variables (except Pointer and BLOB) on the screen, enter data into them, and print them in reports. In this way, enterable and non-enterable area variables act just like fields, and the same built-in controls are available when you create them. Form variables can also control buttons, list boxes, scrollable areas, picture buttons, and so on, or display results of calculations that do not need to be saved. -## Creating Variables +## Criação de variáveis -You create variables by declaring them using one of the "Compiler" or "Arrays" theme commands. +Você cria as variáveis declarando-as mediante um dos comandos dos temas "Compilador" ou "Arrays". -**Note:**Arrays are a particular type of variables. An array is an ordered series of variables of the same type. For more information, please refer to [Arrays](Concepts/arrays.md). +**Nota:**os arrays são um tipo particular de variáveis. Um array é uma série ordenada de variáveis do mesmo tipo. For more information, please refer to [Arrays](Concepts/arrays.md). For example, if you want to define a text variable, you write: @@ -21,13 +21,13 @@ For example, if you want to define a text variable, you write: C_TEXT(myText) ``` -**Note:** Although it is usually not recommended, you can create variables simply by using them; you do not necessarily need to formally define them as you do with fields. For example, if you want to create a variable that will hold the current date plus 30 days, you can write: +**Nota:** apesar de não recomendado, pode criar variáveis simplesmente usando-as; não precisa definir as variáveis formalmente como se faz com os campos. Por exemplo, se quiser criar uma variável que contenha a data atual mais 30 dias, pode escrever: ```4d - MyDate:=Current date+30 //MyDate is created and gets the current date plus 30 days + MyDate:=Current date+30 //MyDate é criada e obtém a data atual mais 30 días ``` -Once created, you can use a variable wherever you need it in your database. For example, you might need to store the text variable in a field of same type: +Após a criação pode usar a variável onde quiser no seu banco de dados. Por exemplo, pode precisar armazenar a variável texto em um campo do mesmo tipo ```4d [MyTable]MyField:=MyText @@ -36,33 +36,34 @@ Once created, you can use a variable wherever you need it in your database. For The following are some basic variable declarations: ```4d -
    C_BLOB(vxMyBlob) // The process variable vxMyBlob is declared as a variable of type BLOB - C_DATE($vdCurDate) // The local variable $vdCurDate is declared as a variable of type Date - C_LONGINT(vg1;vg2;vg3) // The 3 process variables vg1, vg2 and vg3 are declared as variables of type longint - C_OBJECT($vObj) // The local variable $vObj is declared as a variable of type Object - C_COLLECTION($vCol) // The local variable $vCol is declared as a variable of type Collection - ARRAY LONGINT(alAnArray;10) //The process alAnArray variable is declared as a Longint array of 10 elements + + C_BLOB(vxMyBlob) // A variável processo vxMyBlob se declara como uma variável de tipo BLOB + C_DATE($vdCurDate) // A variável local $vdCurDate se declara como uma variável de tipo Data + C_LONGINT(vg1;vg2;vg3) // As 3 variáveis de processo vg1, vg2 y vg3 se declaram como variáveis de tipo Inteiro longo + C_OBJECT($vObj) // A variável local $vObj se declara como uma variável de tipo Objeto + C_COLLECTION($vCol) // A variável local $vCol se declara como uma variáve de tipo Coleção + ARRAY LONGINT(alAnArray;10) //A variável do processo alAnArray se declara como um array Inteiro longo de 10 elementos ``` ## Assigning Data Data can be put into and copied out of variables and arrays. Putting data into a variable is called **assigning the data to the variable** and is done with the assignment operator (:=). The assignment operator is also used to assign data to fields. -The assignment operator is the primary way to create a variable and to put data into it. You write the name of the variable that you want to create on the left side of the assignment operator. For example: +O operador de atribuição é a maneira mais importante de criar uma variável e jogar dados nela. You write the name of the variable that you want to create on the left side of the assignment operator. Por exemplo: ```4d MyNumber:=3 ``` -creates the variable *MyNumber* and puts the number 3 into it. If MyNumber already exists, then the number 3 is just put into it. +creates the variable _MyNumber_ and puts the number 3 into it. If MyNumber already exists, then the number 3 is just put into it. -Of course, variables would not be very useful if you could not get data out of them. Once again, you use the assignment operator. If you need to put the value of MyNumber in a field called [Products]Size, you would write *MyNumber* on the right side of the assignment operator: +Of course, variables would not be very useful if you could not get data out of them. Once again, you use the assignment operator. If you need to put the value of MyNumber in a field called [Products]Size, you would write _MyNumber_ on the right side of the assignment operator: ```4d [Products]Size:=MyNumber ``` -In this case, *[Products]Size* would be equal to 3. This example is rather simple, but it illustrates the fundamental way that data is transferred from one place to another by using the language. +In this case, _[Products]Size_ would be equal to 3. This example is rather simple, but it illustrates the fundamental way that data is transferred from one place to another by using the language. You assign data to array elements by using curly braces ({...}): @@ -86,9 +87,9 @@ You may want to use a local variable to: The name of a local variable always starts with a dollar sign ($) and can contain up to 31 additional characters. If you enter a longer name, 4D truncates it to the appropriate length. -When you are working in a database with many methods and variables, you often find that you need to use a variable only within the method on which you are working. You can create and use a local variable in the method without worrying about whether you have used the same variable name somewhere else. +Quando trabalhar em um banco de dados com muitos métodos e variáveis, geralmente só precisa usar uma variável dentro do método no qual trabalha. You can create and use a local variable in the method without worrying about whether you have used the same variable name somewhere else. -Frequently, in a database, small pieces of information are needed from the user. The `Request` command can obtain this information. It displays a dialog box with a message prompting the user for a response. When the user enters the response, the command returns the information the user entered. You usually do not need to keep this information in your methods for very long. This is a typical way to use a local variable. Here is an example: +Frequentemente, em um banco de dados, pequenas pedaços de informação são necessários do usuário. The `Request` command can obtain this information. It displays a dialog box with a message prompting the user for a response. When the user enters the response, the command returns the information the user entered. You usually do not need to keep this information in your methods for very long. This is a typical way to use a local variable. This is a typical way to use a local variable. Aqui um exemplo simples: ```4d $vsID:=Request("Please enter your ID:") @@ -119,10 +120,10 @@ For more information, see the chapter **Processes** and the description of these ### Interprocess variables -Interprocess variables are available throughout the database and are shared across all cooperative processes. They are primarily used to share information between processes. +Variáveis interprocessos estão disponíveis pelo banco de dados e são partilhados entre os processos cooperativos. They are primarily used to share information between processes. > Use of interprocess variables is not recommended since they are not available from preemptive processes and tend to make the code less maintainable. The name of an interprocess variable always begins with the symbols (<>) — a “less than” sign followed by a “greater than” sign— followed by 31 characters. -In Client/Server, each machine (Client machines and Server machine) share the same definition of interprocess variables, but each machine has a different instance for each variable. \ No newline at end of file +In Client/Server, each machine (Client machines and Server machine) share the same definition of interprocess variables, but each machine has a different instance for each variable. diff --git a/website/translated_docs/pt/FormEditor/createStylesheet.md b/website/translated_docs/pt/FormEditor/createStylesheet.md index d70bc5acb87cc8..af3b4c90960113 100644 --- a/website/translated_docs/pt/FormEditor/createStylesheet.md +++ b/website/translated_docs/pt/FormEditor/createStylesheet.md @@ -1,188 +1,206 @@ --- id: stylesheets -title: Style sheets +title: Folhas de estilo --- -## Overview +## Visão Geral -A style sheet groups together a combination of attributes for form objects — from text attributes to nearly any available object attribute. +Uma folha de estilo agrupa junto uma combinação de atributos para objetos formulário - de atributos de texto a quase qualquer atributo de objeto disponível. -In addition to harmonizing an application's interface, style sheets provide three major advantages: +Além de harmonizar uma interface de aplicação, folhas de estilo oferecem três vantagens principais: -* Saves time during development: Each object has specific group of settings within a single operation. -* Facilitates maintenance: Style sheets modify the appearance of any objects that uses them, so changing the font size in a style sheet will change the font size for all of the objects that use this same style sheet. -* Controls multi-platform development: You can have a style sheets that apply to both macOS and Windows platforms, only macOS, or only Windows. When a style sheet is applied, 4D automatically uses the appropriate style sheet. +* Poupa tempo durante o desenvolvimento: cada objeto tem agrupamentos de configurações específicos dentro de uma única operação. +* Manutenção facilitada: folhas de estilo modificam a aparência de qualquer objeto que as usa, então mudar o tamanho de fonte em uma folha de estilo vai mudar o estilo de fonte para todos os objetos que usarem essa mesma folha de estilo. +* Controle de desenvolvimento multiplataforma: as folhas de estilo podem ser aplicadas para plataformas macOS e Windows, apenas macOS ou só Windows. Quando uma folha de estilo for aplicada, 4D automaticamente usa a folha de estilo apropriada. -### Style Sheet Files +### Arquivos folhas de estilo -4D accepts three, specific style sheet files: +4D aceita três arquivos específicos de folhas de estilo: -| Style Sheet | Platform | -| ----------------------- | ----------------------------------------------------- | -| styleSheets.css | Default global style sheet for both macOS and Windows | -| styleSheets_mac.css | For defining macOS only specific attribute styles | -| styleSheets_windows.css | For defining Windows only specific attribute styles | +| Folha de Estilo | Plataforma | +| ----------------------- | ------------------------------------------------------------------------ | +| styleSheets.css | Folha de estilo global para macOS e Windows | +| styleSheets_mac.css | Para definir os estilos de atributos específicos de macOS unicamente | +| styleSheets_windows.css | Para definir os estilos de atributos específicos para Windows unicamente | +Estes arquivos se armazenam na pasta "/SOURCES" do projeto. -These files are stored in the project's "/SOURCES" folder. -### Style Sheet Architecture +### Arquitetura das folhas de estilo -While adapted to meet the specific needs of 4D forms, style sheets for project databases generally follow CSS2 syntax and grammar. +Apesar de adaptadas para satisfazer às necessidades específicas dos formulários 4D, as folhas de estilo dos bancos de dados projeto geralmente seguem a sintaxe e a gramática CSS2. -Every style rule in a style sheet contains two parts: +Cada régua de estilo em uma folha de estilo contém duas partes: -* a *Selector* - A selector defines where to apply the style. 4D supports "object type", "object name", "class", "all objects", as well as "attribute value" selectors. +* a *Selector* - Um seletor define onde aplicar o estilo. 4D é compatível com os seletores "object type", "object name", "class", "all objects" e "attribute value". -* a *Declaration* - The declaration defines the actual style to apply. Multiple declaration lines can be grouped together to form a declaration block. Each line in a CSS declaration block must end with a semicolon, and the entire block must be surrounded by curly braces. +* uma *declaração* - A declaração define o estilo real a aplicar. Podem ser agrupadas várias linhas de declaração para formar um bloco de declaração. Cada linha de um bloco de declaração CSS deve terminar com um ponto e linha, e o bloco inteiro deve ser rodeado por chaves. -## Style Sheet Selectors -### Object Type -Corresponding to the CSS element selector, the object type defines the type of object to style. +## Seletores de folhas de estilo -Specify the object type, then in curly braces, declare the style(s) to apply. -> The object type corresponds to the JSON [type](FormObjects/properties_Object.md#type) property of form objects. +### Tipo de objeto -In the following example, all objects of the *button* type will display text in the Helvetica Neue font, with a size of 20 pixels: +O tipo de objeto define o tipo de objeto ao que vai aplicar o estilo, e corresponde ao seletor de elementos CSS. - button { - font-family: Helvetica Neue; - font-size: 20px; - } - +Especifique o tipo de objeto, depois entre chaves, declare os estilos a aplicar. -To apply the same style to multiple types of objects, specify the object types separated by a "," then in curly braces, declare the style(s) to apply: +> O tipo de objeto corresponde ao JSON [tipo](FormObjects/properties_Object.md#type) propriedade de objetos formulários. - text, input { - text-align: left; - stroke: grey; - } - +No exemplo abaixo, todos os objetos do tipo *button* vai exibir texto na fonte Helvetica Neue, com um tamanho de 20 píxels: -### Object Name +``` +button { + font-family: Helvetica Neue; + font-size: 20px; +} +``` -Corresponding to the CSS **ID selector**, the object name defines a specific object to style since the object's name is unique within the form. +Para aplicar o mesmo estilo para múltiplos tipos de objetos, especifique o tipo de objeto separado por um "," então em chaves, declare os estilos a aplicar: -Designate the object with a "#" character before the object's name, then in curly braces, declare the style(s) to apply. +``` +text, input { + text-align: left; + stroke: grey; +} +``` -In the following example, the text of the object with the name "okButton" will be displayed in Helvetica Neue font, with a size of 20 pixels: +### Nome de objeto - #okButton { - font-family: Helvetica Neue; - font-size: 20px; - } - +O nome de objeto corresponde ao **seletor de ID** CSS e define um objeto específico ao que há que dar estilo, já que o nome do objeto é único dentro do formulário. -### Class +Determine o objeto com um caractere '#' antes do nome de objeto, depois entre chaves, declare os estilos a aplicar. -Corresponding to the CSS **class selector**, the class defines the style for all form objects with the `class` attribute. +No exemplo abaio, o texto de objeto com o nome "okButton" será exibido em fonte Helvetica Neue, com um tamanho de 20 píxels: -You can specify the classes to use with a "." character followed by the name of the class, and in curly braces, declare the style(s) to apply. +``` +#okButton { + font-family: Helvetica Neue; + font-size: 20px; +} +``` -In the following example, the text of all objects with the `okButtons` class will be displayed in Helvetica Neue font, with a size of 20 pixels, aligned in the center: - .okButtons { - font-family: Helvetica Neue; - font-size: 20px; - text-align: center; - } - -To designate that a style should be applied only to objects of a distinct type, specify the type followed by "." and the name of the class, then in curly braces, declare the style(s) to apply. +### Classe - text.center { - text-align: center; - stroke: red; - } - +Class corresponde ao **selector class** CSS e define o estilo para todos os objetos formulário com o atributo `class`. -In the 4D form description, you associate a class name to an object using the `class` attribute. This attribute contains one or several class names, separated by a space character: +Pode especificar as classes a usar com um caractere "." seguido pelo nome da classe, e entre chaves, declare os estilos a aplicar. - class: "okButtons important" - +No exemplo abaixo, o texto de todos os objetos com o nome da classe `okButtons` se mostrará na fonte Helvetica Neue, com um tamanho de 20 píxels, alinhado ao centro: -### All Objects +``` +.okButtons { + font-family: Helvetica Neue; + font-size: 20px; + text-align: center; +} +``` -Corresponding to the CSS **universal selector**, the "*" character indicates that the following style will be applied to all objects on the form. +Para indicar que um estilo deve aplicar-se só aos objetos de um tipo determinado, especifique o tipo seguido de "." e o nome da classe, e depois, entre chaves, declare o estilo ou os estilos a aplicar. -Designate that a style should apply to all form objects with the "*" character, then in curly braces, declare the style(s) to apply. +``` +text.center { + text-align: center; + stroke: red; +} +``` -In the following example, all objects will have a gray fill: +Na descrição do formulário 4D, se associa um nome de classe a um objeto mediante o atributo `class`. Este atributo contém um ou vários nomes de classe, separados por um espaço: - * { - fill: gray; - } - +``` +class: "okButtons important" +``` -### Specific Attribute -Corresponding to the CSS **attribute selectors**, styles can be applied to all form objects with a specific attribute. +### Todos os objetos -Specify the attribute within brackets, then in curly braces, declare the style(s) to apply. +Em correspondência com o seletor CSS **universal**, o caractere "*" indica que o seguinte estilo se aplicará a todos os objetos do formulário. -#### Supported syntaxes +Indique que um estilo deve aplicar-se a todos os objetos formulário com o carácter "*" e, a seguir, entre chaves, declare os estilos que devem aplicar-se. -| Syntax | Description | -| ------------------------- | ------------------------------------------------------------------------------------------------------- | -| [attribute] | matches objects with the `attribute` | -| [attribute="value"] | matches objects with the `attribute` value containing exactly the specified "value" | -| [attribute~="value"] | matches objects with the `attribute` value containing the "value" among a space-separated list of words | -| [attribute|="value"] | matches objects with an `attribute` whose value starts with "value" | +No seguinte exemplo, todos os objetos terão um fundo cinza: +``` +* { + fill: gray; +} +``` -#### Examples -All objects with the `borderStyle` attribute will have purple lines: +### Atributos específicos - [borderStyle] - { - stroke: purple; - } - +Os estilos correspondentes aos **seletores de atributos** CSS se pedem aplicar a todos os objetos formulário com um atributo específico. -All objects of the text type with a text attribute whose value is "Hello" will have blue letters: +Especifique o tipo de atributo entre colchetes, depois entre chaves, declare os estilos a aplicar. - text[text=Hello] - { - stroke: blue; - } - +#### Sintaxes compatíveis -All objects with a text attribute whose value contains "Hello" will have blue lines: +| Sintaxe | Descrição | +| ------------------------- | -------------------------------------------------------------------------------------------------------------------------- | +| [attribute] | coincide com objetos com o `attribute` | +| [attribute="value"] | coincide com objetos cujo valor do `attribute` conteha exatamente o "valor" especificado | +| [attribute~="value"] | coincide com os objetos com o valor do `attribute` que contém o "valor" entre uma lista de palavras separadas por espaços | +| [attribute|="value"] | coincide com objetos com um `attribute` cujo valor começa por "valor" | - [text~=Hello] - { - stroke: blue; - } - - +#### Exemplos -All objects of the text type with a text attribute whose value starts with "Hello" will have yellow letters: +Todos os objetos com o atributo `borderStyle` terão línhas roxas: - text[text|=Hello] - { - stroke: yellow; - } - +``` +[borderStyle] +{ + stroke: purple; +} +``` -## Style Sheet Declarations +Todos os objetos de tipo texto com um atributo texto cujo valor seja "Hello" terão letras azuis: -The majority of form object attributes can be defined within a style sheet, except the following attributes: -- "method" -- "type" -- "class" -- "event" -- choiceList, excludedList, labels, list, requiredList (list type) +``` +text[text=Hello] +{ + stroke: blue; +} +``` -Form object attributes can be declared with their JSON name as CSS attributes (not including object types, methods, events, and lists). For more information, see the **Dynamic Forms** page in the Design Reference. +Todos os objetos de tipo texto cujos valores contenham "hello" terão linhas azuis: -### Attribute Mapping +``` +[text~=Hello] +{ + stroke: blue; +} -The attributes listed below are able to accept either the 4D name or the CSS name. +``` + +Todos os objetos do tipo texto com um atributo de texto cujo valor comece com "Hello" terão as letras amarelas: + +``` +text[text|=Hello] +{ + stroke: yellow; +} +``` + + +## Declarações de folhas de estilo + +A maioria dos atributos do objeto formulário podem ser definidos dentro de uma folha de estilo, exceto os seguintes atributos: + - "method" + - "type" + - "class" + - "event" + - choiceList, excludedList, labels, list, requiredList (list type) + +Os atributos de objeto formulário podem ser declarados com seu nome JSON como atributos CSS (sem incluir os tipos de objetos, métodos, eventos e listas). Para mais informação, consulte a página **Formulários dinâmicos** no Manual de Desenho. + +### Mapa de atributos + +Os atributos listados a continuação podem aceitar o nome 4D ou o nome CSS. | 4D | CSS | | -------------- | ---------------- | @@ -196,95 +214,106 @@ The attributes listed below are able to accept either the 4D name or the CSS nam | textAlign | text-align | | textDecoration | text-decoration | | verticalAlign | vertical-align | +> Os valores específicos 4D (*por exemplo, *, "sunken") não são compatíveis quando se utilizam nomes de atributos CSS. -> 4D-specific values (*e.g.*, "sunken") are not supported when using CSS attribute names. +### Valores de atributos específicos -### Specific Attribute Values +- Para os atributos `icon`, `picture` e `customBackgroundPicture` que são compatíveis com uma rota a uma imagem, a sintaxe é: -- For `icon`, `picture`, and `customBackgroundPicture` attributes that support a path to an image, the syntax is: +``` +icon: url("/RESOURCES/Images/Buttons/edit.png"); /* rota absoluta */ +icon: url("edit.png"); /* rota relativa ao arquivo de formulário */ +``` - icon: url("/RESOURCES/Images/Buttons/edit.png"); /* absolute path */ - icon: url("edit.png"); /* relative path to the form file */ - +- Para `fill`, `stroke` , `alternateFill` , `horizontalLineStroke` e `verticalLineStroke`, três sintaxes são compatíveis: -- For `fill`, `stroke` , `alternateFill` , `horizontalLineStroke` and `verticalLineStroke`, three syntaxes are supported: - - css color name: `fill: red;` - - hexa value: `fill: #FF0000;` - - the `rgb()` function: `fill:rgb(255,0,0)` -- If a string uses forbidden characters in CSS, you can surround the string with simple or double quotes. For example: - - - a xliff reference: `tooltip: ":xliff:CommonMenuFile";` - - a datasource with a field expression: `dataSource: "[Table_1:1]ID:1";` + - valor hexadécimal: `fill: #FF0000;` + - función `rgb()`: `fill:rgb(255,0,0)` + +- Se uma string utilizar caracteres proibidos em CSS, pode rodear a string com aspas simples ou duplas. Por exemplo: + - uma referencia xliff: `tooltip: ":xliff:CommonMenuFile";` + - um datasource com a expressão de campo: `dataSource: "[Table_1:1]ID:1";` + + +## Ordem de prioridade + +Os proetos 4D priorizam as definições de estilo em conflito, primeiro pela definição do formulário e depois pelas folhas de estilo. + + +### JSON vs Folha de estilo + +Se um atributo estiver definido na descrição do formulário JSON e em uma folha de estilo, 4D utilizará o valor do arquivo JSON. + +Para anular este comportamento, o valor do estilo deve ir seguido de uma declaração `!important`. + +**Exemplo 1:** + +| Descripción do formulário JSON | Folha de Estilo | 4D exibe | +| ------------------------------ | --------------- | ---------- | +| `"text": "Button",` | `text: Edit;` | `"Button"` | + + +**Exemplo 2:** + +| Descripción do formulário JSON | Folha de Estilo | 4D exibe | +| ------------------------------ | ------------------------ | -------- | +| `"text": "Button",` | `text: Edit !important;` | `"Edit"` | + + -## Priority Order +### Folhas de estilo múltiplas -4D projects prioritizes conflicting style definitions first by the form definition, then by the style sheets. +Durante a execução, 4D prioriza automaticamente as folhas de estilo na seguinte ordem: -### JSON vs Style Sheet +1. O formulário 4D carregará primeiro o arquivo CSS por padrão `/SOURCES/styleSheets.css`. +2. Depois carregará o arquivo CSS para a plataforma atual `/SOURCES/styleSheets_mac.css` o `/SOURCES/styleSheets_windows.css`. +3. Se existir, então carregará um arquivo CSS específico definido no formulário JSON: -If an attribute is defined in the JSON form description and a style sheet, 4D will use the value in the JSON file. + * um arquivo para ambas plataformas: -To override this behavior, the style value must be followed with an `!important` declaration. + ``` + "css": "" + ``` -**Example 1:** + * ou uma lista de arquivos para ambas plataformas: -| JSON form description | Style Sheet | 4D displays | -| --------------------- | ------------- | ----------- | -| `"text": "Button",` | `text: Edit;` | `"Button"` | + ``` + "css": [ + "", + "" + ], + ``` + * ou uma lista de arquivos por plataforma: -**Example 2:** + ``` + "css": [ + {"path": "", "media": "mac"}, + {"path": "", "media": "windows"}, + ], + ``` -| JSON form description | Style Sheet | 4D displays | -| --------------------- | ------------------------ | ----------- | -| `"text": "Button",` | `text: Edit !important;` | `"Edit"` | +> As rotas dos arquivos pedem ser relativas ou absolutas. * As rotas relativas se resolvem em relação com o arquivo de descrição do formulário JSON. * Por razões de segurança, só se aceitam as rotas do sistema de arquivos para as rotas absolutas. (*e.g.*, "/RESOURCES", "/DATA") -### Multiple Style Sheets -At runtime, 4D automatically prioritizes style sheets in the following order: -1. The 4D form will first load the default CSS file `/SOURCES/styleSheets.css`. -2. It will then load the CSS file for the current platform `/SOURCES/styleSheets_mac.css` or `/SOURCES/styleSheets_windows.css`. -3. If it exists, it will then load a specific CSS file defined in the JSON form: -* a file for both platforms: - - - "css": "" - -* or a list of files for both platforms: - - - "css": [ - "", - "" - ], -* or a list of files per platform: - - - "css": [ - {"path": "", "media": "mac"}, - {"path": "", "media": "windows"}, - ], - -> Filepaths can be relative or absolute. * Relative paths are resolved relative to the JSON form description file. * For security reasons, only filesystem paths are accepted for absolute paths. (*e.g.*, "/RESOURCES", "/DATA") +## Criação ou modificação de folhas de estilo -## Creating or Editing Style Sheets +Pode criar folhas de estilo utilizando seu editor de texto preferido e salvando o arquivo com extensão ".css" na pasta "/SOURCES" do projeto. -You can create style sheets using your preferred text editor and saving the file with a ".css" extension in the project's "/SOURCES" folder. +A caixa de ferramentas de 4D oferece uma página **Hojas de estilo** como opção de acesso direto para criar e editar uma das três folhas de estilo com nomes específicas da plataforma. -The 4D Tool Box provides a **Style Sheets** page as a shortcut option to create and edit one of three platform-specific named style sheets. +1. Abra a página **Estilos** escolhendo a **Caixa de ferramentas > Styles** do menu Design ou clique no ícone **Caixa de ferramentas** da barra de ferramentas do editor de formulários. -1. Open the **Style Sheets** page by choosing the **Tool Box > Style Sheet** from the Design menu or click on the **Tool Box** icon in the Form Editor toolbar. - ![](assets/en/FormEditor/stylesheets.png) -2. Select the type of style sheet to create and click on the **Create** or **Edit** button: ![](assets/en/FormEditor/createButton.png) +2. Selecione o tipo de folha de estilo que deseja criar E cliquer no botão **Criar** ou **Editar**: ![](assets/en/FormEditor/createButton.png) -3. The style sheet will open in your default text editor. \ No newline at end of file +3. A folha de estilo se abrirá em seu editor de texto predeterminado. diff --git a/website/translated_docs/pt/FormEditor/objectLibrary.md b/website/translated_docs/pt/FormEditor/objectLibrary.md index 377d7ebfcf7ccf..fd074078dd46ee 100644 --- a/website/translated_docs/pt/FormEditor/objectLibrary.md +++ b/website/translated_docs/pt/FormEditor/objectLibrary.md @@ -3,7 +3,7 @@ id: objectLibrary title: Object libraries --- -## Overview +## Visão Geral You can use object librairies in your forms. An object library offers a collection of preconfigured objects that can be used in your forms by simple or copy-paste or drag-and-drop. @@ -12,7 +12,8 @@ You can use object librairies in your forms. An object library offers a collecti - a standard, preconfigured object library, available in all your projects. - custom object librairies, that you can use to store your favorite form objects or full project forms. -## Using the standard object library + +## Utilização da biblioteca de objetos padrão The standard object library is available from the Form editor: click on the last button of the toolbar: ![](assets/en/FormEditor/library1.png) @@ -25,7 +26,7 @@ The window has the following main features: - Preview area with tips: The central area displays a preview of each object. You can hover on an object to obtain information about the object in a tip. - You can filter the window contents by using the **Categories** menu: ![](assets/en/FormEditor/library3.png) -- To use an object from the library to your form, you can either: +- To use an object from the library to your form, you can either: - right-click on an object and select **Copy** in the contextual menu - or drag and drop the object from the library The object is then added to the form. @@ -33,14 +34,16 @@ This library is read-only. If you want to edit default objects or create your ow All objects proposed in the standard object library are described on [this section on doc.4d.com](https://doc.4d.com/4Dv17R6/4D/17-R6/Library-objects.200-4354586.en.html). -## Creating and using custom object libraries -You can create and use custom object libraries in 4D. A custom object library is a 4D project where you can store your favorite objects (buttons, texts, pictures, etc.) You can then reuse these objects in different forms and different projects. +## Criar e utilizar bibliotecas de objetos personalizadas + +You can create and use custom object libraries in 4D. A custom object library is a 4D project where you can store your favorite objects (buttons, texts, pictures, etc.) You can then reuse these objects in different forms and different projects. You can then reuse these objects in different forms and different projects. Objects are stored with all their properties, including their object methods. Libraries are put together and used by simple drag-and-drop or copy-paste operations. Using libraries, you can build form object backgrounds grouped by graphic families, by behavior, etc. + ### Creating an object library To create an object library, select **New>Object Library...** from the 4D **File** menu or tool bar. A standard save file dialog box appears, which allows you to choose the name and the location of the object library. @@ -53,10 +56,9 @@ You can create as many libraries as desired per project. A library created and b ### Opening an object library -A given object library can only be opened by one database at a time. However, several different libraries can be opened in the same database. +Uma determinada biblioteca de objetos só pode ser aberta por um m banco de dados por vez. Entretanto, várias livrarias diferentes podem ser abertas no mesmo banco de dados. To open a custom object library, select **Open>Object Library...** command in the 4D **File** menu or tool bar. A standard open file dialog box appears, which allows you to select the object library to open. You can select the following file types: - - **.4dproject** - **.4dz** @@ -65,6 +67,7 @@ In fact, custom object libraries are regular 4D projects. Only the following par - project forms - form pages 1 + ### Building an object library Objects are placed in an object library using drag-and-drop or a cut-copy-paste operation. They can come from either a form or another object library (including the [standard library](#using-the-standard-object-library)). No link is kept with the original object: if the original is modified, the copied object is not affected. @@ -80,6 +83,7 @@ Basic operations are available in the context menu or the options menu of the wi - **Clear** - deletes the object from the library - **Rename** - a dialog box appears allowing you to rename the item. Note that object names must be unique in a library. + You can place individual objects (including subforms) or sets of objects in an object library. Each object or set is grouped into a single item: ![](assets/en/FormEditor/library6.png) @@ -89,13 +93,12 @@ An object library can contain up to 32,000 items. Objects are copied with all their properties, both graphic and functional, including their methods. These properties are kept in full when the item is copied into a form or another library. #### Dependent objects - Using copy-paste or drag-and-drop with certain library objects also causes their dependent objects to be copied. For example, copying a button will cause the object method that may be attached to be copied as well. These dependent objects cannot be copied or dragged and dropped directly. The following is a list of dependent objects that will be pasted into the library at the same time as the main object that uses them (when applicable): -- Lists +- Listas - Formats/Filters -- Pictures +- Imagens - Help Tips (linked to a field) -- Object methods \ No newline at end of file +- Object methods diff --git a/website/translated_docs/pt/FormEditor/pictures.md b/website/translated_docs/pt/FormEditor/pictures.md index 85031935d97cf8..a42dcfcde3ef7a 100644 --- a/website/translated_docs/pt/FormEditor/pictures.md +++ b/website/translated_docs/pt/FormEditor/pictures.md @@ -1,32 +1,39 @@ --- -id: pictures -title: Pictures +id: imagens +title: Imagens --- ## Native Formats Supported -4D integrates native management of picture formats. This means that pictures will be displayed and stored in their original format, without any interpretation in 4D. The specific features of the different formats (shading, transparent areas, etc.) will be retained when they are copied and pasted, and will be displayed without alteration. This native support is valid for all pictures stored in 4D forms: [static pictures](FormObjects/staticPicture.md) pasted in Design mode, pictures pasted into [inputs objects](FormObjects/input_overview.md) at runtime, etc. +4D integra a gestão nativa dos formatos de imagem. Isso significa que imagens serão mostradas e armazenadas em seu formato original, sem qualquer interpretação em 4D. As funcionalidades específicas dos formatos diferentes (sombreado, áreas transparentes, etc) serão retidas quando forem copiadas e coladas, e serão exibidas sem alteração. Essa compatibilidade nativa é válida para todas as imagens armazenadas nos formulários de 4D: [imagens estáticas](FormObjects/staticPicture.md) coladas no modo Desenho, imagens coladas em [objetos de entrada](FormObjects/input_overview.md) em execução, etc. -The most common picture formats are supported of both platforms: .jpeg, .gif, .png, .tiff, .bmp, etc. On macOS, the .pdf format is also available for encoding and decoding. +Os formatos de imagem mais comuns são compatíveis com ambas as plataforma: .jpeg, .gif, .png, .tiff, .bmp, etc. Em macOS, o formato pdf também está disponível para codificar e decodificar. Em macOS, o formato pdf também está disponível para codificar e decodificar. > The full list of supported formats varies according to the operating system and the custom codecs that are installed on the machines. To find out which codecs are available, you must use the `PICTURE CODEC LIST` command (see also the [picture data type](Concepts/dt_picture.md) description). + + + ### Unavailable picture format -A specific icon is displayed for pictures saved in a format that is not available on the machine. The extension of the missing format is shown at the bottom of the icon: +Um ícone específico é exibido para imagens salvas em um formato que não esteja disponível no mecanismo. A extensão do formato faltante é mostrado na parte inferior do ícone: ![](assets/en/FormEditor/picNoFormat.png) -The icon is automatically used wherever the picture is meant to be displayed: +O ícone é usado automaticamente onde a imagem precisar ser exibida: ![](assets/en/FormEditor/picNoFormat2.png) -This icon indicates that the picture cannot be displayed or manipulated locally -- but it can be saved without alteration so that it can be displayed on other machines. This is the case, for example, for PDF pictures on Windows, or for PICT format pictures. +O ícone indica que a imagem não pode ser exibida ou manipulada localmente - mas pode ser salva sem alteração para que possa ser exibida em outros dispositivos. Por exemplo esse é o caso para imagens PDF em Windows ou para imagens no formato PICT. + + + + ## Mouse Coordinates in a Picture -4D lets you retrieve the local coordinates of the mouse in an [input object](FormObjects/input_overview.md) associated with a [picture expression](FormObjects/properties_Object.md#expression-type), in case of a click or a hovering, even if a scroll or zoom has been applied to the picture. This mechanism, similar to that of a picture map, can be used, for example, to handle scrollable button bars or the interface of cartography software. +4D permite recuperar as coordenadas locais do mouse em um [objeto de entrada](FormObjects/input_overview.md) associado a uma [expressão de imagem](FormObjects/properties_Object.md#expression-type), no caso de que clique ou passe o cursor por cima, mesmo se não tiver aplicado um deslocamento ou zoom na imagem. Esse mecanismo, similar ao de um mapa de imagens, pode ser utilizado, por exemplo, para manejar barras de botões deslocáveis ou a interface de um software de cartografia. -The coordinates are returned in the *MouseX* and *MouseY* [System Variables](https://doc.4d.com/4Dv18/4D/18/System-Variables.300-4505547.en.html). The coordinates are expressed in pixels with respect to the top left corner of the picture (0,0). If the mouse is outside of the picture coordinates system, -1 is returned in *MouseX* and *MouseY*. +As coordenadas são devolvidas nas [Variáveis de Sistema](https://doc.4d.com/4Dv18/4D/18/System-Variables.300-4505547.en.html). *MouseX* e*MouseY*. The coordinates are expressed in pixels with respect to the top left corner of the picture (0,0). Se o mouse estiver fora do sistema de coordenadas da imagem, se devolverá -1 em *MouseX* e *MouseY*. -You can get the value of these variables as part of the `On Clicked`, `On Double Clicked`, `On Mouse up`, `On Mouse Enter`, or `On Mouse Move` form events. \ No newline at end of file +Pode obter o valor dessas variáveis como parte dos eventos formulário `On Clicked`, `On Double Clicked`, `On Mouse up`, `On Mouse Enter`, ou `On Mouse Move`. diff --git a/website/translated_docs/pt/FormObjects/buttonGrid_overview.md b/website/translated_docs/pt/FormObjects/buttonGrid_overview.md index 05b4c013ba041c..889d2722405948 100644 --- a/website/translated_docs/pt/FormObjects/buttonGrid_overview.md +++ b/website/translated_docs/pt/FormObjects/buttonGrid_overview.md @@ -3,7 +3,7 @@ id: buttonGridOverview title: Button Grid --- -## Overview +## Visão Geral A button grid is a transparent object that is placed on top of a graphic. The graphic should depict a row-by-column array. When one of the graphics is clicked on, it will have a sunken or pressed appearance: @@ -11,7 +11,8 @@ A button grid is a transparent object that is placed on top of a graphic. The gr You can use a button grid object to determine where the user clicks on the graphic. The object method would use the `On Clicked` event and take appropriate action depending on the location of the click. -## Creating button grids + +## Criando grades de botões To create the button grid, add a background graphic to the form and place a button grid on top of it. Specify the number of [rows](properties_Crop.md#rows) and [columns](properties_Crop.md#columns). @@ -19,14 +20,16 @@ In 4D, a button grid is used as a color palette: ![](assets/en/FormObjects/button_buttonGrid.png) -## Using button grids +## Usar grades de botões The buttons on the grid are numbered from top left to bottom right. In the above example, the grid is 16 columns across by 16 rows down. The button in the top-left position returns 1 when clicked. If the red button at the far right of the second row is selected, the button grid returns 32. If no element is selected, the value is 0 -### Goto page + +### Ir para página You can assign the `gotoPage` [standard action](https://doc.4d.com/4Dv17R5/4D/17-R5/Standard-actions.300-4163633.en.html) to a button grid. When this action is selected, 4D will automatically display the page of the form that corresponds to the number of the button that is selected in the button grid. For example, if the user selects the tenth button of the grid, 4D will display the tenth page of the current form (if it exists). + ## Supported Properties -[Border Line Style](properties_BackgroundAndBorder.md#border-line-style) - [Bottom](properties_CoordinatesAndSizing.md#bottom) - [Class](properties_Object.md#css-class) - [Columns](properties_Crop.md#columns) - [Droppable](properties_Action.md#droppable) - [Height](properties_CoordinatesAndSizing.md#height) - [Help Tip](properties_Help.md#help-tip) - [Horizontal Sizing](properties_ResizingOptions.md#horizontal-sizing) - [Left](properties_CoordinatesAndSizing.md#left) - [Object Name](properties_Object.md#object-name) - [Right](properties_CoordinatesAndSizing.md#right) - [Rows](properties_Crop.md#rows) - [Standard action](properties_Action.md#standard-action) - [Top](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [Variable or Expression](properties_Object.md#variable-or-expression) - [Vertical Sizing](properties_ResizingOptions.md#vertical-sizing) - [Width](properties_CoordinatesAndSizing.md#width) - [Visibility](properties_Display.md#visibility) \ No newline at end of file +[Estilo da borde](properties_BackgroundAndBorder.md#border-line-style) - \[Inferior\](properties_CoordinatesAndSizing. md#bottom) - [Classe](properties_Object.md#css-class) - [Colunas](properties_Crop.md#columns) - \[Droppable\](properties_Action. md#droppable) - [Altura](properties_CoordinatesAndSizing.md#height) - [Conselho de ajuda](properties_Help.md#help-tip) - \[Tamanho horizontal\](properties_ResizingOptions. md#horizontal-sizing) - [Esquerda](properties_CoordinatesAndSizing.md#left) - \[Nome do objeto\](properties_Object. md#object-name) - [Direita](properties_CoordinatesAndSizing.md#right) - [Filas](properties_Crop.md#rows) - \[Ação padrão\](properties_Action. md#standard-action) - [Superior](properties_CoordinatesAndSizing.md#top) - \[Tipo\](properties_Object. md#type) - [Variável ou expressão](properties_Object.md#variable-or-expression) - \[Tamanho vertical\](properties_ResizingOptions. md#vertical-sizing) - [Ancho](properties_CoordinatesAndSizing.md#width) - [Visibilidade](properties_Display.md#visibility) diff --git a/website/translated_docs/pt/FormObjects/button_overview.md b/website/translated_docs/pt/FormObjects/button_overview.md index 08bda8124a4b6d..7690cb1d310f49 100644 --- a/website/translated_docs/pt/FormObjects/button_overview.md +++ b/website/translated_docs/pt/FormObjects/button_overview.md @@ -1,6 +1,6 @@ --- id: buttonOverview -title: Button +title: Botão --- A button is an active object that can be assigned an action (*e.g.*, a database task or an interface function) to perform when a user clicks on it. @@ -9,9 +9,7 @@ A button is an active object that can be assigned an action (*e.g.*, a database Buttons can fulfill a variety of roles, depending on their style and the action assigned to it. For example, buttons could lead a user through a questionnaire or form to complete, or to make choices. Depending on its settings, a button may be designed to be clicked only once and execute a command, while others may require the user to click more than once to receive the desired result. -< - -p> +

    ## Handling buttons @@ -25,6 +23,8 @@ The [variable](properties_Object.md#variable-or-expression) associated with a bu > A button can be assigned both a standard action and a method. In this case, if the button is not disabled by the standard action, the method is executed before the standard action. + + ## Button Styles Button styles control a button's general appearance as well as its available properties. It is possible to apply different predefined styles to buttons or to associate pop-up menus with them. A great number of variations can be obtained by combining these properties / behaviors. @@ -33,7 +33,9 @@ With the exception of the [available properties](#supported-properties), many bu 4D provides buttons in the following predefined styles: -### Regular + + +### Clássico The Regular button style is a standard system button (*i.e.*, a rectangle with a descriptive label) which executes code when a user clicks on it. @@ -44,22 +46,24 @@ By default, the Regular style has a light gray background with a label in the ce #### JSON Example: ```4d - "myButton": { - "type": "button", //define the type of object - "style":"regular", //define the style of the button - "defaultButton":"true" //define button as the default choice - "text": "OK", //text to appear on the button - "action": "Cancel", //action to be be performed - "left": 60, //left position on the form - "top": 160, //top position on the form - "width": 100, //width of the button - "height": 20 //height of the button + "meuBotao": { + "tipo": "button", //define o tipo de objeto + "style": "regular", //define o estilo do botão + "defaultButton": "true" //define o botão como opção padrão + "text": "OK", //texto que aparecerá no botão + "action": "Cancel", //ação a realizar + "left": 60, //posição esquerda no formulário + "top": 160, //posição superior no formulário + "width": 100, //largura do botão + "height": 20 //altura do botão } ``` + Only the Regular and Flat styles offer the [Default Button](properties_Appearance.md#default-button) property. -### Flat + +### Plano The Flat button style is a standard system button (*i.e.*, a rectangle with a descriptive label) which executes code when a user clicks on it. @@ -70,7 +74,8 @@ By default, the Flat style has a white background with a label in the center, ro #### JSON Example: ```4d -
    "myButton": { + + "myButton": { "type": "button", "style":"flat", "defaultButton":"true" @@ -83,19 +88,20 @@ By default, the Flat style has a white background with a label in the center, ro } ``` + Only the Regular and Flat styles offer the [Default Button](properties_Appearance.md#default-button) property. -### Toolbar +### Barra de ferramentas The Toolbar button style is primarily intended for integration in a toolbar. It includes the option to add a pop-up menu (indicated by an inverted triangle) which is generally used to display additional choices for the user to select. By default, the Toolbar style has a transparent background with a label in the center. The appearance of the button can be different when the cursor hovers over it depending on the OS: -- *Windows* - the button is highlighted when it uses the “With Pop-up Menu” property, a triangle is displayed to the right and in the center of the button. + - *Windows* - the button is highlighted when it uses the “With Pop-up Menu” property, a triangle is displayed to the right and in the center of the button. ![](assets/en/FormObjects/button_toolbar.png) -- *macOS* - the highlight of the button never appears. When it uses the “With Pop-up Menu” property, a triangle is displayed to the right and at the bottom of the button. + - *macOS* - the highlight of the button never appears. When it uses the “With Pop-up Menu” property, a triangle is displayed to the right and at the bottom of the button. #### JSON Example: @@ -113,17 +119,19 @@ By default, the Toolbar style has a transparent background with a label in the c } ``` + + ### Bevel The Bevel button style combines the appearance of the [Regular](#regular) (*i.e.*, a rectangle with a descriptive label) style with the [Toolbar](#toolbar) style's pop-up menu property option. By default, the Bevel style has a light gray background with a label in the center. The appearance of the button can be different when the cursor hovers over it depending on the OS: -- *Windows* - the button is highlighted. When it uses the “With Pop-up Menu” property, a triangle is displayed to the right and in the center of the button. + - *Windows* - the button is highlighted. When it uses the “With Pop-up Menu” property, a triangle is displayed to the right and in the center of the button. ![](assets/en/FormObjects/button_bevel.png) -- *macOS* - the highlight of the button never appears. When it uses the “With Pop-up Menu” property, a triangle is displayed to the right and at the bottom of the button. + - *macOS* - the highlight of the button never appears. When it uses the “With Pop-up Menu” property, a triangle is displayed to the right and at the bottom of the button. #### JSON Example: @@ -141,17 +149,19 @@ By default, the Bevel style has a light gray background with a label in the cent } ``` + + ### Rounded Bevel The Rounded Bevel button style is nearly identical to the [Bevel](#bevel) style except, depending on the OS, the corners of the button may be rounded. As with the Bevel style, the Rounded Bevel style combines the appearance of the [Regular](#regular) style with the [Toolbar](#toolbar) style's pop-up menu property option. By default, the Rounded Bevel style has a light gray background with a label in the center. The appearance of the button can be different when the cursor hovers over it depending on the OS: -- *Windows* - the button is identical to the Bevel style. When it uses the “With Pop-up Menu” property, a triangle is displayed to the right and in the center of the button. - - ![](assets/en/FormObjects/button_roundedbevel.png) + - *Windows* - the button is identical to the Bevel style. When it uses the “With Pop-up Menu” property, a triangle is displayed to the right and in the center of the button. -- *macOS* - the corners of the button are rounded. When it uses the “With Pop-up Menu” property, a triangle is displayed to the right and at the bottom of the button. + ![](assets/en/FormObjects/button_roundedbevel.png) + + - *macOS* - the corners of the button are rounded. When it uses the “With Pop-up Menu” property, a triangle is displayed to the right and at the bottom of the button. #### JSON Example: @@ -169,17 +179,19 @@ By default, the Rounded Bevel style has a light gray background with a label in } ``` + + ### OS X Gradient The OS X Gradient button style is nearly identical to the [Bevel](#bevel) style except, depending on the OS, it may have a two-toned appearance. As with the Bevel style, the OS X Gradient style combines the appearance of the [Regular](#regular) style with the [Toolbar](#toolbar) style's pop-up menu property option. By default, the OS X Gradient style has a light gray background with a label in the center. The appearance of the button can be different when the cursor hovers over it depending on the OS: -- *Windows* - the button is identical to the Bevel style. When it uses the “With Pop-up Menu” property, a triangle is displayed to the right and in the center of the button. + - *Windows* - the button is identical to the Bevel style. When it uses the “With Pop-up Menu” property, a triangle is displayed to the right and in the center of the button. ![](assets/en/FormObjects/button_osxgradient.png) -- *macOS* - the button is displayed as a two-tone system button. When it uses the “With Pop-up Menu” property, a triangle is displayed to the right and at the bottom of the button. + - *macOS* - the button is displayed as a two-tone system button. When it uses the “With Pop-up Menu” property, a triangle is displayed to the right and at the bottom of the button. #### JSON Example: @@ -197,17 +209,18 @@ By default, the OS X Gradient style has a light gray background with a label in } ``` + ### OS X Textured -The OS X Textured button style is nearly identical to the [Bevel](#bevel) style except, depending on the OS, it may have a different appearance. As with the Bevel style, the OS X Textured style combines the appearance of the [Regular](#regular) style with the [Toolbar](#toolbar) style's pop-up menu property option. +O estilo do botão OS X Textured é quase igual ao estilo [Bevel](#bevel), mas pode possuir uma aparência diferente, dependendo do sistema operativo. As with the Bevel style, the OS X Textured style combines the appearance of the [Regular](#regular) style with the [Toolbar](#toolbar) style's pop-up menu property option. By default, the OS X Textured style appears as: -- *Windows* - a standard system button with a light gray background with a label in the center. It has the special feature of being transparent in Vista. - - ![](assets/en/FormObjects/button_osxtextured.png) + - *Windows* - a standard system button with a light gray background with a label in the center. It has the special feature of being transparent in Vista. + + ![](assets/en/FormObjects/button_osxtextured.png) -- *macOS* - a standard system button displaying a color change from light to dark gray. Its height is predefined: it is not possible to enlarge or reduce it. + - *macOS* - a standard system button displaying a color change from light to dark gray. Its height is predefined: it is not possible to enlarge or reduce it. #### JSON Example: @@ -225,17 +238,19 @@ By default, the OS X Textured style appears as: } ``` + + ### Office XP The Office XP button style combines the appearance of the [Regular](#regular) style with the [Toolbar](#toolbar) style's transparency and pop-up menu property option. The colors (highlight and background) of a button with the Office XP style are based on the system colors. The appearance of the button can be different when the cursor hovers over it depending on the OS: -- *Windows* - its background only appears when the mouse rolls over it. + - *Windows* - its background only appears when the mouse rolls over it. ![](assets/en/FormObjects/button_officexp.png) -- *macOS* - its background is always displayed. + - *macOS* - its background is always displayed. #### JSON Example: @@ -253,7 +268,10 @@ The colors (highlight and background) of a button with the Office XP style are b } ``` -### Help + + +### Ajuda + The Help button style can be used to display a standard system help button. By default, the Help style is displayed as a question mark within a circle. @@ -276,7 +294,8 @@ The Help button style can be used to display a standard system help button. By d > The Help style does not support [Number of States](properties_TextAndPicture.md#number-of-states), [Picture pathname](properties_TextAndPicture.md#picture-pathname), and [Title/Picture Position](properties_TextAndPicture.md#title-picture-position) basic properties. -### Circle + +### Círculo The Circle button style appears as a round system button. This button style is designed for macOS. @@ -284,26 +303,31 @@ The Circle button style appears as a round system button. This button style is d On Windows, it is identical to the “None” style (the circle in the background is not taken into account). + #### JSON Example: - "myButton": { - "type": "button", - "style":"circular", - "text": "OK", - "dropping": "custom", - "left": 60, - "top": 160, - "width": 100, - "height": 20 - } - +``` + "myButton": { + "type": "button", + "style":"circular", + "text": "OK", + "dropping": "custom", + "left": 60, + "top": 160, + "width": 100, + "height": 20 + } +``` -### Custom + + +### Personalizado The Custom button style accepts a personalized background picture and allows managing additional parameters such as icon and margin offset. ![](assets/en/FormObjects/button_custom.png) + #### JSON Example: ```code @@ -321,16 +345,21 @@ The Custom button style accepts a personalized background picture and allows man } ``` + + + ## Supported Properties All buttons share the same set of basic properties: + [Bold](properties_Text.md#bold) - [Border Line Style](properties_BackgroundAndBorder.md#border-line-style) - [Bottom](properties_CoordinatesAndSizing.md#bottom) - [Button Style](properties_TextAndPicture.md#button-style) - [Class](properties_Object.md#css-class) - [Droppable](properties_Action.md#droppable) - [Focusable](properties_Entry.md#focusable) - [Font](properties_Text.md#font) - [Font Color](properties_Text.md#font-color) - [Font Size](properties_Text.md#font-size) - [Height](properties_CoordinatesAndSizing.md#height) - [Help Tip](properties_Help.md#help-tip) - [Horizontal Sizing](properties_ResizingOptions.md#horizontal-sizing) - [Italic](properties_Text.md#italic) - [Left](properties_CoordinatesAndSizing.md#left) - [Not rendered](properties_Display.md#not-rendered) - [Number of States](properties_TextAndPicture.md#number-of-states)(1) - [Object Name](properties_Object.md#object-name) - [Picture pathname](properties_TextAndPicture.md#picture-pathname)(1) - [Right](properties_CoordinatesAndSizing.md#right) - [Shortcut](properties_Entry.md#shortcut) - [Standard action](properties_Action.md#standard-action) - [Title](properties_Object.md#title) - [Title/Picture Position](properties_TextAndPicture.md#title-picture-position)(1) - [Top](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [Underline](properties_Text.md#underline) - [Variable or Expression](properties_Object.md#variable-or-expression) - [Vertical Sizing](properties_ResizingOptions.md#vertical-sizing) - [Visibility](properties_Display.md#visibility) - [Width](properties_CoordinatesAndSizing.md#width) > (1) Not supported by the [Help](#help) style. + Additional specific properties are available, depending on the [button style](#button-styles): - [Background pathname](properties_TextAndPicture.md#backgroundPathname) - [Horizontal Margin](properties_TextAndPicture.md#horizontalMargin) - [Icon Offset](properties_TextAndPicture.md#icon-offset) - [Vertical Margin](properties_TextAndPicture.md#verticalMargin) (Custom) - [Default Button](properties_Appearance.md#default-button) (Flat, Regular) -- [Title/Picture Position](properties_TextAndPicture.md#title-picture-position) - [With pop-up menu](properties_TextAndPicture.md#with-pop-up-menu) (Toolbar, Bevel, Rounded Bevel, OS X Gradient, OS X Textured, Office XP, Circle, Custom) \ No newline at end of file +- [Posição do título/imagen](properties_TextAndPicture.md#title-picture-position) - [Com menu emergente](properties_TextAndPicture.md#with-pop-up-menu) (Barra de ferramentas, Bisel, Bisel arredondado, OS X Gradient, OS X Textured, Office XP, Círculo, Personalizado) diff --git a/website/translated_docs/pt/FormObjects/checkbox_overview.md b/website/translated_docs/pt/FormObjects/checkbox_overview.md index ecf32ee71c1ca7..e3911be72e5589 100644 --- a/website/translated_docs/pt/FormObjects/checkbox_overview.md +++ b/website/translated_docs/pt/FormObjects/checkbox_overview.md @@ -3,191 +3,207 @@ id: checkboxOverview title: Check Box --- -## Overview +## Visão Geral -A check box is a type of button used to enter or display binary (true-false) data. Basically, it is either checked or unchecked, but a third state can be defined (see below). +Uma caixa de seleção é um tipo de botão usado para introduzir ou exibir dados binários (verdadeiro-falso). Basicamente ou está marcado ou desmarcado, mas um terceiro estado também pode ser definido (ver abaixo). ![](assets/en/FormObjects/checkbox.png) -Check boxes are controlled by methods. Like all buttons, a check box variable is set to 0 when the form is first opened. The method associated with it executes when the check box is selected. +As caixas de seleção são controladas pelos métodos. Como todos os botões, uma variável da caixa de seleção é estabelecida em 0 quando o formulário é aberto pela primeira vez. O método associado com ela é executado quando selecionar a caixa de seleção. -A check box displays text next to a small square. This text is set in the [Title](properties_Object.md#title) property of the check box. You can enter a title in the form of an XLIFF reference in this area (see [Appendix B: XLIFF architecture](https://doc.4d.com/4Dv17R5/4D/17-R5/Appendix-B-XLIFF-architecture.300-4163748.en.html)). +Uma caixa de seleção mostra o teto do lado de um pequeno quadrado. Este texto é estabelecido na propriedade [Title](properties_Object.md#title) da caixa de seleção. Pode entrar um título no formulário de uma referência XLIFF nessa área (ver [Anexo B: XLIFF arquitetura](https://doc.4d.com/4Dv17R5/4D/17-R5/Appendix-B-XLIFF-architecture.300-4163748.en.html)). -## Using check boxes -A check box can be associated to a [variable or expression](properties_Object.md#variable-or-expression) of type integer or boolean. +## Utilizar caixas de seleção -- **integer:** if the box is checked, the variable has the value 1. When not checked, it has the value 0. If check box is in third state (see below), it has the value 2. -- **boolean:** if the box is checked, the variable has the value `True`. When not checked, it has the value `False`. +Uma caixa de seleção pode ser associada a uma [variável ou expressão](properties_Object.md#variable-or-expression) de tipo inteiro ou booleano. -Any or all check boxes in a form can be checked or unchecked. A group of check boxes allows the user to select multiple options. +- **inteiro:** se a caixa for selecionada, a variável tem o valor 1. Quando não for marcado, tem o valor 0. Se a caixa de seleção estiver no terceiro estado (ver abaixo), tem o valor 2. +- **booleano:** se a caixa for marcada, a variável tem o valor `True`. Quando não for marcado, tem o valor `False`. -### Three-States check box +Uma parte ou todas as caixas de seleção de um formulário podem estar marcadas ou desmarcadas. As caixas de seleção múltiplas permitem ao usuário selecionar várias opções. -Check box objects with style [Regular](checkbox_overview.md#regular) and [Flat](checkbox_overview.md#flat) accept a third state. This third state is an intermediate status, which is generally used for display purposes. For example, it allows indicating that a property is present in a selection of objects, but not in each object of the selection. -![](assets/en/FormObjects/checkbox_3states.png) +### Caixas de seleção de três estados + +Os objetos caixa de seleção de estilo [Clássico](checkbox_overview.md#regular) y [Plano](checkbox_overview.md#flat) aceitam um terceiro estado. Este terceiro estado é um estado intermediário, que geralmente se usa para fins de visualização. Por exemplo, permite indicar que uma propriedade é presentada em uma seleção de objetos, -To enable this third state, you must select the [Three-States](properties_Display.md#three-states) property. +![](assets/en/FormObjects/checkbox_3states.png) -This property is only available for regular and flat check boxes associated with numeric [variables or expressions](properties_Object.md#variable-or-expression) — check boxes for Boolean expressions cannot use the [Three-States](properties_Display.md#three-states) property (a Boolean expression cannot be in an intermediary state). +Para ativar este terceiro estado, deve selecionar a propriedade [Três estados](properties_Display.md#three-states). -The variable associated with the check box returns the value 2 when the check box is in the third state. +Essa propriedade só está disponível para caixas de seleção regulares e planas associadas a [variáveis ou expressões](properties_Object.md#variable-or-expression) — as caixas de seleção de expressões booleanas não podem usar a propriedade [Três Estados](properties_Display.md#three-states) (uma expressão Booleana não pode estar em um estado intermediário). -> In entry mode, the Three-States check boxes display each state sequentially, in the following order: unchecked / checked / intermediary / unchecked, etc. The intermediary state is generally not very useful in entry mode; in the code, simply force the value of the variable to 0 when it takes the value of 2 in order to pass directly from the checked state to the unchecked state. +A variável associada à caixa de seleção devolve o valor 2 quando a caixa estiver no terceiro estado. +> No modo de entrada, as caixas de seleção dos três estados mostram cada estado de forma sequencial na ordem abaixo: sem marcar/marcado/intermediário/sem marcar, etc. No modo de entrada, as caixas de seleção dos três estados mostram cada estado de forma sequencial na ordem abaixo: sem marcar/marcado/intermediário/sem marcar, etc. O estado intermediário não é geralmente muito útil no modo entrada; no código, simplesmente force o valor da variável para 0 quando tomar o valor de 2 para passar diretamente de um estado marcado para o estado desmarcado. No modo de entrada, as caixas de seleção dos três estados mostram cada estado de forma sequencial na ordem abaixo: sem marcar/marcado/intermediário/sem marcar, etc. O estado intermediário não é geralmente muito útil no modo entrada; no código, simplesmente force o valor da variável para 0 quando tomar o valor de 2 para passar diretamente de um estado marcado para o estado desmarcado. -## Using a standard action -You can assign a [standard action](properties_Action.md#standard-action) to a check box to handle attributes of text areas. For example, if you assign the `fontBold` standard action, at runtime the check box will manage the "bold" attribute of the selected text in the current area. +## Usar uma ação padrão -Only actions that can represent a true/false status ("checkable" actions) are supported by this object: +Pode atribuir uma [ação padrão](properties_Action.md#standard-action) a uma caixa de seleção para manejar os atributos das áreas de texto. Por exemplo, se atribuir a ação padrão `fontBold`, em execução a caixa de seleção gerenciará o atributo "negrito" do texxto selecionado na área atual. -| Supported actions | Usage condition (if any) | -| ----------------------------------- | ------------------------ | -| avoidPageBreakInsideEnabled | 4D Write Pro areas only | -| fontItalic | | -| fontBold | | -| fontLinethrough | | -| fontSubscript | 4D Write Pro areas only | -| fontSuperscript | 4D Write Pro areas only | -| fontUnderline | | -| font/showDialog | Mac only | -| htmlWYSIWIGEnabled | 4D Write Pro areas only | -| section/differentFirstPage | 4D Write Pro areas only | -| section/differentLeftRightPages | 4D Write Pro areas only | -| spell/autoCorrectionEnabled | | -| spell/autoDashSubstitutionsEnabled | Mac only | -| spell/autoLanguageEnabled | Mac only | -| spell/autoQuoteSubstitutionsEnabled | Mac only | -| spell/autoSubstitutionsEnabled | | -| spell/enabled | | -| spell/grammarEnabled | Mac only | -| spell/showDialog | Mac only | -| spell/visibleSubstitutions | | -| visibleBackground | 4D Write Pro areas only | -| visibleFooters | 4D Write Pro areas only | -| visibleHeaders | 4D Write Pro areas only | -| visibleHiddenChars | 4D Write Pro areas only | -| visibleHorizontalRuler | 4D Write Pro areas only | -| visiblePageFrames | 4D Write Pro areas only | -| visibleReferences | | -| widowAndOrphanControlEnabled | 4D Write Pro areas only | +Só as ações que podem representar um estado verdadeiro/falso (ações "marcáveis") são compatíveis com esse objeto: +| Ações compatíveis | Condições de uso (se houver) | +| ----------------------------------- | ---------------------------- | +| avoidPageBreakInsideEnabled | Apenas Zonas 4D Write Pro | +| fontItalic | | +| fontBold | | +| fontLinethrough | | +| fontSubscript | Só áreas 4D Write Pro | +| fontSuperscript | Só áreas 4D Write Pro | +| fontUnderline | | +| font/showDialog | Só em Mac | +| htmlWYSIWIGEnabled | Só áreas 4D Write Pro | +| section/differentFirstPage | Só áreas 4D Write Pro | +| section/differentLeftRightPages | Só áreas 4D Write Pro | +| spell/autoCorrectionEnabled | | +| spell/autoDashSubstitutionsEnabled | Só Mac | +| spell/autoLanguageEnabled | Só Mac | +| spell/autoQuoteSubstitutionsEnabled | Só Mac | +| spell/autoSubstitutionsEnabled | | +| spell/enabled | | +| spell/grammarEnabled | Mac only | +| spell/showDialog | Só mac | +| spell/visibleSubstitutions | | +| visibleBackground | Só áreas 4D Write Pro | +| visibleFooters | Só áreas 4D Write Pro | +| visibleHeaders | Só áreas 4D Write Pro | +| visibleHiddenChars | 4D Write Pro areas only | +| visibleHorizontalRuler | Só áreas 4D Write Pro | +| visiblePageFrames | Só áreas 4D Write Pro | +| visibleReferences | | +| widowAndOrphanControlEnabled | Só áreas 4D Write Pro | -For detailed information on these actions, please refer to the [Standard actions](https://doc.4d.com/4Dv17R5/4D/17-R5/Standard-actions.300-4163633.en.html) section. +Para informações detalhas dessas ações, veja a seção [Ações padrão](https://doc.4d.com/4Dv17R5/4D/17-R5/Standard-actions.300-4163633.en.html). -## Check box button styles +## Estilos de botão caixas de seleção -Check box styles control a check box's general appearance as well as its available properties. It is possible to apply different predefined styles to check boxes. A great number of variations can be obtained by combining these properties / behaviors. +Os estilos de caixa de seleção controlam a aparência geral de uma caixa de seleção assim como suas propriedades disponíveis. É possível aplicar diferentes estilos pré-definidos para caixas de seleção. Um grande número de variações podem ser obtidas combinando essas propriedades/comportamentos. -With the exception of the [available properties](#supported-properties), many check box objects are *structurally* identical. The difference is in the processing of their associated variables. +Com exceção das[propriedades disponíveis](#supported-properties), muitos objetos caixa de seleção são *estruturalmente* idênticos. A diferença é no processamento das variáveis associadas. -4D provides check boxes in the following predefined styles: +4D oferece caixas de seleção nos estilos predefinidos abaixo: -### Regular +### Clássico -The Regular check box style is a standard system check box (*i.e.*, a rectangle with a descriptive title): +O estilo Clássico de caixa de seleção corresponde a um sistema de caixa de seleção padrão (*ou seja, *, um retângulo com um título descritivo): ![](assets/en/FormObjects/checkbox_regular.png) -#### JSON Example: +#### Exemplo JSON : + +``` + "myCheckBox": { + "type": "checkbox", + "style":"regular", + "text": "Cancel", + "action": "Cancel", + "left": 60, + "top": 160, + "width": 100, + "height": 20 + "dataSourceTypeHint":"boolean" + } +``` + + - "myCheckBox": { +### Plano + +O estilo de caixa de seleção Plano tem uma aparência minimalista. A natureza gráfica do estilo Flat é especialmente útil para os formulários que vão ser impressos. + +![](assets/en/FormObjects/checkbox_flat.png) + +#### Exemplo JSON: + +``` + "myCheckBox": { "type": "checkbox", - "style":"regular", + "style":"flat", "text": "Cancel", - "action": "Cancel", - "left": 60, - "top": 160, + "action": "cancel", + "left": 60, + "top": 160, "width": 100, - "height": 20 - "dataSourceTypeHint":"boolean" + "height": 20 } - +``` -### Flat -The Flat check box style is a minimalist appearance. The Flat style's graphic nature is particularly useful for forms that will be printed. -![](assets/en/FormObjects/checkbox_flat.png) +### Botão barra de ferramentas + +O estilo de botão barra de ferramentas está pensado principalmente para sua integração em uma barra de ferramentas. -#### JSON Example: +O estilo Barra de ferramentas tem um fundo transparente com um título. Está geralmente associado com uma [imagem de 4 estados](properties_TextAndPicture.md#number-of-states). - "myCheckBox": { +Exemplo com estados selecionado/ não selecionado/ ressaltado: + +![](assets/en/FormObjects/checkbox_toolbar.png) + + +#### Exemplo JSON: + +``` + "myCheckBox": { "type": "checkbox", - "style":"flat", - "text": "Cancel", - "action": "cancel", - "left": 60, + "style":"toolbar", + "text": "Checkbox", + "icon": "/RESOURCES/File.png", + "iconFrames": 4 + "left": 60, "top": 160, - "width": 100, - "height": 20 + "width": 100, + "height": 20 } - +``` -### Toolbar button -The Toolbar button check box style is primarily intended for integration in a toolbar. -The Toolbar style has a transparent background with a title. It is usually associated with a [4-state picture](properties_TextAndPicture.md#number-of-states). +### Bevel -Example with states unchecked / checked / highlighted: +O estilo de caixa de seleção Bevel combina a aparência do estilo [Clássico ](#regular) (*ou seja*, um retângulo com um título descritivo) com o comportamento do estilo [Barra de ferramentas](#toolbar). -![](assets/en/FormObjects/checkbox_toolbar.png) +O estilo Bevel tem um fundo cinza claro com um título. Está geralmente associado com uma[imagem de 4 estados](properties_TextAndPicture.md#number-of-states). -#### JSON Example: - - "myCheckBox": { - "type": "checkbox", - "style":"toolbar", - "text": "Checkbox", - "icon": "/RESOURCES/File.png", - "iconFrames": 4 - "left": 60, - "top": 160, - "width": 100, - "height": 20 - } - +Exemplo com estados selecionado / não selecionado / ressaltado: -### Bevel +![](assets/en/FormObjects/checkbox_bevel.png) -The Bevel check box style combines the appearance of the [Regular](#regular) (*i.e.*, a rectangle with a descriptive title) style with the [Toolbar](#toolbar) style's behavior. -The Bevel style has a light gray background with a title. It is usually associated with a [4-state picture](properties_TextAndPicture.md#number-of-states). +#### Exemplo JSON: -Example with states unchecked / checked / highlighted: +``` + "myCheckBox": { + "type": "checkbox", + "style":"bevel", + "text": "Checkbox", + "icon": "/RESOURCES/File.png", + "iconFrames": 4 + "left": 60, + "top": 160, + "width": 100, + "height": 20 + } +``` -![](assets/en/FormObjects/checkbox_bevel.png) -#### JSON Example: - "myCheckBox": { - "type": "checkbox", - "style":"bevel", - "text": "Checkbox", - "icon": "/RESOURCES/File.png", - "iconFrames": 4 - "left": 60, - "top": 160, - "width": 100, - "height": 20 - } - +### Bevel arredondado -### Rounded Bevel +O estilo de caixa de seleção Bevel arredondado é quase idêntico ao estilo [Bevel](#bevel), exceto que, dependendo do sistema operativo, as esquinas do botão podem ser arredondadas. Da mesma forma que com o estilo Bevel, o estilo Bevel arredondado combina a aparência do estilo [Clássico](#regular) com o comportamento do estilo [Barra de ferramentas](#toolbar). -The Rounded Bevel check box style is nearly identical to the [Bevel](#bevel) style except, depending on the OS, the corners of the button may be rounded. As with the Bevel style, the Rounded Bevel style combines the appearance of the [Regular](#regular) style with the [Toolbar](#toolbar) style's behavior. +O estilo Bevel arredondado tem um fundo cinza claro com um título. Está geralmente associado com uma [imagem de 4 estados](properties_TextAndPicture.md#number-of-states). -The Rounded Bevel style has a light gray background with a title. It is usually associated with a [4-state picture](properties_TextAndPicture.md#number-of-states). +Exemplo em macOS: -Example on macOS: + ![](assets/en/FormObjects/checkbox_roundedbevel_mac.png) -![](assets/en/FormObjects/checkbox_roundedbevel_mac.png) +> em Windows, o estilo Bevel arredondado é idêntico ao estilo [Bevel](#bevel). -> on Windows, the Rounded Bevel style is identical to the [Bevel](#bevel) style. -#### JSON Example: +#### Exemplo JSON: ```4d "myCheckBox": { @@ -203,175 +219,202 @@ Example on macOS: } ``` + + ### OS X Gradient -The OS X Gradient check box style is nearly identical to the [Bevel](#bevel) style except, depending on the OS, it may have a two-toned appearance. As with the Bevel style, the OS X Gradient style combines the appearance of the [Regular](#regular) style with the [Toolbar](#toolbar) style's behavior. +O estilo de caixa de seleção OS X Gradient é quase idêntico ao estilo [Bevel](#bevel), exceto que, dependendo do sistema operativo, pode ter uma aparência de dois tons. Da mesma forma que o estilo Bevel, o estilo OS X Gradient combina a aparência del estilo [Clássico](#regular) com o comportamento do estilo [Barra de ferramentas](#toolbar). + +O estilo Gradient OS X tem um fundo cinza claro com um título e se mostra como um botão de sistema de dois tons em macOS. Está geralmente associado com uma [imagem de 4 estados](properties_TextAndPicture.md#number-of-states). + + ![](assets/en/FormObjects/checkbox_osxgradient_mac.png) + +> Em Windows, este estilo é idêntico ao estilo [Bevel](#bevel). + + +#### Exemplo JSON: + +``` + "myCheckBox": { + "type": "checkbox", + "style":"gradientBevel", + "text": "Checkbox", + "icon": "/RESOURCES/File.png", + "iconFrames": 4 + "left": 60, + "top": 160, + "width": 100, + "height": 20 + } +``` + + -The OS X Gradient style has a light gray background with a title and is displayed as a two-tone system button on macOS. It is usually associated with a [4-state picture](properties_TextAndPicture.md#number-of-states). -![](assets/en/FormObjects/checkbox_osxgradient_mac.png) +### OS X Texturizado -> On Windows, this style is identical to the [Bevel](#bevel) style. +O estilo de caixa de seleção OS X Textured é similar ao estilo [Bevel](#bevel), exceto que, dependendo do sistema operativo, pode ter uma aparência diferente. Da mesma forma que com o estilo Bevel, o estilo Bevel arredondado combina a aparência do estilo [Clássico](#regular) com o comportamento do estilo [Barra de ferramentas](#toolbar). -#### JSON Example: +Como padrão, o estilo OS X Textured aparece como: - "myCheckBox": { + - *Windows* - um botão padrão com um fundo azul claro com um título no centro. + + ![](assets/en/FormObjects/checkbox_osxtextured.png) + + - *macOS* - - um botão sistema padrão que mostra uma mudança de cor cinza claro a cinza escuro. Sua altura está predefinida: não é possível ampliar ou reduzir. + + ![](assets/en/FormObjects/checkbox_osxtextured_mac.png) + +#### Exemplo JSON: + +``` + "myCheckBox": { + "type": "checkbox", + "style":"texturedBevel", + "text": "Checkbox", + "left": 60, + "top": 160, + "width": 100, + "height": 20 + } +``` + + + + +### Office XP + +O estilo de caixa de seleção Office XP combina a aparência do estilo [Clássico](#regular) com o comportamento do estilo [Barra de ferramentas](#toolbar). + +As cores (ressaltado e fundo) de um botão com o estilo Office XP são baseadas nos sistemas de cores. A aparência do botão pode ser diferente quando o cursor passar por cima dele, dependendo do SO: + + - *Windows* - seu fundo só aparece quando o mouse passa por cima. Exemplo com estados selecionado/ não selecionado / ressaltado: + + ![](assets/en/FormObjects/checkbox_officexp.png) + + - *macOS* - seu fundo é sempre mostrado. Exemplos com estados desmarcado/ marcado: + + ![](assets/en/FormObjects/checkbox_officexp_mac.png) + +#### JSON Exemplo: + +``` + "myCheckBox": { "type": "checkbox", - "style":"gradientBevel", - "text": "Checkbox", + "style":"office", + "text": "Checkbox", + "action": "fontBold", "icon": "/RESOURCES/File.png", - "iconFrames": 4 - "left": 60, + "iconFrames": 4 + "left": 60, "top": 160, - "width": 100, - "height": 20 - } - + "width": 100, + "height": 20 + } +``` + + + +### Contrair/expandir + +Este estilo de caixa de seleção pode ser usado para adicionar um ícone padrão de contrair/expandir. Esses botões são usados nativamente em listas hierárquicas. -### OS X Textured + - *Windows* - o botão parece um [+] ou um [-] -The OS X Textured checkbox style is similar to the [Bevel](#bevel) style except, depending on the OS, it may have a different appearance. As with the Bevel style, the OS X Textured style combines the appearance of the [Regular](#regular) style with the [Toolbar](#toolbar) style's behavior. + ![](assets/en/FormObjects/checkbox_collapse.png) -By default, the OS X Textured style appears as: + - *macOS* - parece com um triângulo apontando para cima ou para baixo. -- *Windows* - a standard system button with a light blue background with a title in the center. - - ![](assets/en/FormObjects/checkbox_osxtextured.png) + ![](assets/en/FormObjects/checkbox_collapse_mac.png) -- *macOS* - a standard system button displaying a color change from light to dark gray. Its height is predefined: it is not possible to enlarge or reduce it. - - ![](assets/en/FormObjects/checkbox_osxtextured_mac.png) -#### JSON Example: +#### JSON Exemplo: - "myCheckBox": { +``` + "myCheckBox": { "type": "checkbox", - "style":"texturedBevel", - "text": "Checkbox", + "style":"disclosure", + "method": "m_collapse", "left": 60, "top": 160, - "width": 100, - "height": 20 + "width": 100, + "height": 20 } - - -### Office XP - -The Office XP check box style combines the appearance of the [Regular](#regular) style with the [Toolbar](#toolbar) style's behavior. +``` -The colors (highlight and background) of a button with the Office XP style are based on the system colors. The appearance of the button can be different when the cursor hovers over it depending on the OS: -- *Windows* - its background only appears when the mouse rolls over it. Example with states unchecked / checked / highlighted: - - ![](assets/en/FormObjects/checkbox_officexp.png) -- *macOS* - its background is always displayed. Example with states unchecked / checked: - - ![](assets/en/FormObjects/checkbox_officexp_mac.png) +### Botão disclosure -#### JSON Example: +Em macOS e Windows, uma caixa de seleção com o estilo "Disclosure" aparece como um botão de informação padrão, normalmente utilizado para mostrar/ocultar informação adicional. Quando usar um botão radio, o símbolo botão aponta para baixo com o valor 0 e para cima com o valor 1. - "myCheckBox": { - "type": "checkbox", - "style":"office", - "text": "Checkbox", - "action": "fontBold", - "icon": "/RESOURCES/File.png", - "iconFrames": 4 - "left": 60, - "top": 160, - "width": 100, - "height": 20 - } - + - *Windows* -### Collapse / Expand + ![](assets/en/FormObjects/checkbox_disclosure.png) -This check box style can be used to add a standard collapse/expand icon. These buttons are used natively in hierarchical lists. + - *macOS* -- *Windows* - the button looks like a [+] or a [-] - - ![](assets/en/FormObjects/checkbox_collapse.png) + ![](assets/en/FormObjects/checkbox_disclosure_mac.png) -- *macOS* - it looks like a triangle pointing right or down. - - ![](assets/en/FormObjects/checkbox_collapse_mac.png) -#### JSON Example: +#### Exemplo JSON: - "myCheckBox": { - "type": "checkbox", - "style":"disclosure", - "method": "m_collapse", - "left": 60, - "top": 160, - "width": 100, - "height": 20 - } - +``` + "myCheckBox": { + "type": "checkbox", + "style":"roundedDisclosure", + "method": "m_disclose", + "left": 60, + "top": 160, + "width": 100, + "height": 20 + } +``` -### Disclosure Button -In macOS and Windows, a check box with the "Disclosure" style appears as a standard disclosure button, usually used to show/hide additional information. When used as a radio button, the button symbol points downwards with value 0 and upwards with value 1. +### Personalizado -- *Windows* - - ![](assets/en/FormObjects/checkbox_disclosure.png) +O estilo de caixa de seleção personalizado aceita uma imagem de fundo personalizada e permite gerenciar propriedades específicas: -- *macOS* - - ![](assets/en/FormObjects/checkbox_disclosure_mac.png) +- [Rota de acesso ao Fundo](properties_TextAndPicture.md#backgroundPathname) +- [Offset do ícone](properties_TextAndPicture.md#icon-offset) +- [Margem Horizontal](properties_TextAndPicture.md#horizontalMargin) and [Margem Vertical](properties_TextAndPicture.md#verticalMargin) -#### JSON Example: +Geralmente associado com uma [imagem de 4 estados](properties_TextAndPicture.md#number-of-states), que pode ser usada em conjunção com um [quarto estado](properties_TextAndPicture.md#number-of-states) [background picture](properties_TextAndPicture.md#backgroundPathname). - "myCheckBox": { - "type": "checkbox", - "style":"roundedDisclosure", - "method": "m_disclose", - "left": 60, - "top": 160, - "width": 100, - "height": 20 - } - +#### Exemplo JSON: -### Custom +``` + "myCheckbox": { + "type": "checkbox", + "style":"custom", + "text": "OK", + "icon": "/RESOURCES/smiley.jpg", + "iconFrame": 4, + "customBackgroundPicture": "/RESOURCES/paper.jpg", + "iconOffset": 5, //deslocamento do ícone personalizado ao dar um clique + "left": 60, + "top": 160, + "width": 100, + "height": 20, + "customBorderX": 20, + "customBorderY": 5 + } +``` -The Custom check box style accepts a personalized background picture and allows managing specific properties: -- [Background pathname](properties_TextAndPicture.md#backgroundPathname) -- [Icon Offset](properties_TextAndPicture.md#icon-offset) -- [Horizontal Margin](properties_TextAndPicture.md#horizontalMargin) and [Vertical Margin](properties_TextAndPicture.md#verticalMargin) -It is usually associated with a [4-state picture](properties_TextAndPicture.md#number-of-states), that can be used in conjunction with a [4-state](properties_TextAndPicture.md#number-of-states) [background picture](properties_TextAndPicture.md#backgroundPathname). -#### JSON Example: +## Propriedades suportadas - "myCheckbox": { - "type": "checkbox", - "style":"custom", - "text": "OK", - "icon": "/RESOURCES/smiley.jpg", - "iconFrame": 4, - "customBackgroundPicture": "/RESOURCES/paper.jpg", - "iconOffset": 5, //custom icon offset when clicked - "left": 60, - "top": 160, - "width": 100, - "height": 20, - "customBorderX": 20, - "customBorderY": 5 - } - +Todas as caixas de seleção partilhar o mesmo conjunto de propriedades básicas: -## Supported Properties -All check boxes share the same set of basic properties: +[Negrita](properties_Text.md#bold) - [Inferior](properties_CoordinatesAndSizing.md#bottom) - [Estilo do botão](properties_TextAndPicture.md#button-style) - \[Classe\](properties_Object. md#css-class) - [Focável](properties_Entry.md#focusable) - [Font](properties_Text.md#font) - \[Color de la fuente\](properties_Text. md#font-color) - [Tamanho da fonte](properties_Text.md#font-size) - [Altura](properties_CoordinatesAndSizing.md#height) - \[Dicas de ajuda\](properties_Help. md#help-tip) - [Tamanho horizontal](properties_ResizingOptions.md#horizontal-sizing) - [Itálica](properties_Text.md#italic) - \[Esquerda\](properties_CoordinatesAndSizing. md#left) - [Nome de objeto](properties_Object.md#object-name) - [Direita](properties_CoordinatesAndSizing.md#right) - \[Corte\](properties_Entry. md#shortcut) - [Acción estándar](properties_Action.md#standard-action) - [Título](properties_Object.md#title) - \[Top\](properties_CoordinatesAndSizing. md#top) - [Tipo](properties_Object.md#type) - [Sublinhado](properties_Text.md#underline) - [Variável ou Expressão](properties_Object.md#variable-or-expression) - \[Tamanho vertical\](properties_ResizingOptions. md#vertical-sizing) - [Visibilidade](properties_Display.md#visibility) - [Largura](properties_CoordinatesAndSizing.md#width) -[Bold](properties_Text.md#bold) - [Bottom](properties_CoordinatesAndSizing.md#bottom) - [Button Style](properties_TextAndPicture.md#button-style) - [Class](properties_Object.md#css-class) - [Focusable](properties_Entry.md#focusable) - [Font](properties_Text.md#font) - [Font Color](properties_Text.md#font-color) - [Font Size](properties_Text.md#font-size) - [Height](properties_CoordinatesAndSizing.md#height) - [Help Tip](properties_Help.md#help-tip) - [Horizontal Sizing](properties_ResizingOptions.md#horizontal-sizing) - [Italic](properties_Text.md#italic) - [Left](properties_CoordinatesAndSizing.md#left) - [Object Name](properties_Object.md#object-name) - [Right](properties_CoordinatesAndSizing.md#right) - [Shortcut](properties_Entry.md#shortcut) - [Standard action](properties_Action.md#standard-action) - [Title](properties_Object.md#title) - [Top](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [Underline](properties_Text.md#underline) - [Variable or Expression](properties_Object.md#variable-or-expression) - [Vertical Sizing](properties_ResizingOptions.md#vertical-sizing) - [Visibility](properties_Display.md#visibility) - [Width](properties_CoordinatesAndSizing.md#width) -Additional specific properties are available, depending on the [button style](#button-styles): +Propriedades específicas adicionais estão disponíveis, dependendo do [estilo botão](#button-styles): -- [Background pathname](properties_TextAndPicture.md#backgroundPathname) - [Horizontal Margin](properties_TextAndPicture.md#horizontalMargin) - [Icon Offset](properties_TextAndPicture.md#icon-offset) - [Vertical Margin](properties_TextAndPicture.md#verticalMargin) (Custom) -- [Three-States](properties_Display.md#three-states) (Flat, Regular) -- [Number of States](properties_TextAndPicture.md#number-of-states) - [Picture pathname](properties_TextAndPicture.md#picture-pathname) - [Title/Picture Position](properties_TextAndPicture.md#title-picture-position) (Toolbar button, Bevel, Rounded Bevel, OS X Gradient, OS X Textured, Office XP, Custom) \ No newline at end of file +- [Rota de acesso do fundo](properties_TextAndPicture.md#backgroundPathname) - [Margem horizontal](properties_TextAndPicture.md#horizontalMargin) - [Deslocamento ícone](properties_TextAndPicture.md#icon-offset) - [Margem vertical](properties_TextAndPicture.md#verticalMargin) (Personalizado) +- [Três Estados](properties_Display.md#three-states) (Flat, Clássico) +- [Número de estados](properties_TextAndPicture.md#number-of-states) - [Rota de imagem](properties_TextAndPicture.md#picture-pathname) - [Titulo/posição imagem](properties_TextAndPicture.md#title-picture-position) (botão Toolbar, Bevel, Bevel arredondado, OS X Gradient, OS X Textured, Office XP, Custom) diff --git a/website/translated_docs/pt/FormObjects/comboBox_overview.md b/website/translated_docs/pt/FormObjects/comboBox_overview.md index d2abe404cefec7..a1b28991bdd47f 100644 --- a/website/translated_docs/pt/FormObjects/comboBox_overview.md +++ b/website/translated_docs/pt/FormObjects/comboBox_overview.md @@ -3,25 +3,23 @@ id: comboBoxOverview title: Combo Box --- -## Overview +## Visão Geral -A combo box is similar to a [drop-down list](dropdownList_Overview.md#overview), except that it accepts text entered from the keyboard and has additional options. +Um combo box é parecido com uma lista [drop-down](dropdownList_Overview.md#overview), exceto que aceita texto digitado do teclado e tem opções adicionais. ![](assets/en/FormObjects/combo_box.png) -You initialize a combo box in exactly the same way as a drop-down list. If the user enters text into the combo box, it fills the 0th element of the array. In other respects, you treat a combo box as an enterable area that uses its array or a choice list as the set of default values. +Um combo box é iniciado em exatamente da mesma forma que uma lista drop down Um combo box é iniciado em exatamente da mesma forma que uma lista drop down Se o usuário digitar texto em uma combo box, preenche o 0imo elemento do array. Um combo box é iniciado em exatamente da mesma forma que uma lista drop down Se o usuário digitar texto em uma combo box, preenche o 0imo elemento do array. Em outros aspectos, você deve tratar uma combo box como uma área editável que usa seu array ou uma lista de escolha como um conjunto de valores padrão. -Use the `On Data Change` event to manage entries into the enterable area, as you would for any enterable area object. For more information, refer to the description of the [Form event](https://doc.4d.com/4Dv17R5/4D/17-R5/Form-event.301-4127796.en.html) command in the *4D Language Reference* manual. +Use o evento `On Data Change` para gerenciar entradas em uma área editável, como faria em qualquer objeto área editável. Para saber mais, veja a descrição do comando of the [Form event](https://doc.4d.com/4Dv17R5/4D/17-R5/Form-event.301-4127796.en.html) no manual de*4D Language Reference* . -## Options for combo boxes +## Opções de combo box -Combo box type objects accept two specific options concerning choice lists associated with them: +Objetos do tipo combo box aceitam duas opções específicas referentes a listas de escolhas associadas com elas: -- [Automatic insertion](properties_DataSource.md#automatic-insertion): enables automatically adding a value to a list stored in memory when a user enters a value that is not found in the choice list associated with the combo box. -- [Excluded List](properties_RangeOfValues.md#excluded-list) (list of excluded values): allows setting a list whose values cannot be entered in the combo box. If an excluded value is entered, it is not accepted and an error message is displayed. +- [Inserção automática](properties_DataSource.md#automatic-insertion): permite adicionar um valor automaticamente a uma lista armazenada na memória quando um usuário digitar um valor que não é encontraddo na lista de escolhas associadas com uma combo box. +- [Excluded List](properties_RangeOfValues.md#excluded-list) (lista de valores excluídos): permite estabelecer uma lista cujos valores não podem ser digitados na combo box. Se um valor excluído for digitado, não será aceito e uma mensagem de erro é exibido. +> > > Associar uma [lista de valores exigidos](properties_RangeOfValues.md#required-list) não está disponível para combo boxes. Em uma interface, se um objeto precisar propor uma lista finita de valores exigidos, então deve usar um objeto [do tipo menu Pop-up](dropdownList_Overview.md#overview) . -> Associating a [list of required values](properties_RangeOfValues.md#required-list) is not available for combo boxes. In an interface, if an object must propose a finite list of required values, then you must use a [Pop-up menu type](dropdownList_Overview.md#overview) object. - -## Supported Properties - -[Alpha Format](properties_Display.md#alpha-format) - [Bold](properties_Text.md#bold) - [Bottom](properties_CoordinatesAndSizing.md#bottom) - [Button Style](properties_TextAndPicture.md#button-style) - [Choice List](properties_DataSource.md#choice-list) - [Class](properties_Object.md#css-class) - [Date Format](properties_Display.md#date-format) - [Focusable](properties_Entry.md#focusable) - [Font](properties_Text.md#font) - [Font Color](properties_Text.md#font-color) - [Font Size](properties_Text.md#font-size) - [Height](properties_CoordinatesAndSizing.md#height) - [Help Tip](properties_Help.md#help-tip) - [Horizontal Sizing](properties_ResizingOptions.md#horizontal-sizing) - [Italic](properties_Text.md#italic) - [Left](properties_CoordinatesAndSizing.md#left) - [Not rendered](properties_Display.md#not-rendered) - [Object Name](properties_Object.md#object-name) - [Right](properties_CoordinatesAndSizing.md#right) - [Standard action](properties_Action.md#standard-action) - [Time Format](properties_Display.md#time-format) - [Top](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [Underline](properties_Text.md#underline) - [Variable or Expression](properties_Object.md#variable-or-expression) - [Vertical Sizing](properties_ResizingOptions.md#vertical-sizing) - [Visibility](properties_Display.md#visibility) - [Width](properties_CoordinatesAndSizing.md#width) \ No newline at end of file +## Propriedades compatíveis +[Formato Alfa](properties_Display.md#alpha-format) - [Negrito](properties_Text.md#bold) - [Inferior](properties_CoordinatesAndSizing.md#bottom) - \[Estilo de botão\](properties_TextAndPicture. md#button-style) - [Lista de opções](properties_DataSource.md#choice-list) - [Classe](properties_Object.md#css-class) - [Formato de data](properties_Display.md#date-format) - \[Focável\](properties_Entry. md#focusable) - [Fonte](properties_Text.md#font) - [Cor da fonte](properties_Text.md#font-color) - [Tamanho da fonte](properties_Text.md#font-size) - \[Altura\](properties_CoordinatesAndSizing. md#height) - [Conselho de ajuda](properties_Help.md#help-tip) - [Tamanho horizontal](properties_ResizingOptions.md#horizontal-sizing) - \[Itálica\](properties_Text. md#italic) - [Esquerda](properties_CoordinatesAndSizing.md#left) - [Não renderizado](properties_Display.md#not-rendered) - [Nome de objeto](properties_Object.md#object-name) - \[Direita\](properties_CoordinatesAndSizing. md#right) - [Ação padrão](properties_Action.md#standard-action) - [Formato de hora](properties_Display.md#time-format) - \[Top\](properties_CoordinatesAndSizing. md#top) - [Tipo](properties_Object.md#type) - [Sublinhado](properties_Text.md#underline) - [Variável ou Expressão](properties_Object.md#variable-or-expression) - \[Tamanho vertical\](properties_ResizingOptions. md#vertical-sizing) - [Visibilidade](properties_Display.md#visibility) - [Largura](properties_CoordinatesAndSizing.md#width) diff --git a/website/translated_docs/pt/FormObjects/dropdownList_Overview.md b/website/translated_docs/pt/FormObjects/dropdownList_Overview.md index 7ca5577027277c..be523fbdc8cc91 100644 --- a/website/translated_docs/pt/FormObjects/dropdownList_Overview.md +++ b/website/translated_docs/pt/FormObjects/dropdownList_Overview.md @@ -1,25 +1,26 @@ --- id: dropdownListOverview -title: Drop-down List +title: Lista suspensa ou drop down --- -## Overview +## Visão Geral -Drop-down lists are objects that allow the user to select from a list. You manage the items displayed in the drop-down list using an array, a choice list, or a standard action. +Listas drop-down são objetos que permitem que os usuários selecionem de uma lista. Gerenciar os itens exibidos na lista drop down usando um array, uma lista de escolha ou uma ação padrão. -On macOS, drop-down lists are also sometimes called "pop-up menu". Both names refer to the same objects. As the following example shows, the appearance of these objects can differ slightly according to the platform: +Em macOS, listas drop down são também chamadas de "menu pop up" Ambos os nomes referem aos mesmos objetos. Ambos os nomes referem aos mesmos objetos. Como no exemplo abaixo, a aparência desses objetos podem diferenciar levemente de acordo com a plataforma: ![](assets/en/FormObjects/popupDropdown_appearance.png) -## Using an array -An [array](Concepts/arrays.md) is a list of values in memory that is referenced by the name of the array. A drop-down list displays an array as a list of values when you click on it. +## Usar um array -Drop-down list objects are initialized by loading a list of values into an array. You can do this in several ways: +Um [array](Concepts/arrays.md) é uma lista de valores na memória que são referenciados pelo nome do array. Uma lista drop down exibe um array como lista de valores quando clicar nela. -* Enter a list of default values in the object properties by selecting "\" in the [Data Source](properties_DataSource.md) theme of the Property List. The default values are loaded into an array automatically. You can refer to the array using the name of the variable associated with the object. +Objetos lista drop down são iniciados ao carregar uma lista de valores em um array. Pode fazer isso de várias maneiras: -* Before the object is displayed, execute code that assigns values to the array elements. For example: +* Digite uma lista de valores padrão nas propriedades objeto ao selecionar "\" in the [Data Source](properties_DataSource.md) theme of the Property List. Os valores padrão são carregados em um array automático. Pode fazer uma referência ao array usando o nome da variável associado com o objeto. + +* Antes que o objeto seja exibido, execute um código que atribua valores aos elementos do array. Por exemplo: ```4d ARRAY TEXT($aCities;6) @@ -30,18 +31,17 @@ Drop-down list objects are initialized by loading a list of values into an array $aCities{5}:="Frostbite Falls" $aCities{6}:="Green Bay" ``` +Neste caso, o nome da variável associada ao objeto de formulário deve ser *$aCities*. Esse código pode ser colocado no método formulário e executado quando o evento de formulário `On Load` acontecer. -In this case, the name of the variable associated with the object in the form must be *$aCities*. This code could be placed in the form method and be executed when the `On Load` form event runs. - -* Before the object is displayed, load the values of a list into the array using the [LIST TO ARRAY](https://doc.4d.com/4Dv17R5/4D/17-R5/LIST-TO-ARRAY.301-4127385.en.html) command. For example: +* Antes que o objeto seja exibido, carregue os valores para uma lista em um array usando o comando [LIST TO ARRAY](https://doc.4d.com/4Dv17R5/4D/17-R5/LIST-TO-ARRAY.301-4127385.en.html). Por exemplo: ```4d LIST TO ARRAY("Cities";$aCities) ``` -In this case also, the name of the variable associated with the object in the form must be *$aCities*. This code would be run in place of the assignment statements shown above. + Neste caso também o nome da variável asociada al objeto del formulario debe ser *$aCities*. Este código pode ser executado ao invés das sentenças de atribuição mostradas anteriormente. -If you need to save the user’s choice into a field, you would use an assignment statement that runs after the record is accepted. The code might look like this: +Se precisar salvar as escolhas do usuário em um campo, precisa usar uma declaração de atribuição que rode depois que o registro seja aceito. O código poderia ser assim: ```4d Case of @@ -61,34 +61,30 @@ If you need to save the user’s choice into a field, you would use an assignmen End case ``` -You must select each [event] that you test for in your Case statement. Arrays always contain a finite number of items. The list of items is dynamic and can be changed by a method. Items in an array can be modified, sorted, and added to. +Deve selecionar cada [event] que teste nas estruturas "For" de seu código. Os arrays sempre contém um número finito de elementos. A lista de elementos é dinâmica e pode ser modificada por um método. Itens em um array podem ser modificados, ordenados e terem itens adicionados. -## Using a choice list -If you want to use a drop-down list to manage the values of a listed field or variable, 4D lets you reference the field or variable directly as the object's data source. This makes it easier to manage listed fields/variables. +## Utilizar uma lista de seleção -> If you use a hierarchical list, only the first level is displayed and can be selected. +Se quiser usar uma lista drop down para gerenciar os valores de um campo ou lista variável, 4D permite referir o campo ou variável diretamente como fonte de dados do objeto. Isso facilita gerenciar variáveis/campos listados. +> Se usar uma lista hierárquica, só o primeiro nível é mostrado e pode ser selecionado. -For example, in the case of a "Color" field that can only contain the values "White", "Blue", "Green" or "Red", it is now possible to create a list containing these values and associate it with a pop-up menu object that references the 4D "Color" field. 4D then automatically takes care of managing the input and display of the current value in the form. +Por exemplo, no caso de um campo "Cor" que só possa conter os valores "White", "Blue", "Green" ou "Red", agora é possível criar uma lista que contenha esses valores e associe-os a um objeto emergente menu que faça referência ao campo "Color". 4D então se encarrega automaticamente de gerenciar o input e exibir os valores atuais no formulário. -To associate a pop-up menu/drop-down list or a combo box with a field or variable, you can just enter the name of the field or variable directly in the [Variable or Expression](properties_Object.md#variable-or-expression) of the object in the Property List. +Para associar um menu pop up/lista drop down ou um combo box com um campo ou variável, pode digitar o nome do campo ou variável diretamente no campo [Variável ou Expressão](properties_Object.md#variable-or-expression) do objeto na Lista Propriedade. -When the form is executed, 4D automatically manages the pop-up menu or combo box during input or display: when a user chooses a value, it is saved in the field; this field value is shown in the pop-up menu when the form is displayed: +Quando o formulário for executado, 4D automaticamente gerencia o menu pop up ou com box durante a entrada ou a visualização: quando um usuário escolher um valor, é salvo no campo; esse valor de campo é mostrado no menu pop up quando o formulário for exibido: ![](assets/en/FormObjects/popupDropdown_choiceList.png) +> Não é possível combinar esse princípio com o uso de um array para iniciar o objeto. Se digitar um nome de campo na área Nome da variável, deve usar uma lista de seleção. -> It is not possible to combine this principle with using an array to initialize the object. If you enter a field name in the Variable Name area, then you must use a choice list. - -### Save as - -When you have associated a pop-up menu/drop-down list with a choice list and with a field, you can use the [Save as Value/Reference property](properties_DataSource.md#save-as). This option lets you optimize the size of the data saved. - -## Using a standard action - -You can assign a standard action to a pop-up menu/drop-down list ([Action](properties_Action.md#standard-action) theme of the Property List). Only actions that display a sublist of items (except the goto page action) are supported by this object. For example, if you select the `backgroundColor` standard action, at runtime the object will display an automatic list of background colors. You can can override this automatic list by assigning in addition a choice list in which each item has been assigned a custom standard action. +### Salvar como +Quando associar um menu pop up/lista drop down com uma lista de escolhas e com um campo, pode usar a propriedade [Save as Value/Reference](properties_DataSource.md#save-as). Essa opção permite otimizar o tamanho dos dados salvos. -For more information, please refer to the [Standard actions](https://doc.4d.com/4Dv17R5/4D/17-R5/Standard-actions.300-4163633.en.html) section. +## Usar uma ação padrão +Pode atribuir uma ação padrão a menu pop up ou lista drop down ([Action](properties_Action.md#standard-action) tema da Lista de Propriedades). Só as ações que exibam uma sublista de itens (exceto a ação de Ir para Página) são compatíveis com esse tipo de objeto. Por exemplo, se selecionar a ação padrão `backgroundColor`, no tempo de execução o objeto mostrará uma lista automática de cores de fundo. Pode substituir esta lista automática atribuindo além disso uma lista de seleção na qual cada elemento tenha atribuída uma ação padrão personalizada. -## Supported Properties +Para saber mais veja [Standard actions](https://doc.4d.com/4Dv17R5/4D/17-R5/Standard-actions.300-4163633.en.html) -[Alpha Format](properties_Display.md#alpha-format) - [Bold](properties_Text.md#bold) - [Bottom](properties_CoordinatesAndSizing.md#bottom) - [Button Style](properties_TextAndPicture.md#button-style) - [Choice List](properties_DataSource.md#choice-list) - [Class](properties_Object.md#css-class) - [Date Format](properties_Display.md#date-format) - [Expression Type](properties_Object.md#expression-type) - [Focusable](properties_Entry.md#focusable) - [Font](properties_Text.md#font) - [Font Color](properties_Text.md#font-color) - [Font Size](properties_Text.md#font-size) - [Height](properties_CoordinatesAndSizing.md#height) - [Help Tip](properties_Help.md#help-tip) - [Horizontal Sizing](properties_ResizingOptions.md#horizontal-sizing) - [Italic](properties_Text.md#italic) - [Left](properties_CoordinatesAndSizing.md#left) - [Not rendered](properties_Display.md#not-rendered) - [Object Name](properties_Object.md#object-name) - [Right](properties_CoordinatesAndSizing.md#right) - [Standard action](properties_Action.md#standard-action) - [Save as](properties_DataSource.md#save-as) - [Time Format](properties_Display.md#time-format) - [Top](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [Underline](properties_Text.md#underline) - [Variable or Expression](properties_Object.md#variable-or-expression) - [Vertical Sizing](properties_ResizingOptions.md#vertical-sizing) - [Visibility](properties_Display.md#visibility) - [Width](properties_CoordinatesAndSizing.md#width) \ No newline at end of file +## Propriedades compatíveis +[Formato Alfa](properties_Display.md#alpha-format) - [Negrita](properties_Text.md#bold) - [Inferior](properties_CoordinatesAndSizing.md#bottom) - \[Estilo del botón\](properties_TextAndPicture. md#button-style) - [Lista de opciones](properties_DataSource.md#choice-list) - [Clase](properties_Object.md#css-class) - [Formato de fecha](properties_Display.md#date-format) - \[Tipo de expresión\](properties_Object. md#expression-type) - [Focusable](properties_Entry.md#focusable) - [Fuente](properties_Text.md#font) - [Color de la fuente](properties_Text.md#font-color) - \[Tamaño de la fuente\](properties_Text. md#font-size) - [Altura](properties_CoordinatesAndSizing.md#height) - [Consejo de ayuda](properties_Help.md#help-tip) - [Tamaño horizontal](properties_ResizingOptions.md#horizontal-sizing) - \[Italic\](properties_Text. md#italic) - [Izquierda](properties_CoordinatesAndSizing.md#left) - [No renderizado](properties_Display.md#not-rendered) - \[Nombre del objeto\](properties_Object. md#object-name) - [Derecha](properties_CoordinatesAndSizing.md#right) - [Acción estándar](properties_Action.md#standard-action) - [Guardar como](properties_DataSource.md#save-as) - \[Formato de tiempo\](properties_Display. md#time-format) - [Superior](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [Subrayado](properties_Text.md#underline) - \[Variable o expresión\](properties_Object. md#variable-or-expression) - [Tamaño vertical](properties_ResizingOptions.md#vertical-sizing) - [Visibilidad](properties_Display.md#visibility) - [Ancho](properties_CoordinatesAndSizing.md#width) diff --git a/website/translated_docs/pt/FormObjects/formObjects_overview.md b/website/translated_docs/pt/FormObjects/formObjects_overview.md index e9ebd8cf456f0e..4271bec3659eab 100644 --- a/website/translated_docs/pt/FormObjects/formObjects_overview.md +++ b/website/translated_docs/pt/FormObjects/formObjects_overview.md @@ -12,15 +12,15 @@ You build and customize your application forms by manipulating the objects on th - **active objects** perform a database task or an interface function. Fields are active objects. Other active objects — enterable objects (variables), combo boxes, drop-down lists, picture buttons, and so on — store data temporarily in memory or perform some action such as opening a dialog box, printing a report, or starting a background process. - **static objects** are generally used for setting the appearance of the form and its labels as well as for the graphic interface. Static objects do not have associated variables like active objects. However, you can insert dynamic objects into static objects. + ## Handling form objects You can add or modify 4D form objects in the following ways: -* **Form editor:** Drag an object from the Form editor toolbar onto the form. Then use the Property List to specify the object's properties. - See the [Building Forms](https://doc.4d.com/4Dv17R6/4D/17-R6/Building-forms.200-4354618.en.html) chapter for more information. +* **Editor de formulários:** arraste um objeto da barra de ferramentas do editor de formulários ao formulário. Then use the Property List to specify the object's properties. + See the [Building Forms](https://doc.4d.com/4Dv17R6/4D/17-R6/Building-forms.200-4354618.en.html) chapter for more information. * **4D language**: Commands from the [Objects (Forms)](https://doc.4d.com/4Dv17R5/4D/17-R5/Objects-Forms.201-4127128.en.html) theme such as `OBJECT DUPLICATE` or `OBJECT SET FONT STYLE` allow to create and define form objects. -* **JSON code in dynamic forms:** Define the properties using JSON. Use the [type](properties_Object.md#type) property to define the object type, then set its available properties. See the [Dynamic Forms](https://doc.4d.com/4Dv17R5/4D/17-R5/Dynamic-Forms.300-4163740.en.html#3692292) page for information. - Example for a button object: - ``` { "type": "button", "style": "bevel", "text": "OK", "action": "Cancel", "left": 60, "top": 160, "width": 100, "height": 20 } \ No newline at end of file +* **Editor de formulários:** arraste um objeto da barra de ferramentas do editor de formulários ao formulário. Then use the Property List to specify the object's properties. + Consulte a página [Formulários dinâmicos](https://doc.4d.com/4Dv17R5/4D/17-R5/Dynamic-Forms.300-4163740.en.html#3692292) para obter informação. diff --git a/website/translated_docs/pt/FormObjects/groupBox.md b/website/translated_docs/pt/FormObjects/groupBox.md index d3095e25041a87..c2e78b03ae0277 100644 --- a/website/translated_docs/pt/FormObjects/groupBox.md +++ b/website/translated_docs/pt/FormObjects/groupBox.md @@ -1,26 +1,27 @@ --- id: groupBox -title: Group Box +title: Área de grupo --- A group box is a static object that allows you to visually assemble multiple form objects: ![](assets/en/FormObjects/groupBox.png) - > The name of a group box is static text; you can use a “localizable” reference as with any 4D label (see [Using references in static text](https://doc.4d.com/4Dv17R5/4D/17-R5/Using-references-in-static-text.300-4163725.en.html) and *XLIFF Architecture* section in 4D Design Reference. + + #### JSON Example: - "myGroup": { - "type": "groupBox", - "title": "Employee Info" - "left": 60, - "top": 160, - "width": 100, - "height": 20 - } - +``` + "myGroup": { + "type": "groupBox", + "title": "Employee Info" + "left": 60, + "top": 160, + "width": 100, + "height": 20 + } +``` #### Supported Properties - -[Bottom](properties_CoordinatesAndSizing.md#bottom) - [CSS Class](properties_Object.md#css-class) - [Font](properties_Text.md#font) - [Font Color](properties_Text.md#font-color) - [Font Size](properties_Text.md#font-size) - [Height](properties_CoordinatesAndSizing.md#height) - [Horizontal Alignment](properties_Text.md#horizontal-alignment) - [Horizontal Sizing](properties_ResizingOptions.md#horizontal-sizing) - [Italic](properties_Text.md#italic) - [Left](properties_CoordinatesAndSizing.md#left) - [Object Name](properties_Object.md#object-name) - [Right](properties_CoordinatesAndSizing.md#right) - [Title](properties_Object.md#title) - [Top](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [Underline](properties_Text.md#underline) - [Vertical Sizing](properties_ResizingOptions.md#vertical-sizing) - [Visibility](properties_Display.md#visibility) - [Width](properties_CoordinatesAndSizing.md#width) \ No newline at end of file +[Bottom](properties_CoordinatesAndSizing.md#bottom) - [CSS Class](properties_Object.md#css-class) - [Font](properties_Text.md#font) - [Font Color](properties_Text.md#font-color) - [Font Size](properties_Text.md#font-size) - [Height](properties_CoordinatesAndSizing.md#height) - [Horizontal Alignment](properties_Text.md#horizontal-alignment) - [Horizontal Sizing](properties_ResizingOptions.md#horizontal-sizing) - [Italic](properties_Text.md#italic) - [Left](properties_CoordinatesAndSizing.md#left) - [Object Name](properties_Object.md#object-name) - [Right](properties_CoordinatesAndSizing.md#right) - [Title](properties_Object.md#title) - [Top](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [Underline](properties_Text.md#underline) - [Vertical Sizing](properties_ResizingOptions.md#vertical-sizing) - [Visibility](properties_Display.md#visibility) - [Width](properties_CoordinatesAndSizing.md#width) diff --git a/website/translated_docs/pt/FormObjects/input_overview.md b/website/translated_docs/pt/FormObjects/input_overview.md index bdea0a52a031ca..e7d00f19c3773e 100644 --- a/website/translated_docs/pt/FormObjects/input_overview.md +++ b/website/translated_docs/pt/FormObjects/input_overview.md @@ -1,9 +1,9 @@ --- id: inputOverview -title: Input +title: Entrada --- -## Overview +## Visão Geral Inputs allow you to add enterable or non-enterable expressions such as database [fields](Concepts/identifiers.md#fields) and [variables](Concepts/variables.md) to your forms. Inputs can handle character-based data (text, dates, numbers...) or pictures: @@ -15,29 +15,30 @@ In addition, inputs can be [enterable or non-enterable](properties_Entry.md#ente You can manage the data with object or form [methods](Concepts/methods.md). + ### JSON Example: ```4d - "myText": { - "type": "input", //define the type of object - "spellcheck": true, //enable spelling verification - "left": 60, //left position on the form - "top": 160, //top position on the form - "width": 100, //width of the object - "height": 20 //height of the object + "meuTexto": { + "tipo": "input", //define o tipo de objeto + "spellcheck": true, //ativa a verificação ortográfica + "left": 60, //posição esquerda no formulário + "top": 160, //posição superior no formulário + "width": 100, //largura objeto + "height": 20 //altura do objeto } ``` -## Supported Properties -[Alpha Format](properties_Display.md#alpha-format) - [Auto Spellcheck](properties_Entry.md#auto-spellcheck) - [Bold](properties_Text.md#bold) - [Boolean Format](properties_Display.md#boolean-format) - [Border Line Style](properties_BackgroundAndBorder.md#border-line-style) - [Bottom](properties_CoordinatesAndSizing.md#bottom) - [Choice List](properties_DataSource.md#choice-list) - [Class](properties_Object.md#css-class) - [Context Menu](properties_Entry.md#context-menu) - [Date Format](properties_Display.md#date-format) - [Default value](properties_RangeOfValues.md#default-value) - [Draggable](properties_Action.md#draggable) - [Droppable](properties_Action.md#droppable) - [Enterable](properties_Entry.md#enterable) - [Entry Filter](properties_Entry.md#entry-filter) - [Excluded List](properties_RangeOfValues.md#excluded-list) - [Expression type](properties_Object.md#expression-type) - [Fill Color](properties_BackgroundAndBorder.md#fill-color) - [Font](properties_Text.md#font) - [Font Color](properties_Text.md#font-color) - [Font Size](properties_Text.md#font-size) - [Height](properties_CoordinatesAndSizing.md#height) - [Hide focus rectangle](properties_Appearance.md#hide-focus-rectangle) - [Horizontal Alignment](properties_Text.md#horizontal-alignment) - [Horizontal Scroll Bar](properties_Appearance.md#horizontal-scroll-bar) - [Horizontal Sizing](properties_ResizingOptions.md#horizontal-sizing) - [Italic](properties_Text.md#italic) - [Left](properties_CoordinatesAndSizing.md#left) - [Line Width](properties_BackgroundAndBorder.md#line-width) - [Multiline](properties_Entry.md#multiline) - [Multi-style](properties_Text.md#multi-style) - [Number Format](properties_Display.md#number-format) - [Object Name](properties_Object.md#object-name) - [Orientation](properties_Text.md#orientation) - [Picture Format](properties_Display.md#picture-format) - [Placeholder](properties_Entry.md#placeholder) - [Print Frame](properties_Print.md#print-frame) - [Required List](properties_RangeOfValues.md#required-list) - [Right](properties_CoordinatesAndSizing.md#right) - [Save as](properties_DataSource.md#save-as) - [Selection always visible](properties_Entry.md#selection-always-visible) - [Store with default style tags](properties_Text.md#store-with-default-style-tags) - [Text when False/Text when True](properties_Display.md#text-when-false-text-when-true) - [Time Format](properties_Display.md#time-format) - [Top](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [Underline](properties_Text.md#underline) - [Variable or Expression](properties_Object.md#variable-or-expression) - [Vertical Scroll Bar](properties_Appearance.md#vertical-scroll-bar) - [Vertical Sizing](properties_ResizingOptions.md#vertical-sizing) - [Visibility](properties_Display.md#visibility) - [Width](properties_CoordinatesAndSizing.md#width) - [Wordwrap](properties_Display.md#wordwrap) +## Supported Properties +[Formato Alfa](properties_Display.md#alpha-format) - [Comprovação ortográfica automática](properties_Entry.md#auto-spellcheck) - [Negrita](properties_Text.md#bold) - \[Formato booleano\](properties_Display. md#boolean-format) - [Estilo de linha de borda](properties_BackgroundAndBorder.md#border-line-style) - [Fundo](properties_CoordinatesAndSizing.md#bottom) - \[Lista de opções\](properties_DataSource. md#choice-list) - [Classe](properties_Object.md#css-class) - [Menú de contexto](properties_Entry.md#context-menu) - \[Formato de data\](properties_Display. md#date-format) - [Valor por padrão](properties_RangeOfValues.md#default-value) - [Arrastável](properties_Action.md#draggable) - [Soltável](properties_Action.md#droppable) - \[Editável\](properties_Entry. md#enterable) - [Filtro de entrada](properties_Entry.md#entry-filter) - [Lista de exclusão](properties_RangeOfValues.md#excluded-list) - \[Tipo de expressão\](properties_Object. md#expression-type) - [Cor de preenchimento](properties_BackgroundAndBorder.md#fill-color) - [Fonte](properties_Text.md#font) - [Cor de fonte](properties_Text.md#font-color) - \[Tamanho da fonte\](properties_Text. md#font-size) - [Altura](properties_CoordinatesAndSizing.md#height) - [Ocultar retângulo de enfoque](properties_Appearance.md#hide-focus-rectangle) - \[Alinhamento horizontal\](properties_Text. md#horizontal-alignment) - [Barra de deslocamento horizontal](properties_Appearance.md#horizontal-scroll-bar) - [Tamanho horizontal](properties_ResizingOptions.md#horizontal-sizing) - \[Itálica\](properties_Text. md#italic) - [Esquerda](properties_CoordinatesAndSizing.md#left) - [Largura de linha](properties_BackgroundAndBorder.md#line-width) - [Multiline](properties_Entry.md#multiline) - \[Multi-estilo\](properties_Text. md#multi-style) - [Formato numérico](properties_Display.md#number-format) - [Nome de objeto](properties_Object.md#object-name) - \[Orientação\](properties_Text. md#orientation) - [Formato de imagem](properties_Display.md#picture-format) - [Titular](properties_Entry.md#placeholder) - \[Marco de impressão\](properties_Print. md#print-frame) - [Lista requerida](properties_RangeOfValues.md#required-list) - [Direita](properties_CoordinatesAndSizing.md#right) - [Salvar como](properties_DataSource.md#save-as) - \[Seleção sempre visível\](properties_Entry. md#selection-always-visible) - [Salvar com etiquetas de estilo por padrão](properties_Text.md#store-with-default-style-tags) - \[Texto quando for falso/Texto quando for verdadeiro\](properties_Display. md#text-when-false-text-when-true) - [Formato de tempo](properties_Display.md#time-format) - [Superior](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - \[Sublinhado\](properties_Text. md#underline) - [Variável ou expressão](properties_Object.md#variable-or-expression) - [Barra de deslocamento vertical](properties_Appearance.md#vertical-scroll-bar) - \[Tamanho vertical\](properties_ResizingOptions. md#vertical-sizing) - [Visibilidade](properties_Display.md#visibility) - [Largura](properties_CoordinatesAndSizing.md#width) - [Wordwrap](properties_Display.md#wordwrap) -* * * -## Input alternatives +--- +## Alternativas You can also represent field and variable expressions in your forms using alternative objects, more particularly: -* You can display and enter data from database fields directly in columns of [selection type List boxes](listbox_overview.md). -* You can represent a list field or variable directly in a form using [Pop-up Menus/Drop-down Lists](popupMenuDropdownList_overview) and [Combo Boxes](comboBox_overview.md) objects. -* You can represent a boolean expression as a [check box](checkbox_overview.md) or as a [radio button](radio_overview.md) object. \ No newline at end of file +* You can display and enter data from database fields directly in columns of [selection type List boxes](listbox_overview.md). +* You can represent a list field or variable directly in a form using [Pop-up Menus/Drop-down Lists](popupMenuDropdownList_overview) and [Combo Boxes](comboBox_overview.md) objects. +* You can represent a boolean expression as a [check box](checkbox_overview.md) or as a [radio button](radio_overview.md) object. diff --git a/website/translated_docs/pt/FormObjects/list_overview.md b/website/translated_docs/pt/FormObjects/list_overview.md index e8330b343a31ea..a0c0c4d1a2d647 100644 --- a/website/translated_docs/pt/FormObjects/list_overview.md +++ b/website/translated_docs/pt/FormObjects/list_overview.md @@ -3,7 +3,7 @@ id: listOverview title: Hierarchical List --- -## Overview +## Visão Geral Hierarchical lists are form objects that can be used to display data as lists with one or more levels that can be expanded or collapsed. @@ -11,16 +11,18 @@ Hierarchical lists are form objects that can be used to display data as lists wi Where appropriate, the expand/collapse icon is automatically displayed to the left of the item. Hierarchical lists support an unlimited number of sublevels. -## Hierarchical list data source + +## Fonte de dados de lista hierárquica The contents of a hierarchical list form object can be initialized in one of the following ways: - Associate an existing [choice list](properties_DataSource.md#choice-list) to the object. The choice list must have been defined in the List editor in Design mode. -- Directly assign a hierarchical list reference to the [variable or expression](properties_Object.md#variable-or-expression) associated with the form object. +- Directly assign a hierarchical list reference to the [variable or expression](properties_Object.md#variable-or-expression) associated with the form object. In both cases, you manage a hierarchical list at runtime through its *ListRef* reference, using the [Hierarchical list](https://doc.4d.com/4Dv17R6/4D/17-R6/Hierarchical-Lists.201-4310291.en.html) commands in the 4D language. -## ListRef and object name + +## RefList e nome de objeto A hierarchical list is both a **language object** existing in memory and a **form object**. @@ -28,7 +30,7 @@ The **language object** is referenced by an unique internal ID of the Longint ty The **form object** is not necessarily unique: there may be several representations of the same hierarchical list in the same form or in different ones. As with other form objects, you specify the object in the language using the syntax (*;"ListName", etc.). -You connect the hierarchical list "language object" with the hierarchical list "form object" by the intermediary of the variable containing the ListRef value. For example, if you have associated the $mylist [variable](properties_Object.md#variable-or-expression) to the form object, you can write: +You connect the hierarchical list "language object" with the hierarchical list "form object" by the intermediary of the variable containing the ListRef value. Por exemplo, se tiver associado a $mylist [variável](properties_Object.md#variable-or-expression) ao objeto formulário, pode escrever: ```4d $mylist:=New list @@ -49,7 +51,6 @@ You must use the `ListRef` ID with language commands when you want to specify th ```4d SET LIST ITEM FONT(*;"mylist1";*;thefont) ``` - > ... you are indicating that you want to modify the font of the hierarchical list item associated with the *mylist1* form object. The command will take the current item of the *mylist1* object into account to specify the item to modify, but this modification will be carried over to all the representations of the list in all of the processes. ### Support of @ @@ -57,7 +58,6 @@ SET LIST ITEM FONT(*;"mylist1";*;thefont) As with other object property management commands, it is possible to use the “@” character in the `ListName` parameter. As a rule, this syntax is used to designate a set of objects in the form. However, in the context of hierarchical list commands, this does not apply in every case. This syntax will have two different effects depending on the type of command: - For commands that set properties, this syntax designates all the objects whose name corresponds (standard behavior). For example, the parameter "LH@" designates all objects of the hierarchical list type whose name begins with “LH.” - - `DELETE FROM LIST` - `INSERT IN LIST` - `SELECT LIST ITEMS BY POSITION` @@ -66,8 +66,8 @@ As with other object property management commands, it is possible to use the “ - `SET LIST ITEM ICON` - `SET LIST ITEM PARAMETER` - `SET LIST ITEM PROPERTIES` + - For commands retrieving properties, this syntax designates the first object whose name corresponds: - - `Count list items` - `Find in list` - `GET LIST ITEM` @@ -79,7 +79,8 @@ As with other object property management commands, it is possible to use the “ - `List item position` - `Selected list items` -## Generic commands to use with hierarchical lists + +## Comandos genéricos utilizáveis com listas hierárquicas It is possible to modify the appearance of a hierarchical list form objects using several generic 4D commands. You can pass to these commands either the object name of the hierarchical list (using the * parameter), or its variable name (containing the ListRef value): @@ -95,7 +96,7 @@ It is possible to modify the appearance of a hierarchical list form objects usin > Reminder: Except `OBJECT SET SCROLL POSITION`, these commands modify all the representations of the same list, even if you only specify a list via its object name. -## Priority of property commands +## Prioridade dos comandos de propriedade Certain properties of hierarchical lists (for example, the **Enterable** attribute or the color) can be set in different ways: in the form properties, via a command of the “Object Properties” theme or via a command of the “Hierarchical Lists” theme. When all three of these means are used to set list properties, the following order of priority is applied: @@ -105,13 +106,15 @@ Certain properties of hierarchical lists (for example, the **Enterable** attribu This principle is applied regardless of the order in which the commands are called. If an item property is modified individually via a hierarchical list command, the equivalent object property command will have no effect on this item even if it is called subsequently. For example, if the color of an item is modified via the `SET LIST ITEM PROPERTIES` command, the `OBJECT SET COLOR` command will have no effect on this item. -## Management of items by position or by reference + +## Gerenciamento dos itens por posição ou referência You can usually work in two ways with the contents of hierarchical lists: by position or by reference. - When you work by position, 4D bases itself on the position in relation to the items of the list displayed on screen in order to identify them. The result will differ according to whether or not certain hierarchical items are expanded or collapsed. Note that in the case of multiple representations, each form object has its own configuration of expanded/collapsed items. - When you work by reference, 4D bases itself on the *itemRef* ID number of the list items. Each item can thus be specified individually, regardless of its position or its display in the hierarchical list. + ### Using item reference numbers (itemRef) Each item of a hierarchical list has a reference number (*itemRef*) of the Longint type. This value is only intended for your own use: 4D simply maintains it. @@ -122,14 +125,14 @@ Here are a few tips for using reference numbers: 1. You do not need to identify each item with a unique number (beginner level). -- First example: you build a system of tabs by programming, for example, an address book. Since the system returns the number of the tab selected, you will probably not need more information than this. In this case, do not worry about item reference numbers: pass any value (except 0) in the *itemRef* parameter. Note that for an address book system, you can predefine a list A, B, ..., Z in Design mode. You can also create it by programming in order to eliminate any letters for which there are no records. -- Second example: while working with a database, you progressively build a list of keywords. You can save this list at the end of each session by using the `SAVE LIST` or `LIST TO BLOB` commands and reload it at the beginning of each new session using the `Load list` or `BLOB to list` commands. You can display this list in a floating palette; when each user clicks on a keyword in the list, the item chosen is inserted into the enterable area that is selected in the foreground process. The important thing is that you only process the item selected, because the `Selected list items` command returns the position of the item that you must process. When using this position value, you obtain the title of the item by means of the `GET LIST ITEM` command. Here again, you do not need to identify each item individually; you can pass any value (except 0) in the *itemRef* parameter. + - First example: you build a system of tabs by programming, for example, an address book. Since the system returns the number of the tab selected, you will probably not need more information than this. In this case, do not worry about item reference numbers: pass any value (except 0) in the *itemRef* parameter. Note that for an address book system, you can predefine a list A, B, ..., Z in Design mode. You can also create it by programming in order to eliminate any letters for which there are no records. + - Second example: while working with a database, you progressively build a list of keywords. You can save this list at the end of each session by using the `SAVE LIST` or `LIST TO BLOB` commands and reload it at the beginning of each new session using the `Load list` or `BLOB to list` commands. You can display this list in a floating palette; when each user clicks on a keyword in the list, the item chosen is inserted into the enterable area that is selected in the foreground process. The important thing is that you only process the item selected, because the `Selected list items` command returns the position of the item that you must process. When using this position value, you obtain the title of the item by means of the `GET LIST ITEM` command. Here again, you do not need to identify each item individually; you can pass any value (except 0) in the *itemRef* parameter. 2. You need to partially identify the list items (intermediary level). - You use the item reference number to store information needed when you must work with the item; this point is detailed in the example of the `APPEND TO LIST` command. In this example, we use the item reference numbers to store record numbers. However, we must be able to establish a distinction between items that correspond to the [Department] records and those that correspond to the [Employees] records. + You use the item reference number to store information needed when you must work with the item; this point is detailed in the example of the `APPEND TO LIST` command. In this example, we use the item reference numbers to store record numbers. However, we must be able to establish a distinction between items that correspond to the [Department] records and those that correspond to the [Employees] records. 3. You need to identify all the list items individually (advanced level). - You program an elaborate management of hierarchical lists in which you absolutely must be able to identify each item individually at every level of the list. A simple way of implementing this is to maintain a personal counter. Suppose that you create a *hlList* list using the `APPEND TO LIST` command. At this stage, you initialize a counter *vhlCounter* to 1. Each time you call `APPEND TO LIST` or `INSERT IN LIST`, you increment this counter `(vhlCounter:=vhlCounter+1)`, and you pass the counter number as the item reference number. The trick consists in never decrementing the counter when you delete items — the counter can only increase. In this way, you guarantee the uniqueness of the item reference numbers. Since these numbers are of the Longint type, you can add or insert more than two billion items in a list that has been reinitialized... (however if you are working with such a great number of items, this usually means that you should use a table rather than a list.) + You program an elaborate management of hierarchical lists in which you absolutely must be able to identify each item individually at every level of the list. A simple way of implementing this is to maintain a personal counter. Suppose that you create a *hlList* list using the `APPEND TO LIST` command. At this stage, you initialize a counter *vhlCounter* to 1. Each time you call `APPEND TO LIST` or `INSERT IN LIST`, you increment this counter `(vhlCounter:=vhlCounter+1)`, and you pass the counter number as the item reference number. The trick consists in never decrementing the counter when you delete items — the counter can only increase. In this way, you guarantee the uniqueness of the item reference numbers. Since these numbers are of the Longint type, you can add or insert more than two billion items in a list that has been reinitialized... (however if you are working with such a great number of items, this usually means that you should use a table rather than a list.) > If you use Bitwise Operators, you can also use item reference numbers for storing information that can be put into a Longint, i.e. 2 Integers, 4-byte values or, yet again, 32 Booleans. @@ -139,7 +142,8 @@ In most cases, when using hierarchical lists for user interface purposes and whe Basically, you need to deal with item reference numbers when you want direct access to any item of the list programmatically and not necessarily the one currently selected in the list. -## Modifiable element + +## Elemento modificável You can control whether hierarchical list items can be modified by the user by using the **Alt+click**(Windows) / **Option+click** (macOS) shortcut, or by carrying out a long click on the text of the item. @@ -147,6 +151,7 @@ You can control whether hierarchical list items can be modified by the user by u - In addition, if you populate the hierarchical list using a list created in the Lists editor, you control whether an item in a hierarchical list is modifiable using the **Modifiable Element** option in the Lists editor. For more information, see [Setting list properties](https://doc.4d.com/4Dv17R6/4D/17-R6/Setting-list-properties.300-4354625.en.html). + ## Supported Properties -[Bold](properties_Text.md#bold) - [Border Line Style](properties_BackgroundAndBorder.md#border-line-style) - [Bottom](properties_CoordinatesAndSizing.md#bottom) - [Choice List](properties_DataSource.md#choice-list) - [Class](properties_Object.md#css-class) - [Draggable](properties_Action.md#draggable-and-droppable) - [Droppable](properties_Action.md#draggable-and-droppable) - [Enterable](properties_Entry.md#enterable) - [Entry Filter](properties_Entry.md#entry-filter) - [Fill Color](properties_BackgroundAndBorder.md#background-color-fill-color) - [Focusable](properties_Entry.md#focusable) - [Font](properties_Text.md#font) - [Font Color](properties_Text.md#font-color) - [Font Size](properties_Text.md#font-size) - [Height](properties_CoordinatesAndSizing.md#height) - [Hide focus rectangle](properties_Appearance.md#hide-focus-rectangle) - [Horizontal Scroll Bar](properties_Appearance.md#horizontal-scroll-bar) - [Horizontal Sizing](properties_ResizingOptions.md#horizontal-sizing) - [Italic](properties_Text.md#italic) - [Left](properties_CoordinatesAndSizing.md#left) - [Multi-selectable](properties_Action.md#multi-selectable) - [Object Name](properties_Object.md#object-name) - [Right](properties_CoordinatesAndSizing.md#right) - [Top](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [Underline](properties_Text.md#underline) - [Vertical Scroll Bar](properties_Appearance.md#vertical-scroll-bar) - [Vertical Sizing](properties_ResizingOptions.md#vertical-sizing) - [Variable or Expression](properties_Object.md#variable-or-expression) - [Visibility](properties_Display.md#visibility) - [Width](properties_CoordinatesAndSizing.md#width) \ No newline at end of file +[Negrita](properties_Text.md#bold) - [Estilo de linha de borda](properties_BackgroundAndBorder.md#border-line-style) - [Inferior](properties_CoordinatesAndSizing.md#bottom) - \[Lista de opções\](properties_DataSource. md#choice-list) - [Classe](properties_Object.md#css-class) - [Arrastável](properties_Action.md#draggable-and-droppable) - [Soltável](properties_Action.md#draggable-and-droppable) - \[Editável\](properties_Entry. md#enterable) - [Filtro de entrada](properties_Entry.md#entry-filter) - [Cor de preenchimento](properties_BackgroundAndBorder.md#background-color-fill-color) - [Focável](properties_Entry.md#focusable) - \[Fonte\](properties_Text. md#font) - [Cor da fonte](properties_Text.md#font-color) - [Tamanho da fonte](properties_Text.md#font-size) - [Altura](properties_CoordinatesAndSizing.md#height) - \[Ocultar retângulo de enfoque\](properties_Appearance. md#hide-focus-rectangle) - [Barra de deslocamento horizontal](properties_Appearance.md#horizontal-scroll-bar) - [Tamanho horizontal](properties_ResizingOptions.md#horizontal-sizing) - \[Itálica\](properties_Text. md#italic) - [esquerda](properties_CoordinatesAndSizing.md#left) - [Multi-selecionável](properties_Action.md#multi-selectable) - [Nome do objeto](properties_Object.md#object-name) - \[Direita\](properties_CoordinatesAndSizing. md#right) - [Superior](properties_CoordinatesAndSizing.md#top) - [Tipo](properties_Object.md#type) - \[Sublinhado\](properties_Text. md#underline) - [Barra de deslocamento vertical](properties_Appearance.md#vertical-scroll-bar) - \[Tamanho vertical\](properties_ResizingOptions. md#vertical-sizing) - [Variável ou expressão](properties_Object.md#variable-or-expression) - [Visibilidade](properties_Display.md#visibility) - [Largura](properties_CoordinatesAndSizing.md#width) diff --git a/website/translated_docs/pt/FormObjects/listbox_overview.md b/website/translated_docs/pt/FormObjects/listbox_overview.md index 9162a6ee6bf918..2dc008b9079ea4 100644 --- a/website/translated_docs/pt/FormObjects/listbox_overview.md +++ b/website/translated_docs/pt/FormObjects/listbox_overview.md @@ -3,319 +3,338 @@ id: listboxOverview title: List Box --- -## Overview +## Visão Geral -List boxes are complex active objects that allow displaying and entering data as synchronized columns. They can be bound to database contents such as entity selections and record sections, or to any language contents such as collections and arrays. They include advanced features regarding data entry, column sorting, event managemet, customized appearance, moving of columns, etc. +List boxes são objetos ativos complexos que permitem exibir e ingressar dados como colunas sincronizadas. Podem ser conectadas aos conteúdos de banco de dados como seleções de entidade e seleções de registro, ou para conteúdos de linguagem como coleções e arrays. Incluem funções avançadas relativas à entrada de dados, a ordenação de colunas, a gestão de eventos, o aspecto personalizado, o deslocamento de colunas, etc. ![](assets/en/FormObjects/listbox.png) -A list box contains one or more columns whose contents are automatically synchronized. The number of columns is, in theory, unlimited (it depends on the machine resources). +Uma list box contém uma ou mais colunas cujo conteúdos são automaticamente sincronizados. O número de colunas é teoricamente ilimitado (depende dos recursos da máquina). -### Basic user features +### Funcionalidades de usuário básicas -During execution, list boxes allow displaying and entering data as lists. To make a cell editable ([if entry is allowed for the column](#managing-entry)), simply click twice on the value that it contains: +Durante a execução, list boxes permitem exibir e ingressar dados como listas. Para tornar uma célula editável ([se a entrada for permitida para a coluna](#managing-entry)), simplesmente clique duas vezes no valor que contém: ![](assets/en/FormObjects/listbox_edit.png) -Users can enter and display the text on several lines within a list box cell. To add a line break, press **Ctrl+Carriage return** on Windows or **Option+Carriage return** on macOS. +Usuários podem ingressar e exibir o texto em várias linhas dentro de uma célula list box. Para adicionar uma quebra de linha pressione **Ctrl+Retorno de carro** em Windows ou **Opção+Retorno de Carro** em macOS. -Booleans and pictures can be displayed in cells, as well as dates, times, or numbers. It is possible to sort column values by clicking on a header ([standard sort](#managing-sorts)). All columns are automatically synchronized. +Booleanos e imagens podem ser exibidos em células, assim como datas, horas ou números. É possível ordenar valores em colunas clicando em um cabeçalho ([ordenação padrão](#managing-sorts)). Todas as colunas são sincronizadas automaticamente. -It is also possible to resize each column, and the user can modify the order of [columns](properties_ListBox.md#locked-columns-and-static-columns) and [rows](properties_Action.md#movable-rows) by moving them using the mouse, if this action is authorized. Note that list boxes can be used in [hierarchical mode](#hierarchical-list-boxes). +Também é possível redimensionar cada coluna, e o usuário pode modificar a ordem das [colunas](properties_ListBox.md#locked-columns-and-static-columns) e [linhas](properties_Action.md#movable-rows) ao movê-las usando o mouse, se essa ação for autorizada. Note que a list boxes podem ser usadas em [modo hierarquico](#hierarchical-list-boxes). -The user can select one or more rows using the standard shortcuts: **Shift+click** for an adjacent selection and **Ctrl+click** (Windows) or **Command+click** (macOS) for a non-adjacent selection. +O usuário pode selecionar um ou mais linhas usando os atalhos padrão: **Shift+clique** para uma seleção adjacente **Ctrl+clique** (Windows) ou **Comando+clique** (macOS) para uma seleção não adjacente. -### List box parts -A list box is composed of four distinct parts: +### Partes de list box -* the list box object in its entirety, -* columns, -* column headers, and -* column footers. +Uma list box é composta de quatro partes diferentes: + +* o objeto list box em sua globalidade +* colunas, +* cabeçalhos de coluna, e +* rodapés de colunas. ![](assets/en/FormObjects/listbox_parts.png) -Each part has its own name as well as specific properties. For example, the number of columns or the alternating color of each row is set in the list box object properties, the width of each column is set in the column properties, and the font of the header is set in the header properties. +Cada parte tem seu próprio nome assim como propriedades específicas. Por exemplo, o número de colunas ou as cores alternativas de cada linha é estabelecida nas propriedades de objeto list box, a largura de cada coluna é estabelecida nas propriedades de colunas e a fonte do cabeçalho é estabelecida nas propriedades de cabeçalho. + +É possível adicionar um método objeto para o objeto list box ou para cada coluna da list box. Métodos objetos são chamados na ordem abaixo: + +1. Método objeto de cada coluna +2. Método objeto da list box + +O método objeto coluna obtém eventos que ocorrem em seu [cabeçalho](#list-box-headers) e [rodapé](#list-box-footers). -It is possible to add an object method to the list box object and/or to each column of the list box. Object methods are called in the following order: -1. Object method of each column -2. Object method of the list box -The column object method gets events that occur in its [header](#list-box-headers) and [footer](#list-box-footers). +### Tipos de List box -### List box types +Há vários tipos de list boxes com seus próprios comportamentos e propriedades específicos. O tipo list box depende das propriedades [Data Source property](properties_Object.md#data-source): -There are several types of list boxes, with their own specific behaviors and properties. The list box type depends on its [Data Source property](properties_Object.md#data-source): +- **Arrays**: cada coluna é conectada a um array 4D. List boxes baseadas em array podem ser exibidas como [list boxes hierárquicas](listbox_overview.md#hierarchical-list-boxes). +- **Seleção** (**Seleção atual** ou **Seleções nomeadas**): cada coluna é conectada a uma expressão (por exemplo um campo) que é avaliado para cada registro da seleção. +- **Coleção ou seleção de entidade**: cada coluna é conectada a uma expressão que é avaliada para todo elemento da coleção ou toda entidade da seleção de entidade. +> > > Não é possível combinar tipos de list boxes diferentes no mesmo objeto list box. A fonte de dados é estabelecida quando a list box é criada. Não é mais possível modificar por programação. -- **Arrays**: each column is bound to a 4D array. Array-based list boxes can be displayed as [hierarchical list boxes](listbox_overview.md#hierarchical-list-boxes). -- **Selection** (**Current selection** or **Named selection**): each column is bound to an expression (e.g. a field) which is evaluated for every record of the selection. -- **Collection or Entity selection**: each column is bound to an expression which is evaluated for every element of the collection or every entity of the entity selection. -> It is not possible to combine different list box types in the same list box object. The data source is set when the list box is created. It is then no longer possible to modify it by programming. +### Gerenciando list boxes -### Managing list boxes +Pode configurar completamente um objeto list box através de suas propriedades e também pode gerenciar dinamicamente por programação. -You can completely configure a list box object through its properties, and you can also manage it dynamically through programming. +A linguagem 4D inclui um tema dedicado "List Box" para comandos list box, mas comandos de vários outros temas, como comandos "Object properties" ou `EDIT ITEM`, `Displayed line number` podem ser usados. Veja a página [Sumário Comandos List Box](https://doc.4d.com/4Dv17R6/4D/17-R6/List-Box-Commands-Summary.300-4311159.en.html) em *Referência de Linguagem 4D* para mais informação. -The 4D Language includes a dedicated "List Box" theme for list box commands, but commands from various other themes, such as "Object properties" commands or `EDIT ITEM`, `Displayed line number` commands can also be used. Refer to the [List Box Commands Summary](https://doc.4d.com/4Dv17R6/4D/17-R6/List-Box-Commands-Summary.300-4311159.en.html) page of the *4D Language reference* for more information. -## List box objects -### Array list boxes +## Objetos tipo list box -In an array list box, each column must be associated with a one-dimensional 4D array; all array types can be used, with the exception of pointer arrays. The number of rows is based on the number of array elements. +### List box de tipo array -By default, 4D assigns the name “ColumnX” to each column variable, and thus to each associated array. You can change it, as well as other column properties, in the [column properties](listbox_overview.md#column-specific-properties). The display format for each column can also be defined using the `OBJECT SET FORMAT` command +Em um list box de tipo array, cada coluna deve estar associada a um array unidimensional 4D; podem ser utilizados todos os tipos de array, com exceção dos arrays de ponteiros. O número de linhas é baseado no número de elementos array. -> Array type list boxes can be displayed in [hierarchical mode](listbox_overview.md#hierarchical-list-boxes), with specific mechanisms. +Como padrão, 4D atribui o nome "ColumnX" para cada coluna. Pode mudar isso, assim como outras propriedades de coluna, nas [propriedades de coluna](listbox_overview.md#column-specific-properties). O formato de exibição para cada coluna também pode ser definido usando o comando `OBJECT SET FORMAT` +> List boxes tipo array podem ser exibidas em [modo hierárquico](listbox_overview.md#hierarchical-list-boxes), com mecanismos específicos. -With array type list box, the values entered or displayed are managed using the 4D language. You can also associate a [choice list](properties_DataSource.md#choice-list) with a column in order to control data entry. The values of columns are managed using high-level List box commands (such as `LISTBOX INSERT ROWS` or `LISTBOX DELETE ROWS`) as well as array manipulation commands. For example, to initialize the contents of a column, you can use the following instruction: +Com list box de tipo array, o valor ingressado ou exibido são gerenciados usando a linguagem 4D. Também pode associar uma [lista de escolha](properties_DataSource.md#choice-list) com uma coluna para controlar entrada de dados.´ Os valores de coluna são gerenciados usando comandos de List box de alto nível (tais como `LISTBOX INSERT ROWS` ou `LISTBOX DELETE ROWS`) assim como comandos manipulação de array. Os valores de coluna são gerenciados usando comandos de List box de alto nível (tais como `LISTBOX INSERT ROWS` ou `LISTBOX DELETE ROWS`) assim como comandos manipulação de array. Por exemplo, para iniciar os conteúdos da coluna, pode usar a instrução abaixo: ```4d -ARRAY TEXT(ColumnName;size) +ARRAY TEXT(varCol;size) ``` -You can also use a list: +Também pode usar uma lista: ```4d -LIST TO ARRAY("ListName";ColumnName) +LIST TO ARRAY("ListName";varCol) ``` +> **Aviso**: quando uma list box conter vários tamanhos diferentes de coluna, só o número de itens do menor array (coluna) será exibido. Tem que verificar que cada array tenha o mesmo número de elementos que os outros. Além disso, se uma coluna list box for vazia (isso ocorre quando o array associado não for corretamente declarado ou dimensionado usando a linguagem), a list box não exibe nada. + + + -> **Warning**: When a list box contains several columns of different sizes, only the number of items of the smallest array (column) will be displayed. You should make sure that each array has the same number of elements as the others. Also, if a list box column is empty (this occurs when the associated array was not correctly declared or sized using the language), the list box displays nothing. +### List box de tipo seleção -### Selection list boxes +Nesse tipo de list box, cada coluna pode ser associada com um campo (por exemplo `[Employees]LastName)` ou uma expressão. A expressão pode ser baseada em um ou mais campos (por exemplo), `[Employees]FirstName+" "[Employees]LastName`) ou simplesmente ser uma fórmula (por exemplo `String(Milisegundos)`). A expressão também pode ser um método de proejeto, uma variável ou um item array. Pode usar os comandos `LISTBOX SET COLUMN FORMULA` e `LISTBOX INSERT COLUMN FORMULA` para modificar colunas por programação. -In this type of list box, each column can be associated with a field (for example `[Employees]LastName)` or an expression. The expression can be based on one or more fields (for example, `[Employees]FirstName+" "[Employees]LastName`) or it may simply be a formula (for example `String(Milliseconds)`). The expression can also be a project method, a variable or an array item. You can use the `LISTBOX SET COLUMN FORMULA` and `LISTBOX INSERT COLUMN FORMULA` commands to modify columns programmatically. +Os conteúdos de cada linha são avaliados de acordo com a seleção de registros: **a seleção atual** de uma tablea ou uma **seleção nomeada**. -The contents of each row is then evaluated according to a selection of records: the **current selection** of a table or a **named selection**. +No caso de uma list box baseada na seleção atual de uma tablea, qualquer modificação feita do lado da database é refletida automaticamente na list box e vice versa. A seleção atual é portanto sempre a mesma em ambos os lugares. -In the case of a list box based on the current selection of a table, any modification done from the database side is automatically reflected in the list box, and vice versa. The current selection is therefore always the same in both places. -### Collection or Entity selection list boxes +### List boxes de coleção ou de seleção de entidade -In this type of list box, each column must be associated to an expression. The contents of each row is then evaluated per collection element or per entity of the entity selection. +Nesse tipo de list box, cada coluna deve ser associada a uma expressão. Os conteúdos de cada linha são então avaliados por elemento de coleção ou por entidade da seleção de entidade. -Each element of the collection or each entity is available as an object that can be accessed through the [This](https://doc.4d.com/4Dv17R6/4D/17-R6/This.301-4310806.en.html) command. A column expression can be a project method, a variable, or any formula, accessing each entity or collection element object through `This`, for example `This.` (or `This.value` in case of a collection of scalar values). You can use the `LISTBOX SET COLUMN FORMULA` and `LISTBOX INSERT COLUMN FORMULA` commands to modify columns programmatically. +Cada elemento da coleção ou cada entidade está disponível como um objeto que pode ser acessada através do comando [This](https://doc.4d.com/4Dv17R6/4D/17-R6/This.301-4310806.en.html). Uma expressão coluna pode ser um método de projeto, uma variável ou qualquer fórmula, acessando cada entidade ou objeto elementod e coleção através de `This`, por exemplo `This.` (ou `This.value` no caso de uma coleção de valores escalares). Pode usar os comandos `LISTBOX SET COLUMN FORMULA` e `LISTBOX INSERT COLUMN FORMULA` para modificar colunas por programação. -When the data source is an entity selection, any modifications made on the list box side are automatically saved in the database. On the other hand, modifications made on the database side are visible in the list box after touched entities have been reloaded. +Quando a fonte de dados for uma seleção de entidades, qualquer modificação feita no lado da list box são salvas automaticamente na database. Do outro lado, modificações feitas na database são visíveis na list box depois que as entidades tocadas foram recarregadas. -When the data source is a collection, any modifications made in the list box values are reflected in the collection. On the other hand, if modifications are done on the collection using for example the various methods of the *Collections* theme, you will need to explicitely notify 4D by reassigning the collection variable to itself, so that the list box contents is refreshed. For example: +Quando a fonte de dados for uma coleção, qualquer modificação feita nos valores da list box são refletidas na coleção. Por outro lado, se modificações forem feitas na coleção usando por exemplo os vários métodos do tema *Coleções*, precisará notificar explicitamente 4D reatribuindo a variável coleção para si mesma, para que os conteúdos da list box sejam renovados. Por exemplo: ```4d -myCol:=myCol.push("new value") //display new value in list box +myCol:=myCol.push("new value") //exibir novo valor na list box ``` -### Supported Properties - -Supported properties depend on the list box type. - -| Property | Array list box | Selection list box | Collection or Entity Selection list box | -| -------------------------------------------------------------------------------------------- | -------------- | ------------------ | --------------------------------------- | -| [Alternate Background Color](properties_BackgroundAndBorder.md#alternate-background-color) | X | X | X | -| [Background Color](properties_BackgroundAndBorder.md#background-color) | X | X | X | -| [Bold](properties_Text.md#bold) | X | X | X | -| [Background Color Expression](properties_BackgroundAndBorder.md#background-color-expression) | | X | X | -| [Border Line Style](properties_BackgroundAndBorder.md#border-line-style) | X | X | X | -| [Bottom](properties_CoordinatesAndSizing.md#bottom) | X | X | X | -| [Class](properties_Object.md#css-class) | X | X | X | -| [Collection or entity selection](properties_Object.md#collection-or-entity-selection) | | X | X | -| [Column Auto-Resizing](properties_ResizingOptions.md#column-auto-resizing) | X | X | X | -| [Current item](properties_DataSource.md#current-item) | | | X | -| [Current item position](properties_DataSource.md#current-item-position) | | | X | -| [Data Source](properties_Object.md#data-source) | X | X | X | -| [Detail Form Name](properties_ListBox.md#detail-form-name) | | X | | -| [Display Headers](properties_Headers.md#display-headers) | X | X | X | -| [Display Footers](properties_Footers.md#display-footers) | X | X | X | -| [Double-click on row](properties_ListBox.md#double-click-on-row) | | X | | -| [Draggable](properties_Action.md#droppable) | X | X | X | -| [Droppable](properties_Action.md#droppable) | X | X | X | -| [Focusable](properties_Entry.md#focusable) | X | X | X | -| [Font](properties_Text.md#font) | X | X | X | -| [Font Color](properties_Text.md#font_color) | X | X | X | -| [Font Color Expression](properties_Text.md#font-color-expression) | | X | X | -| [Font Size](properties_Text.md#font-size) | X | X | X | -| [Height (list box)](properties_CoordinatesAndSizing.md#height) | X | X | X | -| [Height (headers)](properties_Headers.md#height) | X | X | X | -| [Height (footers)](properties_Footers.md#height) | X | X | X | -| [Hide extra blank rows](properties_BackgroundAndBorder.md#hide-extra-blank-rows) | X | X | X | -| [Hide focus rectangle](properties_Appearance.md#hide-focus-rectangle) | X | X | X | -| [Hide selection highlight](properties_Appearance.md#hide-selection-highlight) | X | X | X | -| [Hierarchical List Box](properties_Object.md#hierarchical-list-box) | X | | | -| [Highlight Set](properties_ListBox.md#highlight-set) | | X | | -| [Horizontal Alignment](properties_Text.md#horizontal-alignment) | X | X | X | -| [Horizontal Line Color](properties_Gridlines.md#horizontal-line-color) | X | X | X | -| [Horizontal Scroll Bar](properties_Appearance.md#horizontal-scroll-bar) | X | X | X | -| [Horizontal Sizing](properties_ResizingOptions.md#horizontal-sizing) | X | X | X | -| [Italic](properties_Text.md#italic) | X | X | X | -| [Left](properties_CoordinatesAndSizing.md#left) | X | X | X | -| [Master Table](properties_DataSource.md#table) | | X | | -| [Meta info expression](properties_Text.md#meta-info-expression) | | | X | -| [Method](properties_Action.md#method) | X | X | X | -| [Movable Rows](properties_Action.md#movable-rows) | X | | | -| [Named Selection](properties_DataSource.md#selectionName) | | X | | -| [Number of Columns](properties_ListBox.md#number-of-columns) | X | X | X | -| [Number of Locked Columns](properties_ListBox.md#number-of-locked-columns) | X | X | X | -| [Number of Static Columns](properties_ListBox.md#number-of-static-columns) | X | X | X | -| [Object Name](properties_Object.md#object-name) | X | X | X | -| [Right](properties_CoordinatesAndSizing.md#right) | X | X | X | -| [Row Background Color Array](properties_BackgroundAndBorder.md#row-background-color-array) | X | | | -| [Row Control Array](properties_ListBox.md#row-control-array) | X | | | -| [Row Font Color Array](properties_Text.md#row-font-color-array) | X | | | -| [Row Height](properties_CoordinatesAndSizing.md#row-height) | X | | | -| [Row Height Array](properties_CoordinatesAndSizing.md#row-height-array) | X | | | -| [Row Style Array](properties_Text.md#row-style-array) | X | | | -| [Selected Items](properties_DataSource.md#selected-items) | | | X | -| [Selection Mode](properties_ListBox.md#selection-mode) | X | X | X | -| [Single-Click Edit](properties_Entry.md#single-click-edit) | X | X | X | -| [Sortable](properties_Action.md#sortable) | X | X | X | -| [Standard action](properties_Action.md#standard-action) | X | | | -| [Style Expression](properties_Text.md#style-expression) | | X | X | -| [Top](properties_CoordinatesAndSizing.md#top) | X | X | X | -| [Transparent](properties_BackgroundAndBorder.md#transparent) | X | X | X | -| [Type](properties_Object.md#type) | X | X | X | -| [Underline](properties_Text.md#underline) | X | X | X | -| [Variable or Expression](properties_Object.md#variable-or-expression) | X | X | | -| [Vertical Alignment](properties_Text.md#vertical-alignment) | X | X | X | -| [Vertical Line Color](properties_Gridlines.md#vertical-line-color) | X | X | X | -| [Vertical Scroll Bar](properties_Appearance.md#vertical-scroll-bar) | X | X | X | -| [Vertical Sizing](properties_ResizingOptions.md#vertical-sizing) | X | X | X | -| [Visibility](properties_Display.md#visibility) | X | X | X | -| [Width](properties_CoordinatesAndSizing.md#width) | X | X | X | - - -> List box columns, headers and footers support specific properties. - -## List box columns - -A list box is made of one or more column object(s) which have specific properties. You can select a list box column in the Form editor by clicking on it when the list box object is selected: + + +### Propriedades suportadas + +Propriedades compatíveis dependem do tipo de list box. + + +| Propriedade | List box de tipo array | List box de tipo seleção | List box de tipo coleção ou seleção entidade | +| ------------------------------------------------------------------------------------------- | ---------------------- | ------------------------ | -------------------------------------------- | +| [Cor de fundo alternado](properties_BackgroundAndBorder.md#alternate-background-color) | X | X | X | +| [Cor de fundo](properties_BackgroundAndBorder.md#background-color) | X | X | X | +| [Negrito](properties_Text.md#bold) | X | X | X | +| [Expressão cor fundo](properties_BackgroundAndBorder.md#background-color-expression) | | X | X | +| [Estilo borda linha](properties_BackgroundAndBorder.md#border-line-style) | X | X | X | +| [Fundo](properties_CoordinatesAndSizing.md#bottom) | X | X | X | +| [Classe](properties_Object.md#css-class) | X | X | X | +| [Seleção de entidade ou coleção](properties_Object.md#collection-or-entity-selection) | | X | X | +| [Autodimensionamento coluna](properties_ResizingOptions.md#column-auto-resizing) | X | X | X | +| [Item atual](properties_DataSource.md#current-item) | | | X | +| [Posição item atual](properties_DataSource.md#current-item-position) | | | X | +| [Fonte de dados](properties_Object.md#data-source) | X | X | X | +| [Nome formulário detalhe](properties_ListBox.md#detail-form-name) | | X | | +| [Exibir cabeçalhos](properties_Headers.md#display-headers) | X | X | X | +| [Exibir rodapés](properties_Footers.md#display-footers) | X | X | X | +| [Duplo clique em linha](properties_ListBox.md#double-click-on-row) | | X | | +| [Arrastável](properties_Action.md#droppable) | X | X | X | +| [Soltável](properties_Action.md#droppable) | X | X | X | +| [Focável](properties_Entry.md#focusable) | X | X | X | +| [Fonte](properties_Text.md#font) | X | X | X | +| [Cor fonte](properties_Text.md#font_color) | X | X | X | +| [Expressão cor fonte](properties_Text.md#font-color-expression) | | X | X | +| [Tamanho fonte](properties_Text.md#font-size) | X | X | X | +| [Altura (list box)](properties_CoordinatesAndSizing.md#height) | X | X | X | +| [Altura (cabeçalhos)](properties_Headers.md#height) | X | X | X | +| [Altura (rodapés)](properties_Footers.md#height) | X | X | X | +| [Esconder linhas em branco extras](properties_BackgroundAndBorder.md#hide-extra-blank-rows) | X | X | X | +| [Esconder retangulo foco](properties_Appearance.md#hide-focus-rectangle) | X | X | X | +| [Esconder ressalte seleção](properties_Appearance.md#hide-selection-highlight) | X | X | X | +| [List box hierárquica](properties_Object.md#hierarchical-list-box) | X | | | +| [Ressaltar conjunto](properties_ListBox.md#highlight-set) | | X | | +| [Alihamento horizontal](properties_Text.md#horizontal-alignment) | X | X | X | +| [Cor linha horizontal](properties_Gridlines.md#horizontal-line-color) | X | X | X | +| [Barra rolagem horizontal](properties_Appearance.md#horizontal-scroll-bar) | X | X | X | +| [Dimensionamento horizontal](properties_ResizingOptions.md#horizontal-sizing) | X | X | X | +| [Itálico](properties_Text.md#italic) | X | X | X | +| [Esquerda](properties_CoordinatesAndSizing.md#left) | X | X | X | +| [Tabela mestre](properties_DataSource.md#table) | | X | | +| [Expressão info meta](properties_Text.md#meta-info-expression) | | | X | +| [Métodos](properties_Action.md#method) | X | X | X | +| [Linhas móveis](properties_Action.md#movable-rows) | X | | | +| [Seleção nomeada](properties_DataSource.md#selectionName) | | X | | +| [Número de colunas](properties_ListBox.md#number-of-columns) | X | X | X | +| [Número de colunas trancadas](properties_ListBox.md#number-of-locked-columns) | X | X | X | +| [Número de colunas estáticas](properties_ListBox.md#number-of-static-columns) | X | X | X | +| [Nome Objeto](properties_Object.md#object-name) | X | X | X | +| [Direita](properties_CoordinatesAndSizing.md#right) | X | X | X | +| [Array cor fundo linha](properties_BackgroundAndBorder.md#row-background-color-array) | X | | | +| [Array controle linha](properties_ListBox.md#row-control-array) | X | | | +| [Array cores de fonte](properties_Text.md#row-font-color-array) | X | | | +| [Altura linha](properties_CoordinatesAndSizing.md#row-height) | X | | | +| [Array altura linha](properties_CoordinatesAndSizing.md#row-height-array) | X | | | +| [Array estilo linha](properties_Text.md#row-style-array) | X | | | +| [Itens selecionados](properties_DataSource.md#selected-items) | | | X | +| [Modo seleção](properties_ListBox.md#selection-mode) | X | X | X | +| [Editar com um clique](properties_Entry.md#single-click-edit) | X | X | X | +| [Ordenável](properties_Action.md#sortable) | X | X | X | +| [Ação padrão](properties_Action.md#standard-action) | X | | | +| [Expressão estilo](properties_Text.md#style-expression) | | X | X | +| [Topo](properties_CoordinatesAndSizing.md#top) | X | X | X | +| [Transparente](properties_BackgroundAndBorder.md#transparent) | X | X | X | +| [Tipo](properties_Object.md#type) | X | X | X | +| [Sublinhado](properties_Text.md#underline) | X | X | X | +| [Variável ou expressão](properties_Object.md#variable-or-expression) | X | X | | +| [Alinhamento vertical](properties_Text.md#vertical-alignment) | X | X | X | +| [Cor linha vertical](properties_Gridlines.md#vertical-line-color) | X | X | X | +| [Barra rolagem vertical](properties_Appearance.md#vertical-scroll-bar) | X | X | X | +| [Dimensionamento vertical](properties_ResizingOptions.md#vertical-sizing) | X | X | X | +| [Visibilidade](properties_Display.md#visibility) | X | X | X | +| [Largura](properties_CoordinatesAndSizing.md#width) | X | X | X | + + +> Colunas list box, cabeçalhos e rodapés suportam propriedades específicas. + + + + + +## Colunas list boxes + +Uma list box é feita de um ou mais objetos coluna que têm propriedades específicas. Pode selecionar uma coluna list box no editor de Formulário clicando nela ou quando o objeto list box for selecionado: ![](assets/en/FormObjects/listbox_column.png) -You can set standard properties (text, background color, etc.) for each column of the list box; these properties take priority over those of the list box object properties. +Pode estabelecer propriedades padrão (texto, cor de fundo, etc) para cada coluna da list box: essas propriedades tem prioridade sobre as propriedades objeto da list box. +> Pode definir o [Tipo de expressão](properties_Object.md#expression-type) para colunas list box array (String, Texto, Número, Data, Hora, Imagem, Booleano, ou Objeto). O uso de arrays de objetos exige uma licença de 4D View Pro (ver [Utilização de arrays de objetos em colunas (4D View Pro)](#using-object-arrays-in-columns-4d-view-pro)). -> You can define the [Expression type](properties_Object.md#expression-type) for array list box columns (String, Text, Number, Date, Time, Picture, Boolean, or Object). The use of object arrays requires a 4D View Pro licence (see [Using object arrays in columns (4D View Pro)](#using-object-arrays-in-columns-4d-view-pro)). -### Column Specific Properties +### Propriedades específicas de coluna [Alpha Format](properties_Display.md#alpha-format) - [Alternate Background Color](properties_BackgroundAndBorder.md#alternate-background-color) - [Automatic Row Height](properties_CoordinatesAndSizing.md#automatic-row-height) - [Background Color](properties_Text.md#background-color) - [Background Color Expression](properties_BackgroundAndBorder.md#background-color-expression) - [Bold](properties_Text.md#bold) - [Choice List](properties_DataSource.md#choice-list) - [Class](properties_Object.md#css-class) - [Data Type (selection and collection list box column)](properties_DataSource.md#data-type) - [Date Format](properties_Display.md#date-format) - [Default Values](properties_DataSource.md#default-values) - [Display Type](properties_Display.md#display-type) - [Enterable](properties_Entry.md#enterable) - [Entry Filter](properties_Entry.md#entry-filter) - [Excluded List](properties_RangeOfValues.md#excluded-list) - [Expression](properties_DataSource.md#expression) - [Expression Type (array list box column)](properties_Object.md#expression-type) - [Font](properties_Text.md#font) - [Font Color](properties_Text.md#font-color) - [Horizontal Alignment](properties_Text.md#horizontal-alignment) - [Italic](properties_Text.md#italic) - [Invisible](properties_Display.md#visibility) - [Maximum Width](properties_CoordinatesAndSizing.md#maximum-width) - [Method](properties_Action.md#method) - [Minimum Width](properties_CoordinatesAndSizing.md#minimum-width) - [Multi-style](properties_Text.md#multi-style) - [Number Format](properties_Display.md#number-format) - [Object Name](properties_Object.md#object-name) - [Picture Format](properties_Display.md#picture-format) - [Resizable](properties_ResizingOptions.md#resizable) - [Required List](properties_RangeOfValues.md#required-list) - [Row Background Color Array](properties_BackgroundAndBorder.md#row-background-color-array) - [Row Font Color Array](properties_Text.md#row-font-color-array) - [Row Style Array](properties_Text.md#row-style-array) - [Save as](properties_DataSource.md#save-as) - [Style Expression](properties_Text.md#style-expression) - [Text when False/Text when True](properties_Display.md#text-when-false-text-when-true) - [Time Format](properties_Display.md#time-format) - [Truncate with ellipsis](properties_Display.md#truncate-with-ellipsis) - [Underline](properties_Text.md#underline) - [Variable or Expression](properties_Object.md#variable-or-expression) - [Vertical Alignment](properties_Text.md#vertical-alignment) - [Width](properties_CoordinatesAndSizing.md#width) - [Wordwrap](properties_Display.md#wordwrap) -## List box headers -> To be able to access the header properties of a list box, you must enable the [Display Headers](properties_Headers.md#display-headers) option of the list box. +## Cabeçalhos de list box -When headers are displayed, you can select a header in the Form editor by clicking it when the list box object is selected: +> Para poder acessar as propriedades de um cabeçalho deve ativar a opção[Exibir rodapés](properties_Footers.md#display-footers). + +Quando mostrar os cabeçalhos, pode selecionar um cabeçalho no editor de formulários clicando nele quando o objeto List Box estiver selecioando: ![](assets/en/FormObjects/listbox_header.png) -You can set standard text properties for each column header of the list box; in this case, these properties have priority over those of the column or of the list box itself. +Pode estabelecer propriedades de texto padrão para cada cabeçalho de coluna da list box, nesse caso, essas propriedades tem prioriedade sobre aquelas da coluna ou da própria list box. + -In addition, you have access to the specific properties for headers. Specifically, an icon can be displayed in the header next to or in place of the column title, for example when performing [customized sorts](#managing-sorts). +Além disso, tem acesso às propriedades específicas para cabeçalhos. Especificamente, um ícone pode ser exibido no cabeçalho do lado ou ao invés do título da coluna, por exemplo quando realizar [ordenações personalizadas](#managing-sorts). ![](assets/en/FormObjects/lbHeaderIcon.png) -At runtime, events that occur in a header are generated in the [list box column object method](#object-methods). +Na execução, eventos que ocorrem em um cabeçalho são gerados em [método de objeto coluna list box](#object-methods). -When the `OBJECT SET VISIBLE` command is used with a header, it is applied to all headers, regardless of the individual element set by the command. For example, `OBJECT SET VISIBLE(*;"header3";False)` will hide all headers in the list box object to which *header3* belongs and not simply this header. +Quando o comando `OBJECT SET VISIBLE` for usado com um cabeçalho, é aplicado a todos os cabeçalhos, independente do elemento individual estabelecido pelo comando. Por exemplo, `OBJECT SET VISIBLE(*;"header3";False)` esconde todos os cabeçalhos no objeto list box ao qual *header3* pertence e não apenas esse cabeçalho. -### Header Specific Properties +### Propriedades específicas de cabeçalho [Bold](properties_Text.md#bold) - [Class](properties_Object.md#css-class) - [Font](properties_Text.md#font) - [Font Color](properties_Text.md#font-color) - [Help Tip](properties_Help.md#help-tip) - [Horizontal Alignment](properties_Text.md#horizontal-alignment) - [Icon Location](properties_TextAndPicture.md#icon-location) - [Italic](properties_Text.md#italic) - [Object Name](properties_Object.md#object-name) - [Pathname](properties_TextAndPicture.md#picture-pathname) - [Title](properties_Object.md#title) - [Underline](properties_Text.md#underline) - [Variable or Expression](properties_Object.md#variable-or-expression) - [Vertical Alignment](properties_Text.md#vertical-alignment) - [Width](properties_CoordinatesAndSizing.md#width) -## List box footers -> To be able to access footer properties for a list box, you must enable the [Display Footers](properties_Footers.md#display-footers) option. -List boxes can contain non-enterable "footers" displaying additional information. For data shown in table form, footers are usually used to display calculations such as totals or averages. -When footers are displayed, you can click to select one when the list box object is selected in the Form editor: + +## Rodapés de list box +> Para poder acessar às propriedades dos cabeçalhos de um list box, deve ativar a opção [Mostrar cabeçalhos](properties_Headers.md#display-headers) da list box. + +List boxes podem conter "cabeçalhos" não editáveis, exibindo informação adicional. No caso de dados mostrados em formato de tabela, os rodapés são geralmente usados para exibir cálculos como totais ou médias. + +Quando cabeçalhos são exibidos, pode clicar para selecionar um quando o objeto list box for selecionado no editor de Formulário: ![](assets/en/FormObjects/listbox_footers.png) -For each List box column footer, you can set standard text properties: in this case, these properties take priority over those of the column or of the list box. You can also access specific properties for footers. In particular, you can insert a [custom or automatic calculation](properties_Object.md#variable-calculation). +Para cada cabeçalho coluna List Box pode estabelecer propriedades texto padrão: nesse caso, essas propriedades têm prioridade sobre àquelas da coluna ou da list box. Pode também acessar propriedades específicas para cabeçalhos. Particularmente pode inserir um [cálculo personalizado ou automático](properties_Object.md#variable-calculation). -At runtime, events that occur in a footer are generated in the [list box column object method](#object-methods). +Na execução, eventos que ocorrem em um rodapé são gerados em [método de objeto coluna list box](#object-methods). -When the `OBJECT SET VISIBLE` command is used with a footer, it is applied to all footers, regardless of the individual element set by the command. For example, `OBJECT SET VISIBLE(*;"footer3";False)` will hide all footers in the list box object to which *footer3* belongs and not simply this footer. +Quando o comando `OBJECT SET VISIBLE` for usado com um rodapé, é aplicado a todos os rodapés, independente do elemento individual estabelecido pelo comando. Por exemplo, `OBJECT SET VISIBLE(*;"footer3";False)` esconde todos os rodapés no objeto list box ao qual *footer3* pertence e não apenas esse rodapé. + +### Propriedades específicas do rodapé -### Footer Specific Properties [Alpha Format](properties_Display.md#alpha-format) - [Background Color](properties_BackgroundAndBorder.md#background-color-fill-color) - [Bold](properties_Text.md#bold) - [Class](properties_Object.md#css-class) - [Date Format](properties_Display.md#date-format) - [Expression Type](properties_Object.md#expression-type) - [Font](properties_Text.md#font) - [Font Color](properties_Text.md#font-color) - [Help Tip](properties_Help.md#help-tip) - [Horizontal Alignment](properties_Text.md#horizontal-alignment) - [Italic](properties_Text.md#italic) - [Number Format](properties_Display.md#number-format) - [Object Name](properties_Object.md#object-name) - [Picture Format](properties_Display.md#picture-format) - [Time Format](properties_Display.md#time-format) - [Truncate with ellipsis](properties_Display.md#truncate-with-ellipsis) - [Underline](properties_Text.md#underline) - [Variable Calculation](properties_Object.md#variable-calculation) - [Variable or Expression](properties_Object.md#variable-or-expression) - [Vertical Alignment](properties_Text.md#vertical-alignment) - [Width](properties_CoordinatesAndSizing.md#width) - [Wordwrap](properties_Display.md#wordwrap) -## Managing entry -For a list box cell to be enterable, both of the following conditions must be met: +## Gerenciar entrada + +Para uma célula list box ser editável, as duas condições abaixo devem ser atendidas: -- The cell’s column must have been set as [Enterable](properties_Entry.md#enterable) (otherwise, the cells of the column can never be enterable). -- In the `On Before Data Entry` event, $0 does not return -1. When the cursor arrives in the cell, the `On Before Data Entry` event is generated in the column method. If, in the context of this event, $0 is set to -1, the cell is considered as not enterable. If the event was generated after **Tab** or **Shift+Tab** was pressed, the focus goes to either the next cell or the previous one, respectively. If $0 is not -1 (by default $0 is 0), the cell is enterable and switches to editing mode. +- A coluna da célula deve ser estabelecida como [Editável](properties_Entry.md#enterable) (senão, as células da coluna nunca poderão ser editáveis). +- No evento `On Before Data Entry`, $0 não retorna -1. Quando o cursor chegar na célula, o evento `On Before Data Entry` é gerado no método coluna. Se, no contexto desse evento, $0 for estabelecido a -1, a célula é considerada como não editável. Se o evento for gerado depois de **Tab** ou **Shift+Tab** ter sido pressionado, o foco vai para a próxima célula ou para a célula anterior, respectivamente. Se $0 não for -1 (como padrão $0 é 0), a célula for editável e trocar para o modo edição. -Let’s consider the example of a list box containing two arrays, one date and one text. The date array is not enterable but the text array is enterable if the date has not already past. +Vamos considerar o exemplo de uma lsit box contendo dois arrays: uma data e um texto. O array data não é editável mas o array texto é editável se a data não tiver sido passada. ![](assets/en/FormObjects/listbox_entry.png) -Here is the method of the *arrText* column: +Aqui está o método da coluna *arrText*: ```4d Case of - :(Form event=On Before Data Entry) // a cell gets the focus + :(Form event=On Before Data Entry) // uma célua obtém o foco LISTBOX GET CELL POSITION(*;"lb";$col;$row) - // identification of cell - If(arrDate{$row} Entrada de dados em list boxes do tipo coleção/seleção de entidade tem uma limitação quando a expressão for analisada como null. Nesse caso, não é possível editar ou remover o valor null na célula. -- the [Current item](properties_DataSource.md#current-item) object contains the value before modification. -- the `This` object contains the modified value. -> Data entry in collection/entity selection type list boxes has a limitation when the expression evaluates to null. In this case, it is not possible to edit or remove the null value in the cell. -## Managing selections +## Gerenciar seleções -Selections are managed differently depending on whether the list box is based on an array, on a selection of records, or on a collection/entity selection: +Seleções são gerenciadas diretamente, dependendo de se a list box é a baseada em um array, em uma seleção de registros ou em uma coleção/seleção de entidades: -- **Selection list box**: Selections are managed by a set, which you can modify if necessary, called `$ListboxSetX` by default (where X starts at 0 and is incremented based on the number of list boxes in the form). This set is [defined in the properties](properties_ListBox.md#highlight-set) of the list box. It is automatically maintained by 4D: If the user selects one or more rows in the list box, the set is immediately updated. On the other hand, it is also possible to use the commands of the "Sets" theme in order to modify the selection of the list box via programming. +- **Lista box de tipo seleção**: as seleções são gerenciadas mediante um conjunto chamado como padrão `$ListboxSetX` (onde X começa em 0 e se incrementa em função do número de list box no formulário), que pode ser modificado se for necessário. Este conjunto se [define nas propriedades](properties_ListBox.md#highlight-set) da list box. É mantido automaticamente por 4D: se o usuário selecionar uma ou mais linhas na list box, o conjunto se atualiza imediatamente. Por outro lado, é também possível usar comandos do tema "Conjuntos" para modificar a seleção na list box via programação. -- **Collection/Entity selection list box**: Selections are managed through dedicated list box properties: - - - [Current item](properties_DataSource.md#current-item) is an object that will receive the selected element/entity - - [Selected Items](properties_DataSource.md#selected-items) is a collection of selected items - - [Current item position](properties_DataSource.md#current-item-position) returns the position of the selected element or entity. -- **Array list box**: The `LISTBOX SELECT ROW` command can be used to select one or more rows of the list box by programming. The [variable linked to the List box object](properties_Object.md#variable-or-expression) is used to get, set or store selections of object rows. This variable corresponds to a Boolean array that is automatically created and maintained by 4D. The size of this array is determined by the size of the list box: it contains the same number of elements as the smallest array linked to the columns. Each element of this array contains `True` if the corresponding line is selected and `False` otherwise. 4D updates the contents of this array depending on user actions. Inversely, you can change the value of array elements to change the selection in the list box. On the other hand, you can neither insert nor delete rows in this array; you cannot retype rows either. The `Count in array` command can be used to find out the number of selected lines. For example, this method allows inverting the selection of the first row of the (array type) list box: +- **List box de tipo coleção/seleção de entidades**: as seleções se gerenciam através das propriedades de list box dedicado: + - [Elemento atual](properties_DataSource.md#current-item) é um objeto que receberá o elemento/a entidade selecionado + - [Elementos selecionados](properties_DataSource.md#selected-items) é uma coleção de elementos selecionados + - [Posição do elemento atual](properties_DataSource.md#current-item-position) devolve a posição do elemento ou da entidade selecionada. +- **List box de tipo array**: o comando `LISTBOX SELECT ROW` pode utilizar-se para selecionar uma ou mais linhas de list box por programação. A [variável associada ao objeto List box](propiedades_Objeto.md#variable-o-expresión) se utiliza para obter, definir ou armazenar as seleções de linhas no objeto. Esta variável corresponde a um array de booleanos que é criado e mantido automaticamente por 4D. O tamanho deste array vem determinado pelo tamanho do list box: contém o mesmo número de elementos que o menor array associado às colunas. Cada elemento deste array contém `True` se selecionar a línha correspondente e `False` em caso contrário. 4D atualiza o conteúdo deste array em função das ações de usuário. Do lado contrário, pode mduar o valor dos elementos array para mudar a seleção na list box. Mas não se pode inserir nem apagar linhas nesse array; nem se pode reescrever as linhas. O comando `Count in array` pode ser usado para encontrar o número de líneas selecionadas. Por exemplo, este método permite inverter a seleção da primeira línha de list box (tipo array): ```4d ARRAY BOOLEAN(tBListBox;10) - //tBListBox is the name of the list box variable in the form + //tBListBox é o nome da variável associada ao list box no formulário If(tBListBox{1}=True) tBListBox{1}:=False Else @@ -323,83 +342,83 @@ Selections are managed differently depending on whether the list box is based on End if ``` -> The `OBJECT SET SCROLL POSITION` command scrolls the list box rows so that the first selected row or a specified row is displayed. +> Pode usar a constante `lk inherited` para imitar a aparência atual da list box (por exemplo, cor de fonte, cor de fundo, estilo da fonte, etc.). -### Customizing appearance of selected rows -When the [Hide selection highlight](properties_Appearance.md#hide-selection-highlight) option is selected, you need to make list box selections visible using available interface options. Since selections are still fully managed by 4D, this means: +### Personalizar a aparência de linhas selecionadas -- For array type list boxes, you must parse the Boolean array variable associated with the list box to determine which rows are selected or not. -- For selection type list boxes, you have to check whether the current record (row) belongs to the set specified in the [Highlight Set](properties_ListBox.md#highlight-set) property of the list box. +Quando a opção [Hide selection highlight](properties_Appearance.md#hide-selection-highlight) for selecionada, precisa fazer com que as seleções de list boxes sejam visíveis usando opções de interface disponíveis. Como seleções não são gerenciadas totalmente por 4D, isso significa: -You can then define specific background colors, font colors and/or font styles by programming to customize the appearance of selected rows. This can be done using arrays or expressions, depending on the type of list box being displayed (see the following sections). +- Para array de tipo list boxes, deve analisar a variável array booleana associada com a list box para determinar quais linhas foram ou não selecionadas. +- Para list boxes de tipo seleção, tem que checar se o registro atual (linha) pertence ao conjunto especificado na propriedade de list box [Highlight Set](properties_ListBox.md#highlight-set). -> You can use the `lk inherited` constant to mimic the current appearance of the list box (e.g., font color, background color, font style, etc.). +Pode então definir cores de fundo especificas, cores de fonte ou estilos de fonte por programação para personalizar a aparência de linhas selecionadas. Isso pode ser feito usando arrays ou expressões, dependendo do tipo de list box sendo exibido (ver as seções abaixo). -#### Selection list boxes +> Pode usar a constante `lk inherited` para imitar a aparência atual da list box (por exemplo, cor de fonte, cor de fundo, estilo da fonte, etc.). -To determine which rows are selected, you have to check whether they are included in the set indicated in the [Highlight Set](properties_ListBox.md#highlight-set) property of the list box. You can then define the appearance of selected rows using one or more of the relevant [color or style expression property](#using-arrays-and-expressions). +#### List box de tipo seleção -Keep in mind that expressions are automatically re-evaluated each time the: +Para determinar que list boxes foram selecionadas, é preciso checar se estão incluídas no conjunto especificado na propriedade de list box [Highlight Set](properties_ListBox.md#highlight-set). Pode então definir a aparência das linhas selecionadas usando um ou mais das cores ou estilos propriedades de estilo relevantes [](#using-arrays-and-expressions). -- list box selection changes. -- list box gets or loses the focus. -- form window containing the list box becomes, or ceases to be, the frontmost window. +Lembre que essas expressões são automaticamente reavaliadas a cada vez que: +- a seleção de list box mudar. +- a list box obter ou perder o foco. +- a janela de formulário contendo a list box virar a janela mais à frente, ou deixar de estar à frente. -#### Array list boxes -You have to parse the Boolean array [Variable or Expression](properties_Object.md#variable-or-expression) associated with the list box to determine whether rows are selected or not selected. +#### List box de tipo array +É preciso decompor o array Booleano [Variable or Expression](properties_Object.md#variable-or-expression) associado com a lsit box para determinar quaiws linhas foram selecionadas ou não selecionadas. -You can then define the appearance of selected rows using one or more of the relevant [color or style array property](#using-arrays-and-expressions). +Pode então definir a aparência das linhas selecionadas usando um ou mais das cores ou estilos propriedades de estilo de array relevantes [](#using-arrays-and-expressions). -Note that list box arrays used for defining the appearance of selected rows must be recalculated during the `On Selection Change` form event; however, you can also modify these arrays based on the following additional form events: +Note que arrays de list box usados para definir a aparência de linhas selecionadas devem ser recalculadas durante o evento de formulário `On Selection Change`; entretanto, também pode modificar esses arrays baseado nos eventos de formulários abaixo: +- `On Getting Focus` (propriedade de list box) +- `On Losing Focus` (propriedade de list box) +- `On Activate` (propriedade formulário) +- `On Deactivate` (propriedade de formulário) ...dependendo de como quer visualizar mudanças de foco em seleções. -- `On Getting Focus` (list box property) -- `On Losing Focus` (list box property) -- `On Activate` (form property) -- `On Deactivate` (form property) ...depending on whether and how you want to visually represent changes of focus in selections. +##### Exemplo -##### Example - -You have chosen to hide the system highlight and want to display list box selections with a green background color, as shown here: +Se escolher esconder os destaques do sistema e quiser exibir seleções de list box com uma cor de fundo verde, como mostrado aqui: ![](assets/en/FormObjects/listbox_styles7.png) -For an array type list box, you need to update the [Row Background Color Array](properties_BackgroundAndBorder.md#row-background-color-array) by programming. In the JSON form, you have defined the following Row Background Color Array for the list box: +Para uma list box de tipo array, precisa atualizar [Row Background Color Array](properties_BackgroundAndBorder.md#row-background-color-array) por programação. No formulário JSON, se definiu o Array Row Background Color para a list box: - "rowFillSource": "_ListboxBackground", - +``` + "rowFillSource": "_ListboxBackground", +``` -In the object method of the list box, you can write: +No método de objeto da list box, pode escrever: ```4d Case of :(Form event=On Selection Change) $n:=Size of array(LB_Arrays) - ARRAY LONGINT(_ListboxBackground;$n) // row background colors + ARRAY LONGINT(_ListboxBackground;$n) // cores de fundo linha For($i;1;$n) - If(LB_Arrays{$i}=True) // selected - _ListboxBackground{$i}:=0x0080C080 // green background - Else // not selected + If(LB_Arrays{$i}=True) // selecionado + _ListboxBackground{$i}:=0x0080C080 // fundo verde + Else // não selecionado _ListboxBackground{$i}:=lk inherited End if End for End case ``` -For a selection type list box, to produce the same effect you can use a method to update the [Background Color Expression](properties_BackgroundAndBorder.md#background-color-expression) based on the set specified in the [Highlight Set](properties_ListBox.md#highlight-set) property. - -For example, in the JSON form, you have defined the following Highlight Set and Background Color Expression for the list box: +Para uma seleção de tipo list box, para produzi o mesmo efeito pode usar um método para atualizar [Background Color Expression](properties_BackgroundAndBorder.md#background-color-expression) baseado no conjunto especificado na propriedade [Highlight Set](properties_ListBox.md#highlight-set). - "highlightSet": "$SampleSet", - "rowFillSource": "UI_SetColor", - +Por exemplo, no formulário JSON, se definiu HIghlight Set e Background Color Expression para o list box: -You can write in the *UI_SetColor* method: +``` + "highlightSet": "$SampleSet", + "rowFillSource": "UI_SetColor", +``` +Pode escrever no método *UI_SetColor*: ```4d If(Is in set("$SampleSet")) - $color:=0x0080C080 // green background + $color:=0x0080C080 // fundo verde Else $color:=lk inherited End if @@ -407,170 +426,182 @@ You can write in the *UI_SetColor* method: $0:=$color ``` -> In hierarchical list boxes, break rows cannot be highlighted when the [Hide selection highlight](properties_Appearance.md#hide-selection-highlight) option is checked. Since it is not possible to have distinct colors for headers of the same level, there is no way to highlight a specific break row by programming. +> Em list boxes hierárquicos , quebras de linha não podem ser ressaltadas quando a opção [Hide selection highlight](properties_Appearance.md#hide-selection-highlight) estiver marcada. Já que não é possível diferenciar cores de cabeçalho ao mesmo nível, não há uma maneira de ressaltar uma quebra de linha especifica por programação. + -## Managing sorts +## Gestão de ordenações -By default, a list box automatically handles standard column sorts when the header is clicked. A standard sort is an alphanumeric sort of column values, alternately ascending/descending with each successive click. All columns are always synchronized automatically. +como padrão, uma list box gerencia automaticamente ordenações de coluna padrão quando o cabeçalho for clicado. Uma ordenação normal é uma ordenação alfanumérica de valores de coluna, alternando entre ascendente e descendente com cada clique sucessivo. Todas as colunas são sincronizadas automaticamente. -You can prevent standard user sorts by deselecting the [Sortable](properties_Action.md#sortable) property of the list box. +Pode impedir que o usuário use ordenações padrão desativando a propriedade [Sortable](properties_Action.md#sortable) da list box. -The developer can set up custom sorts using the `LISTBOX SORT COLUMNS` command and/or combining the `On Header Click` and `On After Sort` form events (see the `FORM Event` command) and relevant 4D commands. +O desenvolvedor pode estabelecer ordenações personalizadas com o comando `LISTBOX SORT COLUMNS` ou combinando com os eventos de formulário `On Header Click` e `On After Sort` (ver o comando `FORM Event` ) e outros comandos 4D relevantes. -> The [Sortable](properties_Action.md#sortable) property only affects the standard user sorts; the `LISTBOX SORT COLUMNS` command does not take this property into account. +> Apenas [list boxes de tipo array](#array-list-boxes) podem ser hierárquicos. -The value of the [column header variable](properties_Object.md#variable-or-expression) allows you to manage additional information: the current sort of the column (read) and the display of the sort arrow. +P valor da variável column header variable[](properties_Object.md#variable-or-expression) permite gerenciar informação adicional: a ordenação atual da coluna (read) e a exibição da flecha de ordenação. -- If the variable is set to 0, the column is not sorted and the sort arrow is not displayed; - ![](assets/en/FormObjects/sorticon0.png) +- Se a variável for estabelecida como 0, a coluna não é ordenada e a flecha de ordenação não é exibida; + ![](assets/en/FormObjects/sorticon0.png) -- If the variable is set to 1, the column is sorted in ascending order and the sort arrow is displayed; - ![](assets/en/FormObjects/sorticon1.png) +- Se a variável for estabelecida como 1, a coluna é ordenada de forma ascendente e a flecha de ordenação é exibida; + ![](assets/en/FormObjects/sorticon1.png) -- If the variable is set to 2, the column is sorted in descending order and the sort arrow is displayed. - ![](assets/en/FormObjects/sorticon2.png) +- Se a variável for estabelecida como 2, a coluna é ordenada de forma descendente e a flecha de ordenação é exibida. + ![](assets/en/FormObjects/sorticon2.png) -You can set the value of the variable (for example, Header2:=2) in order to “force” the sort arrow display. The column sort itself is not modified in this case; it is up to the developer to handle it. +Pode estabelecer o valor da variável (por exemplo, Header2:=2) para “forçar” a exibição da flecha de ordenação. A ordenação de coluna não é modificada nesse caso; depende do desenvolvedor como vai manejá-la. -> The `OBJECT SET FORMAT` command offers specific support for icons in list box headers, which can be useful when you want to work with a customized sort icon. +> Apenas [list boxes de tipo array](#array-list-boxes) podem ser hierárquicos. -## Managing row colors, styles, and display -There are several different ways to set background colors, font colors and font styles for list boxes: +## Gerenciar cores linha, estilos e exibição -- at the level of the [list box object properties](#list-box-objects), -- at the level of the [column properties](#list-box-columns), -- using [arrays or expressions properties](#using-arrays-and-expressions) for the list box and/or for each column, -- at the level of the text of each cell (if [multi-style text](properties_Text.md#multi-style)). +Aqui estão algumas maneiras de estabelecer cores de fundo, cores de fonte e estilos de fonte para list boxes: -### Priority & inheritance +- no nível das propriedades de [objeto list box](#list-box-objects), +- no nível das propriedades de [colunas](#list-box-columns), +- usar [arrays ou propriedades de expressão](#using-arrays-and-expressions) para a list box ou para cada coluna, +- no nível de texto de cada célula (se [texti multiestilo](properties_Text.md#multi-style)). -Priority and inheritance principles are observed when the same property is set at more than one level. -| Priority level | Setting location | -| -------------- | -------------------------------------------------------------------- | -| high priority | Cell (if multi-style text) | -| | Column arrays/methods | -| | List box arrays/methods | -| | Column properties | -| | List box properties | -| low priority | Meta Info expression (for collection or entity selection list boxes) | +### Prioridade & herança +Princípios de prioridade e herança são observados quando a mesma propriedade for estabelecida em mais de um nível. -For example, if you set a font style in the list box properties and another using a style array for the column, the latter one will be taken into account. +| Nível de prioridade | Configuração de local | +| ------------------- | ------------------------------------------------------------------------------- | +| alta prioridade | Célula (se texto multiestilo) | +| | Arrays/métodos de coluna | +| | Arrays/métodos de Listbox | +| | Propriedades da coluna | +| | Propriedades de list box | +| baixa prioridade | Expressão Meta Info (para list boxes de tipo collection ou seleção de entidade) | -For each attribute (style, color and background color), an **inheritance** is implemented when the default value is used: +Por exemplo se estabelecer um estilo de fonte nas propriedades de list box e outro usando um array estilo para a coluna, este último será levado em consideração. -- for cell attributes: attribute values of rows -- for row attributes: attribute values of columns -- for column attributes: attribute values of the list box +Para cada atributo (estilo, cor e cor de fundo), uma **herança** é implementada quando o valor padrão for usado: -This way, if you want an object to inherit the attribute value from a higher level, you can use pass the `lk inherited` constant (default value) to the definition command or directly in the element of the corresponding style/color array. For example, given an array list box containing a standard font style with alternating colors: ![](assets/en/FormObjects/listbox_styles3.png) +- Para atributos de célula: atributos valores de linhas +- para atributos linhas: valores de atributos de colunas +- para atributos coluna: valores atributos no list box -You perform the following modifications: +Dessa maneira se quiser que um objeto herde o valor de atributo de um nível superior, pode usar a constante `lk inherited` (valor parão) à definição de comando ou diretamente no elemento do array correspondente de estilo/cor. Por exemplo dado um list box array contendo um estilo de fonte padrão com cores alternantes: ![](assets/en/FormObjects/listbox_styles3.png) -- change the background of row 2 to red using the [Row Background Color Array](properties_BackgroundAndBorder.md#row-background-color-array) property of the list box object, -- change the style of row 4 to italics using the [Row Style Array](properties_Text.md#row-style-array) property of the list box object, -- two elements in column 5 are changed to bold using the [Row Style Array](properties_Text.md#row-style-array) property of the column 5 object, -- the 2 elements for column 1 and 2 are changed to dark blue using the [Row Background Color Array](properties_BackgroundAndBorder.md#row-background-color-array) property for the column 1 and 2 objects: +Pode realizar as modificações abaixo: + +- mude o fundo da linha 2 para vermelho usando a propriedade [Row Background Color Array](properties_BackgroundAndBorder.md#row-background-color-array) do objeto list box, +- mude o estilo da linha 4 para itálico usando a propriedade [Row Style Array](properties_Text.md#row-style-array) do objeto de list box, +- dois elementos na coluna 5 são mudados para negrito usando as propriedades [Row Style Array](properties_Text.md#row-style-array) do objeto coluna 5, +- os 2 elementos para coluna 1 e 2 são mudados para azul escuro usando a propriedade [Row Background Color Array](properties_BackgroundAndBorder.md#row-background-color-array) para os objetos coluna 1 e 2: ![](assets/en/FormObjects/listbox_styles3.png) -To restore the original appearance of the list box, you can: +Para restaurar a aparência original da list box, é possível: + +- passar a constante `lk inherited` no elemento 2 dos arrays de cor de fundo para as colunas 1 e 2: elas então herdam a cor de fundo vermelha da linha. +- passe a constante `lk inherited` em elementos 3 e 4 do array de estilo para coluna 5: elas então herdam o estilo padrão, exceto para o elemento 4, que mudam para itálico como especificado no array de estilo da list box. +- passe a constante `lk inherited` no elemento 4 do array de estilo para a list box para poder remover o estilo de itálico. +- passe a constante `lk inherited` em elemento 3 do array de cor de fundo para o list box para poder restaurar a cor original da list box. + + +### Usar arrays e expressões + +Dependendo do tipo de list box, pode usar diferentes propriedades para personalizar cores de linha, estilos e exibição: -- pass the `lk inherited` constant in element 2 of the background color arrays for columns 1 and 2: then they inherit the red background color of the row. -- pass the `lk inherited` constant in elements 3 and 4 of the style array for column 5: then they inherit the standard style, except for element 4, which changes to italics as specified in the style array of the list box. -- pass the `lk inherited` constant in element 4 of the style array for the list box in order to remove the italics style. -- pass the `lk inherited` constant in element 2 of the background color array for the list box in order to restore the original alternating color of the list box. +| Propriedade | List box array | List box seleção | List box coleção ou entity selection | +| ------------ | ------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Cor de fundo | [Array cores de fundo](properties_BackgroundAndBorder.md#row-background-color-array) | [Expressão cor de fundo](properties_BackgroundAndBorder.md#background-color-expression) | [Background Color Expression](properties_BackgroundAndBorder.md#background-color-expression) ou [Meta info expression](properties_Text.md#meta-info-expression) | +| Cor de fundo | [Array cores de Fonte](properties_Text.md#row-font-color-array) | [Expressão cor fonte](properties_Text.md#font-color-expression) | [Font Color Expression](properties_Text.md#font-color-expression) ou [Meta info expression](properties_Text.md#meta-info-expression) | -### Using arrays and expressions -Depending of the list box type, you can use different properties to customize row colors, styles and display: +[Row Style Array](properties_Text.md#row-style-array)|[Style Expression](properties_Text.md#style-expression)|[Style Expression](properties_Text.md#style-expression) or [Meta info expression](properties_Text.md#meta-info-expression)| Display|[Row Control Array](properties_ListBox.md#row-control-array)|-|-| -| Property | Array list box | Selection list box | Collection or Entity Selection list box | -| ---------------- | ------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Background color | [Row Background Color Array](properties_BackgroundAndBorder.md#row-background-color-array) | [Background Color Expression](properties_BackgroundAndBorder.md#background-color-expression) | [Background Color Expression](properties_BackgroundAndBorder.md#background-color-expression) or [Meta info expression](properties_Text.md#meta-info-expression) | -| Font color | [Row Font Color Array](properties_Text.md#row-font-color-array) | [Font Color Expression](properties_Text.md#font-color-expression) | [Font Color Expression](properties_Text.md#font-color-expression) or [Meta info expression](properties_Text.md#meta-info-expression) | - Font style| -[Row Style Array](properties_Text.md#row-style-array)|[Style Expression](properties_Text.md#style-expression)|[Style Expression](properties_Text.md#style-expression) or [Meta info expression](properties_Text.md#meta-info-expression)| Display|[Row Control Array](properties_ListBox.md#row-control-array)|-|-| -## Printing list boxes -Two printing modes are available: **preview mode** - which can be used to print a list box like a form object, and **advanced mode** - which lets you control the printing of the list box object itself within the form. Note that the "Printing" appearance is available for list box objects in the Form editor. +## Imprimir list boxes -### Preview mode +dois modos de impressão estão disponíveis: **preview mode** - que pode ser usado imprimir uma list box como um objeto formulário e **advanced mode** - quer permite controlar a impressão de objeto list box dentro do formulário. Note que a aparência "Impressão" está disponível para objetos list box no editor de Formulário. -Printing a list box in preview mode consists of directly printing the list box and the form that contains it using the standard print commands or the **Print** menu command. The list box is printed as it is in the form. This mode does not allow precise control of the printing of the object; in particular, it does not allow you to print all the rows of a list box that contains more rows than it can display. +### Modo de vista previa -### Advanced mode +Imprimir uma list box em modo preview consiste de imprimir diretamente o list box e o formulário que o contém usando os comandos de impressão normais ou o comando de menu **Print** . A list box é impressa como no formulário. Esse modo não permite controle preciso da impressão do objeto, especialmente não permite imprimir todas as linhas da list box que contenham mais linhas que podem ser exibidas. -In this mode, the printing of list boxes is carried out by programming, via the `Print object` command (project forms and table forms are supported). The `LISTBOX GET PRINT INFORMATION` command is used to control the printing of the object. +### Modo avançado -In this mode: +Nesse modo, a impressão de list box é realizada por programação via o comando `Print object` (formulários projeto e formulários tabela são compatíveis). O comando `LISTBOX GET PRINT INFORMATION` é usado para controlar a impressão do objeto. -- The height of the list box object is automatically reduced when the number of rows to be printed is less than the original height of the object (there are no "blank" rows printed). On the other hand, the height does not automatically increase according to the contents of the object. The size of the object actually printed can be obtained via the `LISTBOX GET PRINT INFORMATION` command. -- The list box object is printed "as is", in other words, taking its current display parameters into account: visibility of headers and gridlines, hidden and displayed rows, etc. These parameters also include the first row to be printed: if you call the `OBJECT SET SCROLL POSITION` command before launching the printing, the first row printed in the list box will be the one designated by the command. -- An automatic mechanism facilitates the printing of list boxes that contain more rows than it is possible to display: successive calls to `Print object` can be used to print a new set of rows each time. The `LISTBOX GET PRINT INFORMATION` command can be used to check the status of the printing while it is underway. +Nesse modo: -## Hierarchical list boxes +- A altura do objeto list box é reduzida automaticamente quando o número de linhas a ser impresso for menor que a altura original do objeto (não há linhas "em branco" impressas). Por outro lado a altura não aumenta automaticamente de acordo com os conteúdos do objeto. O tamanho do objeto realmente impresso pode ser obtido via o comando `LISTBOX GET PRINT INFORMATION` . +- O objeto list box é impresso "como está" ou seja, levando em consideração seus parâmetros atuais de exibição: visibilidade de cabeçalhos e grades de impressão, linhas escondidas e exibidas, etc. O objeto list box é impresso "como está" ou seja, levando em consideração seus parâmetros atuais de exibição: visibilidade de cabeçalhos e grades de impressão, linhas escondidas e exibidas, etc. Esses parâmetros também incluem a primeira linha a ser impressa: se chamar o comando `OBJECT SET SCROLL POSITION` antes de lançar a impressão, a primeira linha impressa será aquela determinada pelo comando. O objeto list box é impresso "como está" ou seja, levando em consideração seus parâmetros atuais de exibição: visibilidade de cabeçalhos e grades de impressão, linhas escondidas e exibidas, etc. Esses parâmetros também incluem a primeira linha a ser impressa: se chamar o comando `OBJECT SET SCROLL POSITION` antes de lançar a impressão, a primeira linha impressa será aquela determinada pelo comando. +- Um mecanismo automático facilita a impressão de list boxes que contenham mais linhas do que é possível exibir: chamadas repetidas a `Print object` podem ser usadas para imprimir um novo conjunto de linhas a cada vez. O comando `LISTBOX GET PRINT INFORMATION` pode ser usado para checar o estado da impressão enquanto estiver sendo realizada. -A hierarchical list box is a list box in which the contents of the first column appears in hierarchical form. This type of representation is adapted to the presentation of information that includes repeated values and/or values that are hierarchically dependent (country/region/city and so on). -> Only [array type list boxes](#array-list-boxes) can be hierarchical. + + + +## List box hierárquicos. + +Uma list box hierárquica é uma list box na qual o conteúdo da primeira coluna aparece em forma hierárquica. Esse tipo de representação se adapta à apresentação de informação que inclua valores repetidos ou que dependem de hierarquias (país/região/cidade e assim por diante). + +> Apenas [list boxes de tipo array](#array-list-boxes) podem ser hierárquicos. Hierarchical list boxes are a particular way of representing data but they do not modify the data structure (arrays). Hierarchical list boxes are managed exactly the same way as regular list boxes. -### Defining the hierarchy -To specify a hierarchical list box, there are several possibilities: +### Definir a hierarquia + +Para definir uma list box hierárquica há várias possibilidades: + +* Configurar manualmente os elementos hierárquicos usando a lista Propriedade no editor de formulário (ou editar o formulário JSON). +* Gerar visualmente a hierarquia usando o menu emergente de gestão de list box no editor de formulários. +* Usar os comandos[LISTBOX SET HIERARCHY](https://doc.4d.com/4Dv17R5/4D/17-R5/LISTBOX-SET-HIERARCHY.301-4127969.en.html) e [LISTBOX GET HIERARCHY](https://doc.4d.com/4Dv17R5/4D/17-R5/LISTBOX-GET-HIERARCHY.301-4127970.en.html), descritos no manual *4D Language Reference*. -* Manually configure hierarchical elements using the Property list of the form editor (or edit the JSON form). -* Visually generate the hierarchy using the list box management pop-up menu, in the form editor. -* Use the [LISTBOX SET HIERARCHY](https://doc.4d.com/4Dv17R5/4D/17-R5/LISTBOX-SET-HIERARCHY.301-4127969.en.html) and [LISTBOX GET HIERARCHY](https://doc.4d.com/4Dv17R5/4D/17-R5/LISTBOX-GET-HIERARCHY.301-4127970.en.html) commands, described in the *4D Language Reference* manual. -#### Hierarchical List Box property +#### Propriedades de List Box hierárquico -This property specifies that the list box must be displayed in hierarchical form. In the JSON form, this feature is triggered [when the *dataSource* property value is an array](properties_Object.md#hierarchical-list-box), i.e. a collection. +Essa propriedade especifica que o list box deve ser exibido em forma hierárquica. No formulário JSON essa funcionalidade é ativada [quando o *dataSource* valor de propriedade for um array](properties_Object.md#hierarchical-list-box), ou seja uma coleção. -Additional options (**Variable 1...10**) are available when the *Hierarchical List Box* option is selected, corresponding to each *dataSource* array to use as break column. Each time a value is entered in a field, a new row is added. Up to 10 variables can be specified. These variables set the hierarchical levels to be displayed in the first column. +Opções adicionais (**Variable 1...10**) estão disponíveis quando a opção *List box hierárquica* for selecionada, correspondendo a cada array *dataSource* para usar como quebra de coluna. A cada vez que um valor é digitado em um campo, uma nova linha é adicionada. Podem ser especificadas até 10 variáveis. Essas variáveis estabelecem os níveis hierárquicos a serem exibidos na primeira coluna. -The first variable always corresponds to the name of the variable for the first column of the list box (the two values are automatically bound). This first variable is always visible and enterable. For example: country. The second variable is also always visible and enterable; it specifies the second hierarchical level. For example: regions. Beginning with the third field, each variable depends on the one preceding it. For example: counties, cities, and so on. A maximum of ten hierarchical levels can be specified. If you remove a value, the whole hierarchy moves up a level. +A primeira variável sempre corresponde ao nome da variável para a primeira coluna da list box (os dois valores são automaticamente conectados) Essa primeira variável é sempre visível e editável. Essa primeira variável é sempre visível e editável. Por exemplo: country. A segunda variável é sempre visível e editável: especifica o segundo nível hierárquico. Por exemplo: regions. A partir do terceiro campo, cada variável depende da variável que a antecedeu. Por exemplo: countries, cities etc Por exemplo: countries, cities etc Por exemplo: countries, cities etc Pode especificar um máximo de 10 níveis hierárquicos. Se remover um valor, a hierarquia inteira move um nível para cima. -The last variable is never hierarchical even if several identical values exists at this level. For example, referring to the configuration illustrated above, imagine that arr1 contains the values A A A B B B, arr2 has the values 1 1 1 2 2 2 and arr3 the values X X Y Y Y Z. In this case, A, B, 1 and 2 could appear in collapsed form, but not X and Y: +A última variável nunca é hierárquica mesmo se vários valores idênticos existirem nesse nível. Por exemplo, referindo-se à configuração ilustrada acima, imagine que arr1 contém os valores A A A B B B, arr2 tenha os valores 1 1 1 2 2 2 e arr3 os valores X X Y Y Y Z. Neste caso, A, B, 1 e 2 poderiam aparecer na forma colapsada, mas não X e Y: ![](assets/en/FormObjects/property_hierarchicalListBox.png) -This principle is not applied when only one variable is specified in the hierarchy: in this case, identical values may be grouped. +Esse princípio não é aplicado quando apenas uma variável for especificada na hierarquia: nesse caso, valores idênticos podem ser agrupados. +> Se especificar uma hierarquia baseada nas primeiras colunas de uma list box existente, deve então remover ou esconder essas colunas (exceto a primeira) senão vão aparecer de forma duplicada na list box. Se especificar a hierarquia via o menu pop up do editor (ver abaixo), as colunas desnecessárias serão removidas automaticamente da list box. -> If you specify a hierarchy based on the first columns of an existing list box, you must then remove or hide these columns (except for the first), otherwise they will appear in duplicate in the list box. If you specify the hierarchy via the pop-up menu of the editor (see below), the unnecessary columns are automatically removed from the list box. -#### Create hierarchy using the contextual menu +#### Crie hierarquias usando o menu contextual -When you select at least one column in addition to the first one in a list box object (of the array type) in the form editor, the **Create hierarchy** command is available in the context menu: +Esse princípio não é aplicado quando apenas uma variável for especificada na hierarquia: nesse caso, valores idênticos podem ser agrupados. ![](assets/en/FormObjects/listbox_hierarchy1.png) -This command is a shortcut to define a hierarchy. When it is selected, the following actions are carried out: +Este comando é um atalho para definir a hierarquia. Quando for selecionado, as ações a seguir são realizadas: -* The **Hierarchical list box** option is checked for the object in the Property List. -* The variables of the columns are used to specify the hierarchy. They replace any variables already specified. -* The columns selected no longer appear in the list box (except for the title of the first one). +* A opção **Hierarchical list box** é marcada para o objeto na Lista propriedade. +* As variváveis das colunas são usadas para especificar a hierarquia. Elas substituem qualquer variável já especificada. +* As colunas selecionadas não aparecem mais na list box (exceto para o título da primeira). -Example: given a list box whose first columns contain Country, Region, City and Population. When Country, Region and City are selected, if you choose **Create hierarchy** in the context menu, a three-level hierarchy is created in the first column, columns 2 and 3 are removed and the Population column becomes the second: +Exemplo: dado uma list box cujas primeiras colunas contém País, região, cidade e população. Quando País, região e cidade forem selecionadas, se escolher **Create hierarchy** no menu contextual, uma hierarquia de três níveis é criada na primeira coluna, colunas número 2 e 3 são removidas e a coluna População vira a segunda: ![](assets/en/FormObjects/listbox_hierarchy2.png) -##### Cancel hierarchy +##### Cancelar hierarquia +Quando a primeira coluna for selecionada e especificada como hierárquica pode usar o comando **Cancel hierarchy**. Quando selecionar este comando, as ações abaixo serão realizadas: -When the first column is selected and already specified as hierarchical, you can use the **Cancel hierarchy** command. When you choose this command, the following actions are carried out: +* A opção **Hierarchical list box** é desmarcada para o objeto, +* Os níveis hierárquicos 2 a X são removidos e transformados em colunas adicionadas à list box. -* The **Hierarchical list box** option is deselected for the object, -* The hierarchical levels 2 to X are removed and transformed into columns added to the list box. -### How it works +### Princípios de funcionamento -When a form containing a hierarchical list box is opened for the first time, by default all the rows are expanded. +Quando um formulário que conter uma list box hierárquica for aberto pela primeira vez, como padrão todas as linhas são expandidas. A break row and a hierarchical "node" are automatically added in the list box when values are repeated in the arrays. For example, imagine a list box containing four arrays specifying cities, each city being characterized by its country, its region, its name and its number of inhabitants: @@ -582,7 +613,7 @@ If this list box is displayed in hierarchical form (the first three arrays being The arrays are not sorted before the hierarchy is constructed. If, for example, an array contains the data AAABBAACC, the hierarchy obtained is: -> A B A C + > > A B A C To expand or collapse a hierarchical "node," you can just click on it. If you **Alt+click** (Windows) or **Option+click** (macOS) on the node, all its sub-elements will be expanded or collapsed as well. These operations can also be carried out by programming using the `LISTBOX EXPAND` and `LISTBOX COLLAPSE` commands. @@ -594,7 +625,7 @@ In a list box in hierarchical mode, a standard sort (carried out by clicking on - In the first place, all the levels of the hierarchical column (first column) are automatically sorted by ascending order. - The sort is then carried out by ascending or descending order (according to the user action) on the values of the column that was clicked. -- All the columns are synchronized. +- All the columns are synchronized. - During subsequent sorts carried out on non-hierarchical columns of the list box, only the last level of the first column is sorted. It is possible to modify the sorting of this column by clicking on its header. Given for example the following list box, in which no specific sort is specified: @@ -607,6 +638,7 @@ If you click on the "Population" header to sort the populations by ascending (or As for all list boxes, you can [disable the standard sort mechanism](properties_Action.md#sortable) and manage sorts using programming. + #### Selections and positions in hierarchical list boxes A hierarchical list box displays a variable number of rows on screen according to the expanded/collapsed state of the hierarchical nodes. This does not however mean that the number of rows of the arrays vary. Only the display is modified, not the data. It is important to understand this principle because programmed management of hierarchical list boxes is always based on the data of the arrays, not on the displayed data. In particular, the break rows added automatically are not taken into account in the display options arrays (see below). @@ -623,11 +655,11 @@ Regardless of how the data are displayed in the list box (hierarchically or not) This principle is implemented for internal arrays that can be used to manage: -- colors +- cores - background colors -- styles +- estilos - hidden rows -- selections +- seleções For example, if you want to select the row containing Rennes, you must pass: @@ -653,6 +685,7 @@ If the user selects a break row, `LISTBOX GET CELL POSITION` returns the first o ![](assets/en/FormObjects/hierarch11.png) + ... `LISTBOX GET CELL POSITION` returns (2;4). To select a break row by programming, you will need to use the `LISTBOX SELECT BREAK` command. Break rows are not taken into account in the internal arrays used to manage the graphic appearance of list boxes (styles and colors). It is however possible to modify these characteristics for break rows via the graphic management commands for objects. You simply need to execute the appropriate commands on the arrays that constitute the hierarchy. @@ -669,13 +702,13 @@ In hierarchical mode, break levels are not taken into account by the style modif OBJECT SET RGB COLORS(T1;0x0000FF;0xB0B0B0) OBJECT SET FONT STYLE(T2;Bold) ``` - > In this context, only the syntax using the array variable can function with the object property commands because the arrays do not have any associated object. -Result: +Resultado: ![](assets/en/FormObjects/hierarch14.png) + #### Optimized management of expand/collapse You can optimize hierarchical list boxes display and management using the `On Expand` and `On Collapse` form events. @@ -685,22 +718,22 @@ A hierarchical list box is built from the contents of its arrays so it can only Using the `On Expand` and `On Collapse` form events can overcome these constraints: for example, you can display only part of the hierarchy and load/unload the arrays on the fly, based on user actions. In the context of these events, the `LISTBOX GET CELL POSITION` command returns the cell where the user clicked in order to expand or collapse a row. In this case, you must fill and empty arrays through the code. The principles to be implemented are: - - When the list box is displayed, only the first array must be filled. However, you must create a second array with empty values so that the list box displays the expand/collapse buttons: ![](assets/en/FormObjects/hierarch15.png) - When a user clicks on an expand button, you can process the `On Expand` event. The `LISTBOX GET CELL POSITION` command returns the cell concerned and lets you build the appropriate hierarchy: you fill the first array with the repeated values and the second with the values sent from the `SELECTION TO ARRAY` command and you insert as many rows as needed in the list box using the `LISTBOX INSERT ROWS` command. ![](assets/en/FormObjects/hierarch16.png) - When a user clicks on a collapse button, you can process the `On Collapse` event. The `LISTBOX GET CELL POSITION` command returns the cell concerned: you remove as many rows as needed from the list box using the `LISTBOX DELETE ROWS` command. -## Object arrays in columns (4D View Pro) + + +## Arrays objetos nas colunas (4D View Pro) List box columns can handle object arrays. Since object arrays can contain different kinds of data, this powerful new feature allows you to mix different input types in the rows of a single column, and display various widgets as well. For example, you could insert a text input in the first row, a check box in the second, and a drop-down list in the third. Object arrays also provide access to new kinds of widgets, such as buttons or color pickers. The following list box was designed using an object array: ![](assets/en/FormObjects/listbox_column_objectArray.png) - -> **Note about Licensing**: The ability to use object arrays in list boxes is a first step to the upcoming "4D View Pro" tool that will progressively replace the 4D View plug-in. Using this feature requires you to have a valid 4D View license. For more information, please refer to the 4D Web site. +> **Nota sobre as licenças**: a possibilidade de utilizar arrays de objetos nas list boxes é o primeiro passo para a próxima ferramenta "4D View Pro" que substituirá progressivamente ao plug-in 4D View. O uso desta funcionalidade exige ter uma licença válida de 4D View. Para saber mais, consulte o site Web de 4D. ### Configuring an object array column @@ -714,59 +747,65 @@ However, the Data Source theme is not available for object-type list box columns the value type (mandatory): text, color, event, etc. the value itself (optional): used for input/output. the cell content display (optional): button, list, etc. additional settings (optional): depend on the value type To define these properties, you need to set the appropriate attributes in the object (available attributes are listed below). For example, you can write "Hello World!" in an object column using this simple code: -```4d +```4d ARRAY OBJECT(obColumn;0) //column array - C_OBJECT($ob) //first element - OB SET($ob;"valueType";"text") //defines the value type (mandatory) - OB SET($ob;"value";"Hello World!") //defines the value - APPEND TO ARRAY(obColumn;$ob) + C_OBJECT($ob1) + $entry:="Hello world!" OB SET($ob1;"valueType";"text") + OB SET($ob1;"value";$entry) // if the user enters a new value, $entry will contain the edited value + C_OBJECT($ob2) + OB SET($ob2;"valueType";"real") + OB SET($ob2;"value";2/3) + C_OBJECT($ob3) + OB SET($ob3;"valueType";"boolean") + OB SET($ob3;"value";True) + + APPEND TO ARRAY(obColumn;$ob1) + APPEND TO ARRAY(obColumn;$ob2) + APPEND TO ARRAY(obColumn;$ob3) ``` ![](assets/en/FormObjects/listbox_column_objectArray_helloWorld.png) - > Display format and entry filters cannot be set for an object column. They automatically depend on the value type. #### valueType and data display When a list box column is associated with an object array, the way a cell is displayed, entered, or edited, is based on the valueType attribute of the array element. Supported valueType values are: -* "text": for a text value -* "real": for a numeric value that can include separators like a \, <.>, or <,> -* "integer": for an integer value -* "boolean": for a True/False value -* "color": to define a background color -* "event": to display a button with a label. +* "text": for a text value +* "real": for a numeric value that can include separators like a \, <.>, ou <,> +* "integer": for an integer value +* "boolean": for a True/False value +* "color": to define a background color +* "event": to display a button with a label. 4D uses default widgets with regards to the "valueType" value (i.e., a "text" is displayed as a text input widget, a "boolean" as a check box), but alternate displays are also available through options (*e.g.*, a real can also be represented as a drop-down menu). The following table shows the default display as well as alternatives for each type of value: | valueType | Default widget | Alternative widget(s) | | --------- | ---------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| text | text input | drop-down menu (required list) or combo box (choice list) | +| texto | text input | drop-down menu (required list) or combo box (choice list) | | real | controlled text input (numbers and separators) | drop-down menu (required list) or combo box (choice list) | | integer | controlled text input (numbers only) | drop-down menu (required list) or combo box (choice list) or three-states check box | -| boolean | check box | drop-down menu (required list) | -| color | background color | text | +| booleano | caixa de verificação | drop-down menu (required list) | +| color | background color | texto | | event | button with label | | | | | All widgets can have an additional unit toggle button or ellipsis button attached to the cell. | - You set the cell display and options using specific attributes in each object (see below). #### Display formats and entry filters You cannot set display formats or entry filters for columns of object-type list boxes. They are automatically defined according to the value type. These are listed in the following table: -| Value type | Default format | Entry control | -| ---------- | ---------------------------------------------------------- | ----------------------- | -| text | same as defined in object | any (no control) | -| real | same as defined in object (using system decimal separator) | "0-9" and "." and "-" | -| | | "0-9" and "." if min>=0 | -| integer | same as defined in object | "0-9" and "-" | -| | | "0-9" if min>=0 | -| Boolean | check box | N/A | -| color | N/A | N/A | -| event | N/A | N/A | - +| Tipo de valor | Default format | Entry control | +| ------------- | ---------------------------------------------------------- | ----------------------- | +| texto | same as defined in object | any (no control) | +| real | same as defined in object (using system decimal separator) | "0-9" and "." and "-" | +| | | "0-9" and "." if min>=0 | +| integer | same as defined in object | "0-9" and "-" | +| | | "0-9" if min>=0 | +| Booleano | caixa de verificação | N/A | +| color | N/A | N/A | +| event | N/A | N/A | ### Attributes @@ -774,51 +813,39 @@ Each element of the object array is an object that can contain one or more attri The only mandatory attribute is "valueType" and its supported values are "text", "real", "integer", "boolean", "color", and "event". The following table lists all the attributes supported in list box object arrays, depending on the "valueType" value (any other attributes are ignored). Display formats are detailed and examples are provided below. -| | valueType | text | real | integer | boolean | color | event | -| --------------------- | --------------------------------------- | ---- | ---- | ------- | ------- | ----- | ----- | -| *Attributes* | *Description* | | | | | | | -| value | cell value (input or output) | x | x | x | | | | -| min | minimum value | | x | x | | | | -| max | maximum value | | x | x | | | | -| behavior | "threeStates" value | | | x | | | | -| requiredList | drop-down list defined in object | x | x | x | | | | -| choiceList | combo box defined in object | x | x | x | | | | -| requiredListReference | 4D list ref, depends on "saveAs" value | x | x | x | | | | -| requiredListName | 4D list name, depends on "saveAs" value | x | x | x | | | | -| saveAs | "reference" or "value" | x | x | x | | | | -| choiceListReference | 4D list ref, display combo box | x | x | x | | | | -| choiceListName | 4D list name, display combo box | x | x | x | | | | -| unitList | array of X elements | x | x | x | | | | -| unitReference | index of selected element | x | x | x | | | | -| unitsListReference | 4D list ref for units | x | x | x | | | | -| unitsListName | 4D list name for units | x | x | x | | | | -| alternateButton | add an alternate button | x | x | x | x | x | | - +| | valueType | texto | real | integer | booleano | color | event | +| --------------------- | --------------------------------------- | ----- | ---- | ------- | -------- | ----- | ----- | +| *Attributes* | *Descrição* | | | | | | | +| value | cell value (input or output) | x | x | x | | | | +| min | minimum value | | x | x | | | | +| max | maximum value | | x | x | | | | +| behavior | "threeStates" value | | | x | | | | +| requiredList | drop-down list defined in object | x | x | x | | | | +| choiceList | combo box defined in object | x | x | x | | | | +| requiredListReference | 4D list ref, depends on "saveAs" value | x | x | x | | | | +| requiredListName | 4D list name, depends on "saveAs" value | x | x | x | | | | +| saveAs | "reference" or "value" | x | x | x | | | | +| choiceListReference | 4D list ref, display combo box | x | x | x | | | | +| choiceListName | 4D list name, display combo box | x | x | x | | | | +| unitList | array of X elements | x | x | x | | | | +| unitReference | index of selected element | x | x | x | | | | +| unitsListReference | 4D list ref for units | x | x | x | | | | +| unitsListName | 4D list name for units | x | x | x | | | | +| alternateButton | add an alternate button | x | x | x | x | x | | #### value Cell values are stored in the "value" attribute. This attribute is used for input as well as output. It can also be used to define default values when using lists (see below). -```4d - ARRAY OBJECT(obColumn;0) //column array +````4d C_OBJECT($ob1) - $entry:="Hello world!" - OB SET($ob1;"valueType";"text") - OB SET($ob1;"value";$entry) // if the user enters a new value, $entry will contain the edited value - C_OBJECT($ob2) - OB SET($ob2;"valueType";"real") - OB SET($ob2;"value";2/3) - C_OBJECT($ob3) - OB SET($ob3;"valueType";"boolean") - OB SET($ob3;"value";True) - - APPEND TO ARRAY(obColumn;$ob1) - APPEND TO ARRAY(obColumn;$ob2) - APPEND TO ARRAY(obColumn;$ob3) -``` +$entry:="Hello world!" + OB SET($ob;"valueType";"text") +OB SET($ob;"alternateButton";True) +OB SET($ob;"value";$entry) +```` ![](assets/en/FormObjects/listbox_column_objectArray_helloWorld_value.png) - > Null values are supported and result in an empty cell. #### min and max @@ -827,14 +854,14 @@ When the "valueType" is "real" or "integer", the object also accepts min and max These attributes can be used to control the range of input values. When a cell is validated (when it loses the focus), if the input value is lower than the min value or greater than the max value, then it is rejected. In this case, the previous value is maintained and a tip displays an explanation. -```4d +````4d C_OBJECT($ob3) $entry3:=2015 OB SET($ob3;"valueType";"integer") OB SET($ob3;"value";$entry3) OB SET($ob3;"min";2000) OB SET($ob3;"max";3000) -``` +```` ![](assets/en/FormObjects/listbox_column_objectArray_helloWorld_minMax.png) @@ -842,11 +869,9 @@ These attributes can be used to control the range of input values. When a cell i The behavior attribute provides variations to the regular representation of values. In 4D v15, a single variation is proposed: -| Attribute | Available value(s) | valueType(s) | Description | -| --------- | ------------------ | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| behavior | threeStates | integer | Represents a numeric value as a three-states check box. -2=semi-checked, 1=checked, 0=unchecked, -1=invisible, -2=unchecked disabled, -3=checked disabled, -4=semi-checked disabled | - +| Atributo | Available value(s) | valueType(s) | Descrição | +| -------- | ------------------ | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| behavior | threeStates | integer | Represents a numeric value as a three-states check box.
    2=semi-checked, 1=checked, 0=unchecked, -1=invisible, -2=unchecked disabled, -3=checked disabled, -4=semi-checked disabled | ```4d C_OBJECT($ob3) @@ -864,16 +889,15 @@ The behavior attribute provides variations to the regular representation of valu When a "choiceList" or a "requiredList" attribute is present inside the object, the text input is replaced by a drop-down list or a combo box, depending of the attribute: -* If the attribute is "choiceList", the cell is displayed as a combo box. This means that the user can select or type a value. -* If the attribute is "requiredList" then the cell is displayed as a drop-down list and the user can only select one of the values provided in the list. +* If the attribute is "choiceList", the cell is displayed as a combo box. This means that the user can select or type a value. +* If the attribute is "requiredList" then the cell is displayed as a drop-down list and the user can only select one of the values provided in the list. In both cases, a "value" attribute can be used to preselect a value in the widget. - > The widget values are defined through an array. If you want to assign an existing 4D list to the widget, you need to use the "requiredListReference", "requiredListName", "choiceListReference", or "choiceListName" attributes. -Examples: +Exemplos: -* You want to display a drop-down list with only two options: "Open" or "Closed". "Closed" must be preselected: +* You want to display a drop-down list with only two options: "Open" or "Closed". "Closed" must be preselected: ```4d ARRAY TEXT($RequiredList;0) @@ -884,10 +908,9 @@ Examples: OB SET($ob;"value";"Closed") OB SET ARRAY($ob;"requiredList";$RequiredList) ``` - ![](assets/en/FormObjects/listbox_column_objectArray_helloWorld_openClosed.png) -* You want to accept any integer value, but display a combo box to suggest the most common values: +* You want to accept any integer value, but display a combo box to suggest the most common values: ```4d ARRAY LONGINT($ChoiceList;0) @@ -901,7 +924,6 @@ Examples: OB SET($ob;"value";10) //10 as default value OB SET ARRAY($ob;"choiceList";$ChoiceList) ``` - ![](assets/en/FormObjects/listbox_column_objectArray_helloWorld_commonValues.png) #### requiredListName and requiredListReference @@ -909,15 +931,14 @@ Examples: The "requiredListName" and "requiredListReference" attributes allow you to use, in a list box cell, a list defined in 4D either in Design mode (in the Lists editor of the Tool box) or by programming (using the New list command). The cell will then be displayed as a drop-down list. This means that the user can only select one of the values provided in the list. Use "requiredListName" or "requiredListReference" depending on the origin of the list: if the list comes from the Tool box, you pass a name; otherwise, if the list has been defined by programming, you pass a reference. In both cases, a "value" attribute can be used to preselect a value in the widget. - > * If you want to define these values through a simple array, you need to use the "requiredList" attribute. > * If the list contains text items representing real values, the decimal separator must be a period ("."), regardless of the local settings, e.g.: "17.6" "1234.456". -Examples: +Exemplos: -* You want to display a drop-down list based on a "colors" list defined in the Tool box (containing the values "blue", "yellow", and "green"), save it as a value and display "blue" by default: +* You want to display a drop-down list based on a "colors" list defined in the Tool box (containing the values "blue", "yellow", and "green"), save it as a value and display "blue" by default: -![](assets/en/FormObjects/listbox_column_objectArray_colors.png) +![](assets/fr/FormObjects/listbox_column_objectArray_colors.png) ```4d C_OBJECT($ob) @@ -926,10 +947,9 @@ Examples: OB SET($ob;"value";"blue") OB SET($ob;"requiredListName";"colors") ``` - ![](assets/en/FormObjects/listbox_column_objectArray_colorsResult.png) -* You want to display a drop-down list based on a list defined by programming and save it as a reference: +* You want to display a drop-down list based on a list defined by programming and save it as a reference: ```4d <>List:=New list @@ -944,61 +964,58 @@ Examples: OB SET($ob;"requiredListReference";<>List) ``` + ![](assets/en/FormObjects/listbox_column_objectArray_cities.png) - #### choiceListName and choiceListReference The "choiceListName" and "choiceListReference" attributes allow you to use, in a list box cell, a list defined in 4D either in Design mode (in the Tool box) or by programming (using the New list command). The cell is then displayed as a combo box, which means that the user can select or type a value. Use "choiceListName" or "choiceListReference" depending on the origin of the list: if the list comes from the Tool box, you pass a name; otherwise, if the list has been defined by programming, you pass a reference. In both cases, a "value" attribute can be used to preselect a value in the widget. - > * If you want to define these values through a simple array, you need to use the "choiceList" attribute. > * If the list contains text items representing real values, the decimal separator must be a period ("."), regardless of the local settings, e.g.: "17.6" "1234.456". -Example: +Exemplo: You want to display a combo box based on a "colors" list defined in the Tool box (containing the values "blue", "yellow", and "green") and display "green" by default: -![](assets/en/FormObjects/listbox_column_objectArray_colors.png) +![](assets/fr/FormObjects/listbox_column_objectArray_colors.png) -```4d +````4d C_OBJECT($ob) OB SET($ob;"valueType";"text") OB SET($ob;"value";"blue") OB SET($ob;"choiceListName";"colors") -``` +```` ![](../assets/en/FormObjects/listbox_column_objectArray_colorsResult.png) + #### unitsList, unitsListName, unitsListReference and unitReference You can use specific attributes to add units associated with cell values (*e.g.*: "10 cm", "20 pixels", etc.). To define the unit list, you can use one of the following attributes: -* "unitsList": an array containing the x elements used to define the available units (e.g.: "cm", "inches", "km", "miles", etc.). Use this attribute to define units within the object. -* "unitsListReference": a reference to a 4D list containing available units. Use this attribute to define units with a 4D list created with the [New list](https://doc.4d.com/4Dv15/4D/15.6/New-list.301-3818474.en.html) command. -* "unitsListName": a name of a design-based 4D list that contains available units. Use this attribute to define units with a 4D list created in the Tool box. +* "unitsList": an array containing the x elements used to define the available units (e.g.: "cm", "inches", "km", "miles", etc.). Use this attribute to define units within the object. +* "unitsListReference": a reference to a 4D list containing available units. Use this attribute to define units with a 4D list created with the [New list](https://doc.4d.com/4Dv15/4D/15.6/New-list.301-3818474.en.html) command. +* "unitsListName": a name of a design-based 4D list that contains available units. Use this attribute to define units with a 4D list created in the Tool box. Regardless of the way the unit list is defined, it can be associated with the following attribute: -* "unitReference": a single value that contains the index (from 1 to x) of the selected item in the "unitList", "unitsListReference" or "unitsListName" values list. +* "unitReference": a single value that contains the index (from 1 to x) of the selected item in the "unitList", "unitsListReference" or "unitsListName" values list. The current unit is displayed as a button that cycles through the "unitList", "unitsListReference" or "unitsListName" values each time it is clicked (e.g., "pixels" -> "rows" -> "cm" -> "pixels" -> etc.) -Example: +Exemplo: We want to set up a numeric input followed by two possible units: "rows" or "pixels". The current value is "2" + "lines". We use values defined directly in the object ("unitsList" attribute): -```4d -ARRAY TEXT($_units;0) -APPEND TO ARRAY($_units;"lines") -APPEND TO ARRAY($_units;"pixels") -C_OBJECT($ob) -OB SET($ob;"valueType";"integer") -OB SET($ob;"value";2) // 2 "units" -OB SET($ob;"unitReference";1) //"lines" -OB SET ARRAY($ob;"unitsList";$_units) -``` +````4d +ARRAY OBJECT(obColumn;0) //column array + C_OBJECT($ob) //first element + OB SET($ob;"valueType";"text") //defines the value type (mandatory) + OB SET($ob;"value";"Hello World!") //defines the value + APPEND TO ARRAY(obColumn;$ob) +```` ![](assets/en/FormObjects/listbox_column_objectArray_unitList.png) @@ -1008,33 +1025,33 @@ If you want to add an ellipsis button [...] to a cell, you just need to pass the When this button is clicked by a user, an `On Alternate Click` event will be generated, and you will be able to handle it however you want (see the "Event management" paragraph for more information). -Example: +Exemplo: ```4d C_OBJECT($ob1) $entry:="Hello world!" -OB SET($ob;"valueType";"text") -OB SET($ob;"alternateButton";True) -OB SET($ob;"value";$entry) +OB SET($ob;"unitReference";1) //"lines" OB SET ARRAY($ob;"unitsList";$_units) ``` ![](assets/en/FormObjects/listbox_column_objectArray_alternateButton.png) + #### color valueType The "color" valueType allows you to display either a color or a text. -* If the value is a number, a colored rectangle is drawn inside the cell. Example: - - ```4d +* If the value is a number, a colored rectangle is drawn inside the cell. Exemplo: + + ````4d C_OBJECT($ob4) OB SET($ob4;"valueType";"color") OB SET($ob4;"value";0x00FF0000) - ``` - - ![](assets/en/FormObjects/listbox_column_objectArray_colorValue.png) + ```` +![](assets/en/FormObjects/listbox_column_objectArray_colorValue.png) + + +* If the value is a text, then the text is displayed (*e.g.*: "value";"Automatic"). -* If the value is a text, then the text is displayed (*e.g.*: "value";"Automatic"). #### event valueType @@ -1042,25 +1059,25 @@ The "event" valueType displays a simple button that generates an `On Clicked` ev Optionally, you can pass a "label" attribute. -Example: +Exemplo: -```4d +````4d C_OBJECT($ob) OB SET($ob;"valueType";"event") OB SET($ob;"label";"Edit...") -``` +```` ![](assets/en/FormObjects/listbox_column_objectArray_eventValueType.png) -### Event management +### Event management Several events can be handled while using an object list box array: -* **On Data Change**: An `On Data Change` event is triggered when any value has been modified either: - * in a text input zone - * in a drop-down list - * in a combo box area - * in a unit button (switch from value x to value x+1) - * in a check box (switch between checked/unchecked) -* **On Clicked**: When the user clicks on a button installed using the "event" *valueType* attribute, an `On Clicked` event will be generated. This event is managed by the programmer. -* **On Alternative Click**: When the user clicks on an ellipsis button ("alternateButton" attribute), an `On Alternative Click` event will be generated. This event is managed by the programmer. \ No newline at end of file +* **On Data Change**: An `On Data Change` event is triggered when any value has been modified either: + * in a text input zone + * in a drop-down list + * in a combo box area + * in a unit button (switch from value x to value x+1) + * in a check box (switch between checked/unchecked) +* **On Clicked**: When the user clicks on a button installed using the "event" *valueType* attribute, an `On Clicked` event will be generated. This event is managed by the programmer. +* **On Alternative Click**: When the user clicks on an ellipsis button ("alternateButton" attribute), an `On Alternative Click` event will be generated. This event is managed by the programmer. diff --git a/website/translated_docs/pt/FormObjects/pictureButton_overview.md b/website/translated_docs/pt/FormObjects/pictureButton_overview.md index 8ec2d0359a86fc..56ab15ddb1079d 100644 --- a/website/translated_docs/pt/FormObjects/pictureButton_overview.md +++ b/website/translated_docs/pt/FormObjects/pictureButton_overview.md @@ -3,40 +3,40 @@ id: pictureButtonOverview title: Picture Button --- -## Overview +## Visão Geral A picture button is similar to a [standard button](button_overview.md). However unlike a standard button (which accepts three states: enabled, disabled and clicked), a picture button has a different image to represent each state. Picture buttons can be used in two ways: -* As command buttons in a form. In this case, the picture button generally includes four different states: enabled, disabled, clicked and rolled over. - For example, a table of thumbnails that has one row of four columns, each thumbnail corresponds to the Default, Clicked, Roll over, and Disabled states. +* As command buttons in a form. In this case, the picture button generally includes four different states: enabled, disabled, clicked and rolled over. + For example, a table of thumbnails that has one row of four columns, each thumbnail corresponds to the Default, Clicked, Roll over, and Disabled states. -| Property | JSON name | Value | -| -------------------------- | ---------------------- | ----- | -| Rows | rowCount | 1 | -| Columns | columnCount | 4 | -| Switch back when Released | switchBackWhenReleased | true | -| Switch when Roll Over | switchWhenRollover | true | -| Use Last Frame as Disabled | useLastFrameAsDisabled | true | + | Propriedade | Nome JSON | Value | + | -------------------------- | ---------------------- | ----- | + | Rows | rowCount | 1 | + | Colunas | columnCount | 4 | + | Switch back when Released | switchBackWhenReleased | true | + | Switch when Roll Over | switchWhenRollover | true | + | Use Last Frame as Disabled | useLastFrameAsDisabled | true | - -* As a picture button letting the user choose among several choices. In this case, a picture button can be used in place of a pop-up picture menu. With [Picture Pop-up Menus](picturePopupMenu_overview.md), all choices are displayed simultaneously (as the items in the pop-up menu), while the picture button displays the choices consecutively (as the user clicks the button). - Here is an example of a picture button. Suppose you want to give the users of a custom application the opportunity to choose the interface language for the application. You implement the option as a picture button in a custom properties dialog box: +* As a picture button letting the user choose among several choices. In this case, a picture button can be used in place of a pop-up picture menu. With [Picture Pop-up Menus](picturePopupMenu_overview.md), all choices are displayed simultaneously (as the items in the pop-up menu), while the picture button displays the choices consecutively (as the user clicks the button). + Here is an example of a picture button. Suppose you want to give the users of a custom application the opportunity to choose the interface language for the application. You implement the option as a picture button in a custom properties dialog box: ![](assets/en/FormObjects/button_pictureButton.png) Clicking the object changes the picture. -## Using picture buttons + +## Usar os botões imagem You can implement a picture button in the following manner: 1. First, prepare a single graphic in which the series of images are arranged in a row, a column, or a row-by-column grid. - - ![](assets/en/FormObjects/pictureButton_grid.png) -You can organize pictures as columns, rows, or a row-by-column grid (as shown above). When organizing pictures as a grid, they are numbered from left to right, row by row, beginning with 0. For example, the second picture of the second row of a grid that consists of two rows and three columns, is numbered 4 (The UK flag in the example above). + ![](assets/en/FormObjects/pictureButton_grid.png) + +You can organize pictures as columns, rows, or a row-by-column grid (as shown above). When organizing pictures as a grid, they are numbered from left to right, row by row, beginning with 0. For example, the second picture of the second row of a grid that consists of two rows and three columns, is numbered 4 (The UK flag in the example above). 2. Next, make sure the image is in your project's Resources and enter the path in the [Pathname](properties_TextAndPicture.md#picture-pathname) property. @@ -44,23 +44,22 @@ You can organize pictures as columns, rows, or a row-by-column grid (as shown ab 4. Specify when the images change by selecting appropriate [animation](properties_Animation.md) properties. -## Animation + +## Animação In addition to the standard positioning and appearance settings, you can set some specific properties for picture buttons, especially concerning how and when the pictures are displayed. These property options can be combined to enhance your picture buttons. - By default (when no [animation option](properties_Animation.md) is selected), a picture button displays the next picture in the series when the user clicks; it displays the previous picture in the series when the user holds down the **Shift** key and clicks. When the user reaches the last picture in the series, the picture does not change when the user clicks again. In other words, it does not cycle back to the first picture in the series. The following other modes are available: - - [Loop back to first frame](properties_Animation.md#loopBackToFirstFrame) - [Switch back when Released](properties_Animation.md#switch-back-when-released) - [Switch when Roll Over](properties_Animation.md#switch-when-roll-over) - [Switch continuously on clicks](properties_Animation.md#switch-continuously-on-clicks) - [Use Last Frame as Disabled](properties_Animation.md#use-last-frame-as-disabled) - [Use Last frame as disabled](properties_Animation.md#use-last-frame-as-disabled) - -> The [associated variable](properties_Object.md#variable-or-expression) of the picture button returns the index number, in the thumbnail table, of the current picture displayed. The numbering of pictures in the table begins with 0. +> [Use Last frame as disabled](properties_Animation.md#use-last-frame-as-disabled) > [Use Last frame as disabled](properties_Animation.md#use-last-frame-as-disabled) > The [associated variable](properties_Object.md#variable-or-expression) of the picture button returns the index number, in the thumbnail table, of the current picture displayed. The numbering of pictures in the table begins with 0. ## Supported Properties -[Bold](properties_Text.md#bold) - [Border Line Style](properties_BackgroundAndBorder.md#border-line-style) - [Bottom](properties_CoordinatesAndSizing.md#bottom) - [Button Style](properties_TextAndPicture.md#button-style) - [Class](properties_Object.md#css-class) - [Columns](properties_Crop.md#columns) - [Droppable](properties_Action.md#droppable) - [Focusable](properties_Entry.md#focusable) - [Font](properties_Text.md#font) - [Font Color](properties_Text.md#font-color) - [Height](properties_CoordinatesAndSizing.md#height) - [Help Tip](properties_Help.md#help-tip) - [Horizontal Sizing](properties_ResizingOptions.md#horizontal-sizing) - [Italic](properties_Text.md#italic) - [Left](properties_CoordinatesAndSizing.md#left) - [Loop back to first frame](properties_Animation.md#loopBackToFirstFrame) - [Object Name](properties_Object.md#object-name) - [Pathname](properties_Picture.md#pathname) - [Right](properties_CoordinatesAndSizing.md#right) - [Rows](properties_Crop.md#rows) - [Shortcut](properties_Entry.md#shortcut) - [Standard action](properties_Action.md#standard-action) - [Switch back when released](properties_Animation.md#switchBackWhenReleased) - [Switch continuously on clicks](properties_Animation.md#switch-continuously-on-clicks) - [Switch every x ticks](properties_Animation.md#switch-every-x-ticks) - [Title](properties_Object.md#title) - [Switch when roll over](properties_Animation.md#switchWhenRollOver) - [Top](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [Use Last frame as disabled](properties_Animation.md#use-last-frame-as-disabled) - [Variable or Expression](properties_Object.md#variable-or-expression) - [Vertical Sizing](properties_ResizingOptions.md#vertical-sizing) - [Visibility](properties_Display.md#visibility) - [Width](properties_CoordinatesAndSizing.md#width) \ No newline at end of file +[Bold](properties_Text.md#bold) - [Border Line Style](properties_BackgroundAndBorder.md#border-line-style) - [Bottom](properties_CoordinatesAndSizing.md#bottom) - [Button Style](properties_TextAndPicture.md#button-style) - [Class](properties_Object.md#css-class) - [Columns](properties_Crop.md#columns) - [Droppable](properties_Action.md#droppable) - [Focusable](properties_Entry.md#focusable) - [Font](properties_Text.md#font) - [Font Color](properties_Text.md#font-color) - [Height](properties_CoordinatesAndSizing.md#height) - [Help Tip](properties_Help.md#help-tip) - [Horizontal Sizing](properties_ResizingOptions.md#horizontal-sizing) - [Italic](properties_Text.md#italic) - [Left](properties_CoordinatesAndSizing.md#left) - [Loop back to first frame](properties_Animation.md#loopBackToFirstFrame) - [Object Name](properties_Object.md#object-name) - [Pathname](properties_Picture.md#pathname) - [Right](properties_CoordinatesAndSizing.md#right) - [Rows](properties_Crop.md#rows) - [Shortcut](properties_Entry.md#shortcut) - [Standard action](properties_Action.md#standard-action) - [Switch back when released](properties_Animation.md#switchBackWhenReleased) - [Switch continuously on clicks](properties_Animation.md#switch-continuously-on-clicks) - [Switch every x ticks](properties_Animation.md#switch-every-x-ticks) - [Title](properties_Object.md#title) - [Switch when roll over](properties_Animation.md#switchWhenRollOver) - [Top](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [Use Last frame as disabled](properties_Animation.md#use-last-frame-as-disabled) - [Variable or Expression](properties_Object.md#variable-or-expression) - [Vertical Sizing](properties_ResizingOptions.md#vertical-sizing) - [Visibility](properties_Display.md#visibility) - [Width](properties_CoordinatesAndSizing.md#width) diff --git a/website/translated_docs/pt/FormObjects/picturePopupMenu_overview.md b/website/translated_docs/pt/FormObjects/picturePopupMenu_overview.md index e00bebea4dcb46..3e6f33c63cfaa4 100644 --- a/website/translated_docs/pt/FormObjects/picturePopupMenu_overview.md +++ b/website/translated_docs/pt/FormObjects/picturePopupMenu_overview.md @@ -3,11 +3,12 @@ id: picturePopupMenuOverview title: Picture Pop-up Menu --- -## Overview +## Visão Geral A picture pop-up menu is a pop-up menu that displays a two-dimensional array of pictures. A picture pop-up menu can be used instead of a [picture button](pictureButton_overview.md). The creation of the picture to use with a picture pop-up menu is similar to the creation of a picture for a picture button. The concept is the same as for [button grids](buttonGrid_overview.md), except that the graphic is used as a pop-up menu instead of a form object. -## Using picture pop-up menus + +## Utilizar os menus emergentes de imagens To create a picture pop-up menu, you need to [refer to a picture](properties_Picture.md#pathname). The following example allows you to select the interface language by selecting it from a picture pop-up menu. Each language is represented by the corresponding flag: @@ -17,12 +18,15 @@ To create a picture pop-up menu, you need to [refer to a picture](properties_Pic You can manage picture pop-up menus using methods. As with [button grids](buttonGrid_overview.md), variables associated with picture pop-up menus are set to the value of the selected element in the picture pop-up menu. If no element is selected, the value is 0. Elements are numbered, row by row, from left to right starting with the top row. -### Goto page + +### Ir para página You can assign the `gotoPage` [standard action](https://doc.4d.com/4Dv17R5/4D/17-R5/Standard-actions.300-4163633.en.html) to a picture pop-up menu. When that action is selected, 4D will automatically display the page of the form that corresponds to the position of the picture selected in the picture array. Elements are numbered from left to right and top to bottom, beginning with the top left corner. For example, if the user selects the 3rd element, 4D will display the third page of the current form (if it exists). If you want to manage the effect of a click yourself, select `No action`. -## Supported Properties -[Bold](properties_Text.md#bold) - [Border Line Style](properties_BackgroundAndBorder.md#border-line-style) -[Bottom](properties_CoordinatesAndSizing.md#bottom) - [Class](properties_Object.md#css-class) - [Columns](properties_Crop.md#columns) - [Height](properties_CoordinatesAndSizing.md#height) - [Help Tip](properties_Help.md#help-tip) - [Horizontal Sizing](properties_ResizingOptions.md#horizontal-sizing) - [Left](properties_CoordinatesAndSizing.md#left) - [Object Name](properties_Object.md#object-name) - [Pathname](properties_Picture.md#pathname) - [Right](properties_CoordinatesAndSizing.md#right) - [Rows](properties_Crop.md#rows)- [Standard action](properties_Action.md#standard-action) - [Top](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [Variable or Expression](properties_Object.md#variable-or-expression) - [Vertical Sizing](properties_ResizingOptions.md#vertical-sizing) - [Visibility](properties_Display.md#visibility) - [Width](properties_CoordinatesAndSizing.md#width) \ No newline at end of file + + +## Supported Properties +[Bold](properties_Text.md#bold) - [Border Line Style](properties_BackgroundAndBorder.md#border-line-style) -[Bottom](properties_CoordinatesAndSizing.md#bottom) - [Class](properties_Object.md#css-class) - [Columns](properties_Crop.md#columns) - [Height](properties_CoordinatesAndSizing.md#height) - [Help Tip](properties_Help.md#help-tip) - [Horizontal Sizing](properties_ResizingOptions.md#horizontal-sizing) - [Left](properties_CoordinatesAndSizing.md#left) - [Object Name](properties_Object.md#object-name) - [Pathname](properties_Picture.md#pathname) - [Right](properties_CoordinatesAndSizing.md#right) - [Rows](properties_Crop.md#rows)- [Standard action](properties_Action.md#standard-action) - [Top](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [Variable or Expression](properties_Object.md#variable-or-expression) - [Vertical Sizing](properties_ResizingOptions.md#vertical-sizing) - [Visibility](properties_Display.md#visibility) - [Width](properties_CoordinatesAndSizing.md#width) diff --git a/website/translated_docs/pt/FormObjects/pluginArea_overview.md b/website/translated_docs/pt/FormObjects/pluginArea_overview.md index 7b6ecd48c25e87..26644669b1fcbc 100644 --- a/website/translated_docs/pt/FormObjects/pluginArea_overview.md +++ b/website/translated_docs/pt/FormObjects/pluginArea_overview.md @@ -3,11 +3,11 @@ id: pluginAreaOverview title: Plug-in Area --- -## Overview +## Visão Geral A plug-in area is an area on the form that is completely controlled by a plug-in. The ability to incorporate plug-ins into forms gives you unlimited possibilities when creating custom applications. A plug-in can perform a simple task such as displaying a digital clock on a form, or a complex task such as providing full-featured word processing, spreadsheet, or graphics capabilities. -When opening a database, 4D creates an internal list of the plug-ins [installed in your database](#installing-plug-ins). Once you have inserted a Plug-in Area in a form, you can assign a plug-in to the area directly in the Type list in the Property List: +Quando abrir um banco de dados, 4D cria uma lista interna de plug-ins [instalado em seu banco de dados](#installing-plug-ins). Quando tiver inserido uma área Plug-in em um formulário, pode atribuir um plug-in para a área diretamente na lista de tipos da Lista de Propriedades: ![](assets/en/FormObjects/pluginArea.png) @@ -15,18 +15,21 @@ When opening a database, 4D creates an internal list of the plug-ins [installed If you draw a plug-in area that is too small, 4D will display it as a button whose title is the name of the variable associated with the area. During execution, the user can click on this button in order to open a specific window displaying the plug-in. -### Advanced properties + +### Propriedades Avançadas If advanced options are provided by the author of the plug-in, a **Plug-in** theme containing an [**Advanced Properties**](properties_Plugins.md) button may be enabled in the Property list. In this case, you can click this button to set these options, usually through a custom dialog box. + ## Installing plug-ins To add a plug-in in your 4D environment, you first need to quit 4D. Plug-ins are loaded when you launch 4D. For more information about the installation of plug-ins, refer to [Installing plugins or components](https://doc.4d.com/4Dv17R6/4D/17-R6/Installing-plugins-or-components.300-4354866.en.html). + ## Creating plug-ins If you are interested in designing your own plug-ins, you can receive extensive information about writing and implementing plug-ins. 4D provides a [complete kit (on github)](https://github.com/4d/4D-Plugin-SDK) to help you write custom plug-ins. -## Supported Properties -[Border Line Style](properties_BackgroundAndBorder.md#border-line-style) - [Bottom](properties_CoordinatesAndSizing.md#bottom) - [Advanced Properties](properties_Plugins.md) - [Class](properties_Object.md#css-class) - [Draggable](properties_Action.md#draggable-and-droppable) - [Droppable](properties_Action.md#draggable-and-droppable) - [Expression Type](properties_Object.md#expression-type) - [Focusable](properties_Entry.md#focusable) - [Height](properties_CoordinatesAndSizing.md#height) - [Horizontal Sizing](properties_ResizingOptions.md#horizontal-sizing) - [Left](properties_CoordinatesAndSizing.md#left) - [Method](properties_Action.md#method) - [Object Name](properties_Object.md#object-name) - [Plug-in Kind](properties_Object.md#plug-in-kind) - [Right](properties_CoordinatesAndSizing.md#right) - [Top](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [Variable or Expression](properties_Object.md#variable-or-expression) - [Vertical Sizing](properties_ResizingOptions.md#vertical-sizing) - [Visibilty](properties_Display.md#visibility) - [Width](properties_CoordinatesAndSizing.md#width) \ No newline at end of file +## Supported Properties +[Border Line Style](properties_BackgroundAndBorder.md#border-line-style) - [Bottom](properties_CoordinatesAndSizing.md#bottom) - [Advanced Properties](properties_Plugins.md) - [Class](properties_Object.md#css-class) - [Draggable](properties_Action.md#draggable-and-droppable) - [Droppable](properties_Action.md#draggable-and-droppable) - [Expression Type](properties_Object.md#expression-type) - [Focusable](properties_Entry.md#focusable) - [Height](properties_CoordinatesAndSizing.md#height) - [Horizontal Sizing](properties_ResizingOptions.md#horizontal-sizing) - [Left](properties_CoordinatesAndSizing.md#left) - [Method](properties_Action.md#method) - [Object Name](properties_Object.md#object-name) - [Plug-in Kind](properties_Object.md#plug-in-kind) - [Right](properties_CoordinatesAndSizing.md#right) - [Top](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [Variable or Expression](properties_Object.md#variable-or-expression) - [Vertical Sizing](properties_ResizingOptions.md#vertical-sizing) - [Visibilty](properties_Display.md#visibility) - [Width](properties_CoordinatesAndSizing.md#width) diff --git a/website/translated_docs/pt/FormObjects/progressIndicator.md b/website/translated_docs/pt/FormObjects/progressIndicator.md index f7738eb1fe4085..a8f5c8b1d03289 100644 --- a/website/translated_docs/pt/FormObjects/progressIndicator.md +++ b/website/translated_docs/pt/FormObjects/progressIndicator.md @@ -3,13 +3,13 @@ id: progressIndicator title: Progress Indicator --- -## Overview +## Visão Geral A progress indicator (also called "thermometer") is designed to display or set numeric or date/time values graphically. ![](assets/en/FormObjects/progress1.png) -### Using indicators +### Utilizar os indicadores You can use indicators either to display or set values. For example, if a progress indicator is given a value by a method, it displays the value. If the user drags the indicator point, the value changes. The value can be used in another object such as a field or an enterable or non-enterable object. @@ -19,7 +19,7 @@ The variable associated with the indicator controls the display. You place value $vTherm:=[Employees]Salary ``` -This method assigns the value of the Salary field to the $vTherm variable. This method would be attached to the Salary field. +Este método atribui o valor do campo Salary à variável $vTherm. This method would be attached to the Salary field. Conversely, you could use the indicator to control the value in a field. The user drags the indicator to set the value. In this case the method becomes: @@ -29,6 +29,7 @@ Conversely, you could use the indicator to control the value in a field. The use The method assigns the value of the indicator to the Salary field. As the user drags the indicator, the value in the Salary field changes. + ## Default thermometer ![](assets/en/FormObjects/indicator_progressBar.png) @@ -40,15 +41,14 @@ You can display horizontal or vertical thermometers bars. This is determined by Multiple graphical options are available: minimum/maximum values, graduations, steps. ### Supported Properties +[Barber shop](properties_Scale.md#barber-shop) - [Negrito](properties_Text.md#bold) - [Estilo de linha de borda](properties_BackgroundAndBorder.md#border-line-style) -\[Abaixo\](properties_CoordinatesAndSizing. md#bottom) - [Clase](properties_Object.md#css-class) - [Graduação da tela](properties_Scale.md#display-graduation) - \[Enterable\](properties_Entry. md#enterable) - [Executar método objeto](properties_Action.md#execute-object-method) - [Tipo de expressão](properties_Object.md#expression-type) (só "inteiro", "número", "data" ou "hora") - \[Altura\](properties_CoordinatesAndSizing. md#height) - [Etapa de graduação](properties_Scale.md#graduation-step) -[Conselho de ajuda](properties_Help.md#help-tip) - \[Tamanho horizontal\](properties_ResizingOptions. md#horizontal-sizing) - [Lugar da etiqueta](properties_Scale.md#label-location) - [Esquerda](properties_CoordinatesAndSizing.md#left) - \[Máximo\](properties_Scale. md#maximum) - [Mínimo](properties_Scale.md#minimum) - [Formato numérico](properties_Display.md#number-format) - [Nome de objeto](properties_Object.md#object-name) - \[Direita\](properties_CoordinatesAndSizing. md#right) - [Paso](properties_Scale.md#step) - [Acima](properties_CoordinatesAndSizing.md#top) - [Tipo](properties_Object.md#type) - \[Variável ou expressão\](properties_Object. md#variable-or-expression) - [Tamanho vertical](properties_ResizingOptions.md#vertical-sizing) - [Visibilidade](properties_Display.md#visibility) - [Largura](properties_CoordinatesAndSizing.md#width) -[Barber shop](properties_Scale.md#barber-shop) - [Bold](properties_Text.md#bold) - [Border Line Style](properties_BackgroundAndBorder.md#border-line-style) -[Bottom](properties_CoordinatesAndSizing.md#bottom) - [Class](properties_Object.md#css-class) - [Display graduation](properties_Scale.md#display-graduation) - [Enterable](properties_Entry.md#enterable) - [Execute object method](properties_Action.md#execute-object-method) - [Expression Type](properties_Object.md#expression-type) (only "integer", "number", "date", or "time") - [Height](properties_CoordinatesAndSizing.md#height) - [Graduation step](properties_Scale.md#graduation-step) -[Help Tip](properties_Help.md#help-tip) - [Horizontal Sizing](properties_ResizingOptions.md#horizontal-sizing) - [Label Location](properties_Scale.md#label-location) - [Left](properties_CoordinatesAndSizing.md#left) - [Maximum](properties_Scale.md#maximum) - [Minimum](properties_Scale.md#minimum) - [Number Format](properties_Display.md#number-format) - [Object Name](properties_Object.md#object-name) - [Right](properties_CoordinatesAndSizing.md#right) - [Step](properties_Scale.md#step) - [Top](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [Variable or Expression](properties_Object.md#variable-or-expression) - [Vertical Sizing](properties_ResizingOptions.md#vertical-sizing) - [Visibility](properties_Display.md#visibility) - [Width](properties_CoordinatesAndSizing.md#width) ## Barber shop ![](assets/en/FormObjects/indicator.gif) **Barber shop** is a variant of the default thermometer. To enable this variant, you need to set the [Barber shop](properties_Scale.md#barber-shop) property. - > In JSON code, just remove "max" property from a default thermometer object to enable the Barber shop variant. Barber shop displays a continuous animation, like the [spinner](spinner.md). These thermometers are generally used to indicate to the user that the program is in the process of carrying out a long operation. When this thermometer variant is selected, [graphical Scale properties](properties_Scale.md) are not available. @@ -59,10 +59,9 @@ When the form is executed, the object is not animated. You manage the animation * 0 = Stop animation. ### Supported Properties +[Barber shop](properties_Scale.md#barber-shop) - [Negrito](properties_Text.md#bold) - \[Estilo da linha de borda\](properties_BackgroundAndBorder. md#border-line-style) -[Abaixo](properties_CoordinatesAndSizing.md#bottom) - [Clase](properties_Object.md#css-class) - \[Digitável\](properties_Entry. md#enterable) - [Executar método objeto](properties_Action.md#execute-object-method) - \[Tipo de expressão\](properties_Object. md#expression-type) (só "inteiro", "número", "data" ou "hora") - [Altura](properties_CoordinatesAndSizing.md#height) - \[Conselho de ajuda\](properties_Help. md#help-tip) - [Tamanho horizontal](properties_ResizingOptions.md#horizontal-sizing) - \[Izquierda\](properties_CoordinatesAndSizing. md#left) - [Nome de objeto](properties_Object.md#object-name) - [Direita](properties_CoordinatesAndSizing.md#right) - \[Acima\](properties_CoordinatesAndSizing. md#top) - [Tipo](properties_Object.md#type) - [Variável ou Expressão](properties_Object.md#variable-or-expression) - \[Tamanho vertical\](properties_ResizingOptions. md#vertical-sizing) - [Visibilidade](properties_Display.md#visibility) - [Largura](properties_CoordinatesAndSizing.md#width) -[Barber shop](properties_Scale.md#barber-shop) - [Bold](properties_Text.md#bold) - [Border Line Style](properties_BackgroundAndBorder.md#border-line-style) -[Bottom](properties_CoordinatesAndSizing.md#bottom) - [Class](properties_Object.md#css-class) - [Enterable](properties_Entry.md#enterable) - [Execute object method](properties_Action.md#execute-object-method) - [Expression Type](properties_Object.md#expression-type) (only "integer", "number", "date", or "time") - [Height](properties_CoordinatesAndSizing.md#height) - [Help Tip](properties_Help.md#help-tip) - [Horizontal Sizing](properties_ResizingOptions.md#horizontal-sizing) - [Left](properties_CoordinatesAndSizing.md#left) - [Object Name](properties_Object.md#object-name) - [Right](properties_CoordinatesAndSizing.md#right) - [Top](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [Variable or Expression](properties_Object.md#variable-or-expression) - [Vertical Sizing](properties_ResizingOptions.md#vertical-sizing) - [Visibility](properties_Display.md#visibility) - [Width](properties_CoordinatesAndSizing.md#width) - -## See also -- [rulers](ruler.md) -- [steppers](stepper.md) \ No newline at end of file +## Veja também +- [regras](ruler.md) +- [steppers](stepper.md) diff --git a/website/translated_docs/pt/FormObjects/properties_Action.md b/website/translated_docs/pt/FormObjects/properties_Action.md index 0ba5771da76ece..2bdf0d8b8b8607 100644 --- a/website/translated_docs/pt/FormObjects/properties_Action.md +++ b/website/translated_docs/pt/FormObjects/properties_Action.md @@ -1,176 +1,187 @@ --- id: propertiesAction -title: Action +title: Ação --- -* * * - -## Draggable +--- +## Arrastável Control whether and how the user can drag the object. By default, no drag operation is allowed. Two drag modes are available: -- **Custom**: In this mode, any drag operation performed on the object triggers the `On Begin Drag` form event in the context of the object. You then manage the drag action using a method. - In custom mode, basically the whole drag-and-drop operation is handled by the programmer. This mode lets you implement any interface based upon drag-on-drop, including interfaces that do not necessarily transport data, but can perform any action like opening files or triggering a calculation. This mode is based upon a combination of specific properties, events, and commands from the `Pasteboard` theme. +- **Custom**: In this mode, any drag operation performed on the object triggers the `On Begin Drag` form event in the context of the object. You then manage the drag action using a method. + In custom mode, basically the whole drag-and-drop operation is handled by the programmer. This mode lets you implement any interface based upon drag-on-drop, including interfaces that do not necessarily transport data, but can perform any action like opening files or triggering a calculation. This mode is based upon a combination of specific properties, events, and commands from the `Pasteboard` theme. - **Automatic**: In this mode, 4D **copies** text or pictures directly from the form object. It can then be used in the same 4D area, between two 4D areas, or between 4D and another application. For example, automatic drag (and drop) lets you copy a value between two fields without using programming: - ![](assets/en/FormObjects/property_automaticDragDrop.png) - ![](assets/en/FormObjects/property_automaticDragDrop2.png) In this mode, the `On Begin Drag` form event is NOT generated. If you want to "force" the use of the custom drag while automatic drag is enabled, hold down the **Alt** (Windows) or **Option** (macOS) key during the action. This option is not available for pictures. + ![](assets/en/FormObjects/property_automaticDragDrop.png) + ![](assets/en/FormObjects/property_automaticDragDrop2.png) In this mode, the `On Begin Drag` form event is NOT generated. If you want to "force" the use of the custom drag while automatic drag is enabled, hold down the **Alt** (Windows) or **Option** (macOS) key during the action. This option is not available for pictures. For more information, refer to [Drag and Drop](https://doc.4d.com/4Dv18/4D/18/Drag-and-Drop.300-4505037.en.html) in the *4D Language Reference* manual. #### JSON Grammar -| Name | Data Type | Possible Values | -| -------- | --------- | ------------------------------------------------------------ | -| dragging | text | "none" (default), "custom", "automatic" (excluding list box) | +| Nome | Tipo de dados | Possible Values | +| -------- | ------------- | ------------------------------------------------------------ | +| dragging | texto | "none" (default), "custom", "automatic" (excluding list box) | #### Objects Supported [4D Write Pro areas](writeProArea_overview.md) - [Input](input_overview.md) - [Hierarchical List](list_overview.md#overview) - [List Box](listbox_overview.md#overview) - [Plug-in Area](pluginArea_overview.md#overview) -#### See also -[Droppable](#droppable) -* * * -## Droppable +#### Veja também +[Soltável](#droppable) + + +--- +## Soltável Control whether and how the object can be the destination of a drag and drop operation. Two drop modes are available: -- **Custom**: In this mode, any drop operation performed on the object triggers the `On Drag Over` and `On Drop` form events in the context of the object. You then manage the drop action using a method. - In custom mode, basically the whole drag-and-drop operation is handled by the programmer. This mode lets you implement any interface based upon drag-on-drop, including interfaces that do not necessarily transport data, but can perform any action like opening files or triggering a calculation. This mode is based upon a combination of specific properties, events, and commands from the `Pasteboard` theme. +- **Custom**: In this mode, any drop operation performed on the object triggers the `On Drag Over` and `On Drop` form events in the context of the object. You then manage the drop action using a method. + In custom mode, basically the whole drag-and-drop operation is handled by the programmer. This mode lets you implement any interface based upon drag-on-drop, including interfaces that do not necessarily transport data, but can perform any action like opening files or triggering a calculation. This mode is based upon a combination of specific properties, events, and commands from the `Pasteboard` theme. - **Automatic**: In this mode, 4D automatically manages — if possible — the insertion of dragged data of the text or picture type that is dropped onto the object (the data are pasted into the object). The `On Drag Over` and `On Drop` form events are NOT generated. On the other hand, the `On After Edit` (during the drop) and `On Data Change` (when the object loses the focus) events are generated. For more information, refer to [Drag and Drop](https://doc.4d.com/4Dv18/4D/18/Drag-and-Drop.300-4505037.en.html) in the *4D Language Reference* manual. -#### JSON Grammar -| Name | Data Type | Possible Values | -| -------- | --------- | ------------------------------------------------------------ | -| dropping | text | "none" (default), "custom", "automatic" (excluding list box) | +#### JSON Grammar +| Nome | Tipo de dados | Possible Values | +| -------- | ------------- | ------------------------------------------------------------ | +| dropping | texto | "none" (default), "custom", "automatic" (excluding list box) | #### Objects Supported [4D Write Pro areas](writeProArea_overview.md) - [Button](button_overview.md) - [Input](input_overview.md) - [Hierarchical List](list_overview.md#overview) - [List Box](listbox_overview.md#overview) - [Plug-in Area](pluginArea_overview.md#overview) -#### See also -[Draggable](#draggable) +#### Veja também +[Arrastável](#draggable) -* * * +--- ## Execute object method - When this option is enabled, the object method is executed with the `On Data Change` event *at the same moment* the user changes the value of the indicator. When the option is disabled, the method is executed *after* the modification. #### JSON Grammar -| Name | Data Type | Possible Values | -| ------------------- | --------- | --------------- | -| continuousExecution | boolean | true, false | - +| Nome | Tipo de dados | Possible Values | +| ------------------- | ------------- | --------------- | +| continuousExecution | booleano | true, false | #### Objects Supported [Progress bar](progressIndicator.md) - [Ruler](ruler.md) - [Stepper](stepper.md) -* * * -## Method + + + + +--- +## Métodos Reference of a method attached to the object. Object methods generally "manage" the object while the form is displayed or printed. You do not call an object method—4D calls it automatically when an event involves the object to which the object method is attached. Several types of method references are supported: - a standard object method file path, i.e. that uses the following pattern: - `ObjectMethods/objectName.4dm` - ... where `objectName` is the actual [object name](properties_Object.md#object-name). This type of reference indicates that the method file is located at the default location ("sources/forms/*formName*/ObjectMethods/"). In this case, 4D automatically handles the object method when operations are executed on the form object (renaming, duplication, copy/paste...) + `ObjectMethods/objectName.4dm` + ... where `objectName` is the actual [object name](properties_Object.md#object-name). This type of reference indicates that the method file is located at the default location ("sources/forms/*formName*/ObjectMethods/"). In this case, 4D automatically handles the object method when operations are executed on the form object (renaming, duplication, copy/paste...) - a project method name: name of an existing project method without file extension, i.e.: `myMethod` In this case, 4D does not provide automatic support for object operations. -- a custom method file path including the .4dm extension, e.g.: - `ObjectMethods/objectName.4dm` You can also use a filesystem: - `/RESOURCES/Buttons/bOK.4dm` In this case, 4D does not provide automatic support for object operations. +- uma rota de acesso ao arquivo do método personalizado que inclua a extensão .4dm, por exemplo: + `../../CustomMethods/myMethod.4dm` Também pode utilizar um sistema de arquivos: + `/RESOURCES/Buttons/bOK.4dm` Neste caso, 4D não oferece suporte automático para as operações com objetos. + #### JSON Grammar -| Name | Data Type | Possible Values | -| ------ | --------- | ------------------------------------------------------------------ | -| method | text | Object method standard or custom file path, or project method name | +| Nome | Tipo de dados | Possible Values | +| ------ | ------------- | ------------------------------------------------------------------ | +| method | texto | Object method standard or custom file path, or project method name | #### Objects Supported -[4D View Pro Area](viewProArea_overview.md) - [4D Write Pro Area](writeProArea_overview.md) - [Button](button_overview.md) - [Button Grid](buttonGrid_overview.md) - [Check Box](checkbox_overview.md) - [Combo Box](comboBox_overview.md) - [Dropdown list](dropdownList_Overview.md) - [Hierarchical List](list_overview.md#overview) - [Input](input_overview.md) - [List Box](listbox_overview.md#overview) - [List Box Column](listbox_overview.md#list-box-columns) - [Picture Button](pictureButton_overview.md) - [Picture Pop up menu](picturePopupMenu_overview.md) - [Plug-in Area](pluginArea_overview.md#overview) - [Progress Indicators](progressIndicator.md) - [Radio Button](radio_overview.md) - [Ruler](ruler.md) - [Spinner](spinner.md) - [Splitter](splitters.md) - [Stepper](stepper.md) - [Subform](subform_overview.md) - [Tab control](tabControl.md) - [Web Area](webArea_overview.md#overview) +[Área 4D View Pro](viewProArea_overview.md) - [Área 4D Write Pro](writeProArea_overview.md) - \[Botão\](button_overview. md) - [Grade de botões](buttonGrid_overview.md) - [Caixa de seleção](checkbox_overview.md) - \[Combo Box\](comboBox_overview. md) - [Lista dropdown](dropdownList_Overview.md) - \[Lista hierárquica\](list_overview. md#overview) - [Input](input_overview.md) - [List Box](listbox_overview.md#overview) - \[Columna List Box\](listbox_overview. md#list-box-columns) - [Botão imagem](pictureButton_overview.md) - \[Menu emergente de imagem,\](picturePopupMenu_overview. md) - [Área de plugins](pluginArea_overview.md#overview) - [Indicadores de progresso](progressIndicator.md) - \[Botón radio\](radio_overview. md) - [Régua](ruler.md) - [Spinner](spinner.md) - [Splitter](splitters.md) - \[Stepper\](stepper. md) - [Subformulário](subform_overview.md) - [Controle de abas](tabControl.md) - [Área web](webArea_overview.md#overview) + -* * * -## Movable Rows +--- +## Linhas móveis `Array type list boxes` Authorizes the movement of rows during execution. This option is selected by default. It is not available for [selection type list boxes](listbox_overview.md#selection-list-boxes) nor for [list boxes in hierarchical mode](properties_Hierarchy.md#hierarchical-list-box). #### JSON Grammar -| Name | Data Type | Possible Values | -| ----------- | --------- | --------------- | -| movableRows | boolean | true, false | - +| Nome | Tipo de dados | Possible Values | +| ----------- | ------------- | --------------- | +| movableRows | booleano | true, false | #### Objects Supported [List Box](listbox_overview.md#overview) -* * * + + + +--- ## Multi-selectable Allows the selection of multiple records/options in a [hierarchical list](list_overview.md). #### JSON Grammar -| Name | Data Type | Possible Values | -| ------------- | --------- | ---------------------------- | -| selectionMode | text | "multiple", "single", "none" | - +| Nome | Tipo de dados | Possible Values | +| ------------- | ------------- | ---------------------------- | +| selectionMode | texto | "multiple", "single", "none" | #### Objects Supported [Hierarchical List](list_overview.md) -* * * -## Sortable + + +--- +## Ordenável Allows sorting column data by clicking a [listbox](listbox_overview.md) header. This option is selected by default. Picture type arrays (columns) cannot be sorted using this feature. -In list boxes based on a selection of records, the standard sort function is available only: * When the data source is *Current Selection*, * With columns associated with fields (of the Alpha, Number, Date, Time or Boolean type). +In list boxes based on a selection of records, the standard sort function is available only: +* When the data source is *Current Selection*, +* With columns associated with fields (of the Alpha, Number, Date, Time or Boolean type). In other cases (list boxes based on named selections, columns associated with expressions), the standard sort function is not available. A standard list box sort changes the order of the current selection in the database. However, the highlighted records and the current record are not changed. A standard sort synchronizes all the columns of the list box, including calculated columns. #### JSON Grammar -| Name | Data Type | Possible Values | -| -------- | --------- | --------------- | -| sortable | boolean | true, false | - +| Nome | Tipo de dados | Possible Values | +| -------- | ------------- | --------------- | +| sortable | booleano | true, false | #### Objects Supported - [List Box](listbox_overview.md) -* * * -## Standard action + + + +--- +## Ação padrão Typical activities to be performed by active objects (*e.g.*, letting the user accept, cancel, or delete records, move between records or from page to page in a multi-page form, etc.) have been predefined by 4D as standard actions. They are described in detail in the [Standard actions](https://doc.4d.com/4Dv17R5/4D/17-R5/Standard-actions.300-4163633.en.html) section of the *Design Reference*. You can assign both a standard action and a project method to an object. In this case, the standard action is usually executed after the method and 4D uses this action to enable/disable the object according to the current context. When an object is deactivated, the associated project method cannot be executed. @@ -179,11 +190,10 @@ You can also set this property using the `OBJECT SET ACTION` command. #### JSON Grammar -| Name | Data Type | Possible Values | -| ------ | --------- | ---------------------------------------------------------------------------------------------------------------- | -| action | string | The name of a [valid standard action](https://doc.4d.com/4Dv17R5/4D/17-R5/Standard-actions.300-4163633.en.html). | - +| Nome | Tipo de dados | Possible Values | +| ------ | ------------- | ---------------------------------------------------------------------------------------------------------------- | +| action | string | The name of a [valid standard action](https://doc.4d.com/4Dv17R5/4D/17-R5/Standard-actions.300-4163633.en.html). | #### Objects Supported -[Button](button_overview.md) - [Button Grid](buttonGrid_overview.md) - [Check Box](checkbox_overview.md) - [Drop-down List](dropdownList_Overview.md) - [List Box](listbox_overview.md) - [Picture Button](pictureButton_overview.md) - [Picture Pop-up Menu](picturePopupMenu_overview.md) - [Tab control](tabControl.md) \ No newline at end of file +[Button](button_overview.md) - [Button Grid](buttonGrid_overview.md) - [Check Box](checkbox_overview.md) - [Drop-down List](dropdownList_Overview.md) - [List Box](listbox_overview.md) - [Picture Button](pictureButton_overview.md) - [Picture Pop-up Menu](picturePopupMenu_overview.md) - [Tab control](tabControl.md) diff --git a/website/translated_docs/pt/FormObjects/properties_Animation.md b/website/translated_docs/pt/FormObjects/properties_Animation.md index 0f050013f4b8ae..0ad8cee721c1b8 100644 --- a/website/translated_docs/pt/FormObjects/properties_Animation.md +++ b/website/translated_docs/pt/FormObjects/properties_Animation.md @@ -1,106 +1,116 @@ --- id: propertiesAnimation -title: Animation +title: Animação --- -* * * - +--- ## Loop back to first frame Pictures are displayed in a continuous loop. When the user reaches the last picture and clicks again, the first picture appears, and so forth. -#### JSON Grammar -| Name | Data Type | Possible Values | -| -------------------- | --------- | --------------- | -| loopBackToFirstFrame | boolean | true, false | +#### JSON Grammar +| Nome | Tipo de dados | Possible Values | +| -------------------- | ------------- | --------------- | +| loopBackToFirstFrame | booleano | true, false | #### Objects Supported [Picture Button](pictureButton_overview.md) -* * * + +--- ## Switch back when released Displays the first picture all the time except when the user clicks the button. Displays the second picture until the mouse button is released. This mode allows you to create an action button with a different picture for each state (idle and clicked). You can use this mode to create a 3D effect or display any picture that depicts the action of the button. -#### JSON Grammar -| Name | Data Type | Possible Values | -| ---------------------- | --------- | --------------- | -| switchBackWhenReleased | boolean | true, false | +#### JSON Grammar +| Nome | Tipo de dados | Possible Values | +| ---------------------- | ------------- | --------------- | +| switchBackWhenReleased | booleano | true, false | #### Objects Supported [Picture Button](pictureButton_overview.md) -* * * + + + +--- ## Switch continuously on clicks Allows the user to hold down the mouse button to display the pictures continuously (i.e., as an animation). When the user reaches the last picture, the object does not cycle back to the first picture. #### JSON Grammar -| Name | Data Type | Possible Values | -| ------------------ | --------- | --------------- | -| switchContinuously | boolean | true, false | - +| Nome | Tipo de dados | Possible Values | +| ------------------ | ------------- | --------------- | +| switchContinuously | booleano | true, false | #### Objects Supported [Picture Button](pictureButton_overview.md) -* * * + + +--- ## Switch every x ticks Enables cycling through the contents of the picture button at the specified speed (in ticks). In this mode, all other options are ignored. #### JSON Grammar -| Name | Data Type | Possible Values | -| ---------- | --------- | --------------- | -| frameDelay | integer | minimum: 0 | - +| Nome | Tipo de dados | Possible Values | +| ---------- | ------------- | --------------- | +| frameDelay | integer | mínimo: 0 | #### Objects Supported [Picture Button](pictureButton_overview.md) -* * * + + + +--- ## Switch when roll over Modifies the contents of the picture button when the mouse cursor passes over it. The initial picture is displayed when the cursor leaves the button’s area. #### JSON Grammar -| Name | Data Type | Possible Values | -| ------------------ | --------- | --------------- | -| switchWhenRollover | boolean | true, false | - +| Nome | Tipo de dados | Possible Values | +| ------------------ | ------------- | --------------- | +| switchWhenRollover | booleano | true, false | #### Objects Supported [Picture Button](pictureButton_overview.md) -* * * + + + + +--- ## Use Last frame as disabled Enables setting the last thumbnail as the one to display when the button is disabled. The thumbnail used when the button is disabled is processed separately by 4D: when you combine this option with "Switch Continuously" and "Loop Back to First Frame", the last picture is excluded from the sequence associated with the button and only appears when it is disabled. + #### JSON Grammar -| Name | Data Type | Possible Values | -|:---------------------- | --------- | --------------- | -| useLastFrameAsDisabled | boolean | true, false | +| Nome | Tipo de dados | Possible Values | +|:---------------------- | ------------- | --------------- | +| useLastFrameAsDisabled | booleano | true, false | #### Objects Supported -[Picture Button](pictureButton_overview.md) \ No newline at end of file +[Picture Button](pictureButton_overview.md) diff --git a/website/translated_docs/pt/FormObjects/properties_Appearance.md b/website/translated_docs/pt/FormObjects/properties_Appearance.md index 0e83bec272759e..1873e1ffbd576a 100644 --- a/website/translated_docs/pt/FormObjects/properties_Appearance.md +++ b/website/translated_docs/pt/FormObjects/properties_Appearance.md @@ -1,10 +1,9 @@ --- id: propertiesAppearance -title: Appearance +title: Aparência --- -* * * - +--- ## Default Button The default button property designates the button that gets the initial focus at runtime when no button of the form has the [Focusable](properties_Entry.md#focusable) property. @@ -23,36 +22,37 @@ On Windows, the concept of "recommended choice" is not supported: only the focus #### JSON Grammar -| Name | Data Type | Possible Values | -| ---- | --------- | --------------- | -| | | | - defaultButton|boolean|true, false | +| Nome | Tipo de dados | Possible Values | +| ---- | ------------- | --------------- | +| | | | + defaultButton|boolean|true, false | #### Objects Supported [Regular Button](button_overview.md#regular) - [Flat Button](button_overview.md#regular) -* * * -## Hide focus rectangle + + +--- +## Esconder retangulo foco During execution, a field or any enterable area is outlined by a selection rectangle when it has the focus (via the Tab key or a single click). You can hide this rectangle by enabling this property. Hiding the focus rectangle may be useful in the case of specific interfaces. #### JSON Grammar -| Name | Data Type | Possible Values | -| ------------- | --------- | --------------- | -| hideFocusRing | boolean | true, false | - +| Nome | Tipo de dados | Possible Values | +| ------------- | ------------- | --------------- | +| hideFocusRing | booleano | true, false | #### Objects Supported [4D Write Pro area](writeProArea_overview.md) - [Hierarchical List](list_overview.md) - [Input](input_overview.md) - [List Box](listbox_overview.md) - [Subform](subform_overview.md) -* * * -## Hide selection highlight +--- +## Esconder ressalte seleção `Selection type list boxes` This property is used to disable the selection highlight in list boxes. @@ -61,206 +61,218 @@ When this option is enabled, the selection highlight is no longer visible for se By default, this option is not enabled. -#### JSON Grammar -| Name | Data Type | Possible Values | -| ------------------- | --------- | --------------- | -| hideSystemHighlight | boolean | true, false | +#### JSON Grammar +| Nome | Tipo de dados | Possible Values | +| ------------------- | ------------- | --------------- | +| hideSystemHighlight | booleano | true, false | #### Objects Supported [List Box](listbox_overview.md) -* * * -## Horizontal Scroll Bar + + +--- +## Barra rolagem horizontal An interface tool allowing the user to move the viewing area to the left or right. Available values: -| Property List | JSON value | Description | +| Property List | Valor JSON | Descrição | | ------------- | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Yes | "visible" | The scrollbar is always visible, even when it is not necessary (in other words, when the size of the object contents is smaller than that of the frame). | +| Sim | "visible" | The scrollbar is always visible, even when it is not necessary (in other words, when the size of the object contents is smaller than that of the frame). | | No | "hidden" | The scrollbar is never visible | -| Automatic | "automatic" | The scrollbar appears automatically whenever necessary and the user can enter text larger than the object width | +| Automático | "automatic" | The scrollbar appears automatically whenever necessary and the user can enter text larger than the object width | > Picture objects can have scrollbars when the display format of the picture is set to “Truncated (non-centered).” -#### JSON Grammar -| Name | Data Type | Possible Values | -| ------------------- | --------- | -------------------------------- | -| scrollbarHorizontal | text | "visible", "hidden", "automatic" | +#### JSON Grammar +| Nome | Tipo de dados | Possible Values | +| ------------------- | ------------- | -------------------------------- | +| scrollbarHorizontal | texto | "visible", "hidden", "automatic" | #### Objects Supported [Hierarchical List](list_overview.md#overview) - [Subform](subform_overview.md#overview) - [List Box](listbox_overview.md#overview) - [Input](input_overview.md) - [4D Write Pro area](writeProArea_overview.md) -#### See also - +#### Veja também [Vertical scroll bar](#vertical-scroll-bar) -* * * - -## Resolution +--- +## Resolução Sets the screen resolution for the 4D Write Pro area contents. By default, it is set to 72 dpi (macOS), which is the standard resolution for 4D forms on all platforms. Setting this property to 96 dpi will set a windows/web rendering on both macOS and Windows platforms. Setting this property to **automatic** means that document rendering will differ between macOS and Windows platforms. + #### JSON Grammar -| Name | Data Type | Possible Values | -| ---- | --------- | --------------- | -| | | | - dpi|number|0=automatic, 72, 96 | +| Nome | Tipo de dados | Possible Values | +| ---- | ------------- | --------------- | +| | | | + dpi|number|0=automatic, 72, 96 | #### Objects Supported [4D Write Pro area](writeProArea_overview.md) -* * * + +--- ## Show background Displays/hides both background images and background color. + #### JSON Grammar -| Name | Data Type | Possible Values | -| ---- | --------- | --------------- | -| | | | - showBackground|boolean|true (default), false| +| Nome | Tipo de dados | Possible Values | +| ---- | ------------- | --------------- | +| | | | + showBackground|boolean|true (default), false| #### Objects Supported [4D Write Pro area](writeProArea_overview.md) -* * * - +--- ## Show footers Displays/hides the footers when [Page view mode](#view-mode) is set to "Page". + #### JSON Grammar -| Name | Data Type | Possible Values | -| ---- | --------- | --------------- | -| | | | - showFooters|boolean|true (default), false| +| Nome | Tipo de dados | Possible Values | +| ---- | ------------- | --------------- | +| | | | + showFooters|boolean|true (default), false| #### Objects Supported [4D Write Pro area](writeProArea_overview.md) -* * * +--- ## Show Formula Bar When enabled, the formula bar is visible below the Toolbar interface in the 4D View Pro area. If not selected, the formula bar is hidden. > This property is available only for the [Toolbar](#user-interface) interface. + #### JSON Grammar -| Name | Data Type | Possible Values | -| ---- | --------- | --------------- | -| | | | - withFormulaBar|boolean|true (default), false| +| Nome | Tipo de dados | Possible Values | +| ---- | ------------- | --------------- | +| | | | + withFormulaBar|boolean|true (default), false| #### Objects Supported -[4D View Pro area](viewProArea_overview.md) - -* * * +[Área 4D View Pro](viewProArea_overview.md) +--- ## Show headers Displays/hides the headers when [Page view mode](#view-mode) is set to "Page". + #### JSON Grammar -| Name | Data Type | Possible Values | -| ---- | --------- | --------------- | -| | | | - showHeaders|boolean|true (default), false| +| Nome | Tipo de dados | Possible Values | +| ---- | ------------- | --------------- | +| | | | + showHeaders|boolean|true (default), false| #### Objects Supported [4D Write Pro area](writeProArea_overview.md) -* * * + +--- ## Show hidden characters Displays/hides invisible characters + #### JSON Grammar -| Name | Data Type | Possible Values | -| ---- | --------- | --------------- | -| | | | - showHiddenChars|boolean|true (default), false| +| Nome | Tipo de dados | Possible Values | +| ---- | ------------- | --------------- | +| | | | + showHiddenChars|boolean|true (default), false| #### Objects Supported [4D Write Pro area](writeProArea_overview.md) -* * * +--- ## Show horizontal ruler Displays/hides the horizontal ruler when the document view is in [Page mode](#view-mode). + #### JSON Grammar -| Name | Data Type | Possible Values | -| ---- | --------- | --------------- | -| | | | - showHorizontalRuler|boolean|true (default), false| +| Nome | Tipo de dados | Possible Values | +| ---- | ------------- | --------------- | +| | | | + showHorizontalRuler|boolean|true (default), false| #### Objects Supported [4D Write Pro area](writeProArea_overview.md) -* * * + + + +--- ## Show HTML WYSYWIG Enables/disables the HTML WYSIWYG view, in which any 4D Write Pro advanced attributes which are not compliant with all browsers are removed. + #### JSON Grammar -| Name | Data Type | Possible Values | -| ---- | --------- | --------------- | -| | | | - showHTMLWysiwyg|boolean|true, false (default)| +| Nome | Tipo de dados | Possible Values | +| ---- | ------------- | --------------- | +| | | | + showHTMLWysiwyg|boolean|true, false (default)| #### Objects Supported [4D Write Pro area](writeProArea_overview.md) -* * * - +--- ## Show page frame Displays/hides the page frame when [Page view mode](#view-mode) is set to "Page". + #### JSON Grammar -| Name | Data Type | Possible Values | -| ---- | --------- | --------------- | -| | | | - showPageFrames|boolean|true, false| +| Nome | Tipo de dados | Possible Values | +| ---- | ------------- | --------------- | +| | | | + showPageFrames|boolean|true, false| #### Objects Supported [4D Write Pro area](writeProArea_overview.md) -* * * + +--- ## Show references Displays all 4D expressions inserted in the 4D Write Pro document as *references*. When this option is disabled, 4D expressions are displayed as *values*. By default when you insert a 4D field or expression, 4D Write Pro computes and displays its current value. Select this property if you wish to know which field or expression is displayed. The field or expression references then appear in your document, with a gray background. @@ -275,36 +287,37 @@ With the Show references property on, the reference is displayed: > 4D expressions can be inserted using the `ST INSERT EXPRESSION` command. + #### JSON Grammar -| Name | Data Type | Possible Values | -| ---- | --------- | --------------- | -| | | | - showReferences|boolean|true, false (default)| +| Nome | Tipo de dados | Possible Values | +| ---- | ------------- | --------------- | +| | | | + showReferences|boolean|true, false (default)| #### Objects Supported [4D Write Pro area](writeProArea_overview.md) -* * * - +--- ## Show vertical ruler Displays/hides the vertical ruler when the document view is in [Page mode](#view-mode). + #### JSON Grammar -| Name | Data Type | Possible Values | -| ---- | --------- | --------------- | -| | | | - showVerticalRuler|boolean|true (default), false| +| Nome | Tipo de dados | Possible Values | +| ---- | ------------- | --------------- | +| | | | + showVerticalRuler|boolean|true (default), false| #### Objects Supported [4D Write Pro area](writeProArea_overview.md) -* * * +--- ## Tab Control Direction You can set the direction of tab controls in your forms. This property is available on all the platforms but can only be displayed in macOS. You can choose to place the tab controls on top (standard) or on the bottom. @@ -313,106 +326,107 @@ When tab controls with a custom direction are displayed under Windows, they auto #### JSON Grammar -| Name | Data Type | Possible Values | -| ---- | --------- | --------------- | -| | | | - labelsPlacement|boolean|"top", "bottom" | +| Nome | Tipo de dados | Possible Values | +| ---- | ------------- | --------------- | +| | | | + labelsPlacement|boolean|"top", "bottom" | #### Objects Supported [Tab Control](tabControl.md) -* * * +--- ## User Interface You can add an interface to 4D View Pro areas to allow end users to perform basic modifications and data manipulations. 4D View Pro offers two optional interfaces to choose from, **Ribbon** and **Toolbar**. #### JSON Grammar -| Name | Data Type | Possible Values | -| ---- | --------- | --------------- | -| | | | - userInterface|text|"none" (default), "ribbon", "toolbar" | +| Nome | Tipo de dados | Possible Values | +| ---- | ------------- | --------------- | +| | | | + userInterface|text|"none" (default), "ribbon", "toolbar" | #### Objects Supported -[4D View Pro area](viewProArea_overview.md) +[Área 4D View Pro](viewProArea_overview.md) -#### See also -[4D View Pro reference guide](https://doc.4d.com/4Dv18/4D/18/4D-View-Pro-Reference.100-4522233.en.html) +#### Veja também -* * * +[4D View Pro reference guide](https://doc.4d.com/4Dv18/4D/18/4D-View-Pro-Reference.100-4522233.en.html) -## Vertical Scroll Bar +--- +## Barra rolagem vertical An interface tool allowing the user to move the viewing area up and down. Available values: -| Property List | JSON value | Description | +| Property List | Valor JSON | Descrição | | ------------- | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Yes | "visible" | The scrollbar is always visible, even when it is not necessary (in other words, when the size of the object contents is smaller than that of the frame). | +| Sim | "visible" | The scrollbar is always visible, even when it is not necessary (in other words, when the size of the object contents is smaller than that of the frame). | | No | "hidden" | The scrollbar is never visible | -| Automatic | "automatic" | The scrollbar appears automatically whenever necessary (in other words, when the size of the object contents is greater than that of the frame) | - +| Automático | "automatic" | The scrollbar appears automatically whenever necessary (in other words, when the size of the object contents is greater than that of the frame) | > Picture objects can have scrollbars when the display format of the picture is set to “Truncated (non-centered).” -> + + > If a text input object does not have a scroll bar, the user can scroll the information using the arrow keys. -#### JSON Grammar -| Name | Data Type | Possible Values | -| ----------------- | --------- | -------------------------------- | -| scrollbarVertical | text | "visible", "hidden", "automatic" | +#### JSON Grammar +| Nome | Tipo de dados | Possible Values | +| ----------------- | ------------- | -------------------------------- | +| scrollbarVertical | texto | "visible", "hidden", "automatic" | #### Objects Supported [Hierarchical List](list_overview.md#overview) - [Subform](subform_overview.md#overview) - [List Box](listbox_overview.md#overview) - [Input](input_overview.md) - [4D Write Pro area](writeProArea_overview.md) -#### See also +#### Veja também [Horizontal scroll bar](#horizontal-scroll-bar) -* * * - -## View mode +--- +## Modo de visualização Sets the mode for displaying the 4D Write Pro document in the form area. Three values are available: - **Page**: the most complete view mode, which includes page outlines, orientation, margins, page breaks, headers and footers, etc. - **Draft**: draft mode with basic document properties -- **Embedded**: view mode suitable for embedded areas; it does not display margins, footers, headers, page frames, etc. This mode can also be used to produce a web-like view output (if you also select the [96 dpi resolution](#resolution) and the [Show HTML WYSIWYG](#show-html-wysiwyg) properties). +- **Embedded**: view mode suitable for embedded areas; it does not display margins, footers, headers, page frames, etc. This mode can also be used to produce a web-like view output (if you also select the [96 dpi resolution](#resolution) and the [Show HTML WYSIWYG](#show-html-wysiwyg) properties). This mode can also be used to produce a web-like view output (if you also select the [96 dpi resolution](#resolution) and the [Show HTML WYSIWYG](#show-html-wysiwyg) properties). > The View mode property is only used for onscreen rendering. Regarding printing settings, specific rendering rules are automatically used. + + #### JSON Grammar -| Name | Data Type | Possible Values | -| ---- | --------- | --------------- | -| | | | - layoutMode|text|"page", "draft", "embedded"| +| Nome | Tipo de dados | Possible Values | +| ---- | ------------- | --------------- | +| | | | + layoutMode|text|"page", "draft", "embedded"| #### Objects Supported [4D Write Pro area](writeProArea_overview.md) -* * * - +--- ## Zoom Sets the zoom percentage for displaying 4D Write Pro area contents. + #### JSON Grammar -| Name | Data Type | Possible Values | -| ---- | --------- | --------------- | -| | | | - zoom|number|minimum = 0 | +| Nome | Tipo de dados | Possible Values | +| ---- | ------------- | --------------- | +| | | | + zoom|number|minimum = 0 | #### Objects Supported -[4D Write Pro area](writeProArea_overview.md) \ No newline at end of file +[4D Write Pro area](writeProArea_overview.md) diff --git a/website/translated_docs/pt/FormObjects/properties_BackgroundAndBorder.md b/website/translated_docs/pt/FormObjects/properties_BackgroundAndBorder.md index 06a96474dc25eb..688968d03d8e0e 100644 --- a/website/translated_docs/pt/FormObjects/properties_BackgroundAndBorder.md +++ b/website/translated_docs/pt/FormObjects/properties_BackgroundAndBorder.md @@ -3,25 +3,23 @@ id: propertiesBackgroundAndBorder title: Background and Border --- -* * * - -## Alternate Background Color +--- +## Cor de fundo alternado Allows setting a different background color for odd-numbered rows/columns in a list box. By default, *Automatic* is selected: the column uses the alternate background color set at the list box level. #### JSON Grammar -| Name | Data Type | Possible Values | -| ------------- | --------- | ----------------------------------------- | -| alternateFill | string | any css value; "transparent"; "automatic" | - +| Nome | Tipo de dados | Possible Values | +| ------------- | ------------- | ----------------------------------------- | +| alternateFill | string | any css value; "transparent"; "automatic" | #### Objects Supported - [List Box](listbox_overview.md#overview) - [List Box Column](listbox_overview.md#list-box-columns) -* * * + +--- ## Background Color / Fill Color Defines the background color of an object. @@ -30,79 +28,80 @@ In the case of a list box, by default *Automatic* is selected: the column uses t #### JSON Grammar -| Name | Data Type | Possible Values | -| ---- | --------- | ----------------------------------------- | -| fill | string | any css value; "transparent"; "automatic" | +| Nome | Tipo de dados | Possible Values | +| ---- | ------------- | ----------------------------------------- | +| fill | string | any css value; "transparent"; "automatic" | #### Objects Supported [Hierarchical List](list_overview.md) - [List Box](listbox_overview.md) - [List Box Column](listbox_overview.md#list-box-columns) - [List Box Footer](listbox_overview.md#list-box-footers) - [Oval](shapes_overview.md#oval) - [Rectangle](shapes_overview.md#rectangle) - [Text Area](text.md) -#### See also - -[Transparent](#transparent) +#### Veja também +[Transparente](#transparent) -* * * -## Background Color Expression +--- +## Expressão cor fundo `Selection and collection type list boxes` An expression or a variable (array variables cannot be used) to apply a custom background color to each row of the list box. The expression or variable will be evaluated for each row displayed and must return a RGB color value. For more information, refer to the description of the `OBJECT SET RGB COLORS` command in the *4D Language Reference manual*. You can also set this property using the `LISTBOX SET PROPERTY` command with `lk background color expression` constant. - > With collection or entity selection type list boxes, this property can also be set using a [Meta Info Expression](properties_Text.md#meta-info-expression). #### JSON Grammar -| Name | Data Type | Possible Values | -| ------------- | --------- | ----------------------------------------- | -| rowFillSource | string | An expression returning a RGB color value | - +| Nome | Tipo de dados | Possible Values | +| ------------- | ------------- | ----------------------------------------- | +| rowFillSource | string | An expression returning a RGB color value | #### Objects Supported - [List Box](listbox_overview.md#overview) - [List Box Column](listbox_overview.md#list-box-columns) -* * * -## Border Line Style + + + + +--- +## Estilo borda linha Allows setting a standard style for the object border. #### JSON Grammar -| Name | Data Type | Possible Values | -| ----------- | --------- | ----------------------------------------------------------------- | -| borderStyle | text | "system", "none", "solid", "dotted", "raised", "sunken", "double" | - +| Nome | Tipo de dados | Possible Values | +| ----------- | ------------- | ----------------------------------------------------------------- | +| borderStyle | texto | "system", "none", "solid", "dotted", "raised", "sunken", "double" | #### Objects Supported [4D View Pro Area](viewProArea_overview.md) - [4D Write Pro areas](writeProArea_overview.md) - [Buttons](button_overview.md) - [Button Grid](buttonGrid_overview.md) - [Hierarchical List](list_overview.md#overview) - [Input](input_overview.md) - [List Box](listbox_overview.md#overview) - [Picture Button](pictureButton_overview.md) - [Picture Pop-up Menu](picturePopupMenu_overview.md) - [Plug-in Area](pluginArea_overview.md#overview) - [Progress Indicator](progressIndicator.md) - [Ruler](ruler.md) - [Spinner](spinner.md) - [Stepper](stepper.md) - [Subform](subform_overview.md#overview) - [Text Area](text.md) - [Web Area](webArea_overview.md#overview) -* * * + +--- ## Dotted Line Type Describes dotted line type as a sequence of black and white points. #### JSON Grammar -| Name | Data Type | Possible Values | -| --------------- | ---------------------- | ------------------------------------------------------------------------ | -| strokeDashArray | number array or string | Ex. "6 1" or \[6,1\] for a sequence of 6 black point and 1 white point | - +| Nome | Tipo de dados | Possible Values | +| --------------- | ---------------------- | -------------------------------------------------------------------------------- | +| strokeDashArray | number array or string | Ex. Ex. Ex. "6 1" or \[6,1\] for a sequence of 6 black point and 1 white point | #### Objects Supported [Rectangle](shapes_overview.md#rectangle) - [Oval](shapes_overview.md#oval) - [Line](shapes_overview.md#line) -* * * -## Hide extra blank rows + + +--- +## Esconder linhas em branco extras Controls the display of extra blank rows added at the bottom of a list box object. By default, 4D adds such extra rows to fill the empty area: @@ -114,18 +113,19 @@ You can remove these empty rows by selecting this option. The bottom of the list #### JSON Grammar -| Name | Data Type | Possible Values | -| ------------------ | --------- | --------------- | -| hideExtraBlankRows | boolean | true, false | - +| Nome | Tipo de dados | Possible Values | +| ------------------ | ------------- | --------------- | +| hideExtraBlankRows | booleano | true, false | #### Objects Supported [List Box](listbox_overview.md#overview) -* * * -## Line Color + + +--- +## Cor da linha Designates the color of the object's lines. The color can be specified by: @@ -137,10 +137,9 @@ You can also set this property using the [**OBJECT SET RGB COLORS**](https://doc #### JSON Grammar -| Name | Data Type | Possible Values | -| ------ | --------- | ----------------------------------------- | -| stroke | string | any css value, "transparent", "automatic" | - +| Nome | Tipo de dados | Possible Values | +| ------ | ------------- | ----------------------------------------- | +| stroke | string | any css value, "transparent", "automatic" | > This property is also available for text based objects, in which case it designates both the font color and the object's lines, see [Font color](properties_Text.md#font-color). @@ -148,26 +147,31 @@ You can also set this property using the [**OBJECT SET RGB COLORS**](https://doc [Line](shapes_overview.md#line) - [Oval](shapes_overview.md#oval) - [Rectangle](shapes_overview.md#rectangle) -* * * -## Line Width + +--- +## Largura da linha Designates the thickness of a line. #### JSON Grammar -| Name | Data Type | Possible Values | -| ----------- | --------- | ----------------------------------------------------------------- | -| strokeWidth | number | 0 for smallest width on a printed form, or any integer value < 20 | - +| Nome | Tipo de dados | Possible Values | +| ----------- | ------------- | ----------------------------------------------------------------- | +| strokeWidth | number | 0 for smallest width on a printed form, or any integer value < 20 | #### Objects Supported [Line](shapes_overview.md#line) - [Oval](shapes_overview.md#oval) - [Rectangle](shapes_overview.md#rectangle) -* * * -## Row Background Color Array + + + + + +--- +## Array cor fundo linha `Array type list boxes` @@ -181,7 +185,6 @@ For example, given a list box where the rows have an alternating gray/light gray <>_BgndColors{$i}:=0x00FFD0B0 // orange <>_BgndColors{$i}:=-255 // default value ``` - ![](assets/en/FormObjects/listbox_styles1.png) Next you want to color the cells with negative values in dark orange. To do this, you set a background color array for each column, for example <>_BgndColor_1, <>_BgndColor_2 and <>_BgndColor_3. The values of these arrays have priority over the ones set in the list box properties as well as those of the general background color array: @@ -192,39 +195,37 @@ Next you want to color the cells with negative values in dark orange. To do this <>_BgndColorsCol_1{9}:=0x00FF8000 <>_BgndColorsCol_1{16}:=0x00FF8000 ``` - ![](assets/en/FormObjects/listbox_styles2.png) You can get the same result using the `LISTBOX SET ROW FONT STYLE` and `LISTBOX SET ROW COLOR` commands. They have the advantage of letting you skip having to predefine style/color arrays for the columns: instead they are created dynamically by the commands. -#### JSON Grammar -| Name | Data Type | Possible Values | -| ------------- | --------- | ---------------------------- | -| rowFillSource | string | The name of a longint array. | +#### JSON Grammar +| Nome | Tipo de dados | Possible Values | +| ------------- | ------------- | ---------------------------- | +| rowFillSource | string | The name of a longint array. | #### Objects Supported - [List Box](listbox_overview.md) - [List Box Column](listbox_overview.md#list-box-columns) -* * * -## Transparent + + + +--- +## Transparente Sets the list box background to "Transparent". When set, any [alternate background color](#alternate-background-color) or [background color](#background-color-fill-color) defined for the column is ignored. #### JSON Grammar -| Name | Data Type | Possible Values | -| ---- | --------- | --------------- | -| fill | text | "transparent" | - +| Nome | Tipo de dados | Possible Values | +| ---- | ------------- | --------------- | +| fill | texto | "transparent" | #### Objects Supported - [List Box](listbox_overview.md#overview) -#### See also - -[Background Color / Fill Color](#background-color-fill-color) \ No newline at end of file +#### Veja também +[Background Color / Fill Color](#background-color-fill-color) diff --git a/website/translated_docs/pt/FormObjects/properties_CoordinatesAndSizing.md b/website/translated_docs/pt/FormObjects/properties_CoordinatesAndSizing.md index edf1fad205b395..5969acddebed87 100644 --- a/website/translated_docs/pt/FormObjects/properties_CoordinatesAndSizing.md +++ b/website/translated_docs/pt/FormObjects/properties_CoordinatesAndSizing.md @@ -3,114 +3,117 @@ id: propertiesCoordinatesAndSizing title: Coordinates & Sizing --- -* * * - +--- ## Automatic Row Height - -`4D View Pro only: This feature requires a 4D View Pro license.` +`Só para 4D View Pro: esta funcionalidade exige uma licença 4D View Pro.` This property is only available for array-based, non-hierarchical list boxes. The property is not selected by default. When used, the height of every row in the column will automatically be calculated by 4D, and the column contents will be taken into account. Note that only columns with the option selected will be taken into account to calculate the row height. - > When resizing the form, if the "Grow" [horizontal sizing](properties_ResizingOptions.md#horizontal-sizing) property was assigned to the list box, the right-most column will be increased beyond its maximum width if necessary. When this property is enabled, the height of every row is automatically calculated in order to make the cell contents entirely fit without being truncated (unless the [Wordwrap](properties_Display.md#wordwrap) option is disabled. -* The row height calculation takes into account: - - * any content types (text, numerics, dates, times, pictures (calculation depends on the picture format), objects), - * any control types (inputs, check boxes, lists, dropdowns), - * fonts, fonts styles and font sizes, - * the [Wordwrap](properties_Display.md#wordwrap) option: if disabled, the height is based on the number of paragraphs (lines are truncated); if enabled, the height is based on number of lines (not truncated). -* The row height calculation ignores: - - * hidden column contents - * [Row Height](#row-height) and [Row Height Array](#row-height-array) properties (if any) set either in the Property list or by programming. +* The row height calculation takes into account: + * any content types (text, numerics, dates, times, pictures (calculation depends on the picture format), objects), + * any control types (inputs, check boxes, lists, dropdowns), + * fonts, fonts styles and font sizes, + * the [Wordwrap](properties_Display.md#wordwrap) option: if disabled, the height is based on the number of paragraphs (lines are truncated); if enabled, the height is based on number of lines (not truncated). + +* The row height calculation ignores: + * hidden column contents + * [Row Height](#row-height) and [Row Height Array](#row-height-array) properties (if any) set either in the Property list or by programming. +> > > Since it requires additional calculations at runtime, the automatic row height option could affect the scrolling fluidity of your list box, in particular when it contains a large number of rows. -> Since it requires additional calculations at runtime, the automatic row height option could affect the scrolling fluidity of your list box, in particular when it contains a large number of rows. -#### JSON Grammar -| Name | Data Type | Possible Values | -| ------------- | --------- | --------------- | -| rowHeightAuto | boolean | true, false | +#### JSON Grammar + +| Nome | Tipo de dados | Possible Values | +| ------------- | ------------- | --------------- | +| rowHeightAuto | booleano | true, false | #### Objects Supported [List Box Column](listbox_overview.md#list-box-columns) -* * * -## Bottom + + + +--- +## Fundo Bottom coordinate of the object in the form. -#### JSON Grammar -| Name | Data Type | Possible Values | -| ------ | --------- | --------------- | -| bottom | number | minimum: 0 | +#### JSON Grammar +| Nome | Tipo de dados | Possible Values | +| ------ | ------------- | --------------- | +| bottom | number | mínimo: 0 | #### Objects Supported [4D View Pro Area](viewProArea_overview.md) - [4D Write Pro Area](writeProArea_overview.md) - [Button](button_overview.md) - [Button Grid](buttonGrid_overview.md) - [Check Box](checkbox_overview.md) - [Combo Box](comboBox_overview.md) - [Dropdown list](dropdownList_Overview.md) - [Group Box](groupBox.md) - [Hierarchical List](list_overview.md#overview) - [Input](input_overview.md) - [List Box](listbox_overview.md#overview) - [Line](shapes_overview.md#line) - [List Box Column](listbox_overview.md#list-box-columns) - [Oval](shapes_overview.md#oval) - [Picture Button](pictureButton_overview.md) - [Picture Pop up menu](picturePopupMenu_overview.md) - [Plug-in Area](pluginArea_overview.md#overview) - [Progress Indicators](progressIndicator.md) - [Radio Button](radio_overview.md) - [Rectangle](shapes_overview.md#rectangle) - [Ruler](ruler.md) - [Spinner](spinner.md) - [Splitter](splitters.md) - [Static Picture](staticPicture.md) - [Stepper](stepper.md) - [Subform](subform_overview.md) - [Tab control](tabControl.md) - [Text Area](text.md) - [Web Area](webArea_overview.md#overview) -* * * -## Left +--- +## Esquerda Left coordinate of the object on the form. #### JSON Grammar -| Name | Data Type | Possible Values | -| ---- | --------- | --------------- | -| left | number | minimum: 0 | +| Nome | Tipo de dados | Possible Values | +| ---- | ------------- | --------------- | +| left | number | mínimo: 0 | #### Objects Supported [4D View Pro Area](viewProArea_overview.md) - [4D Write Pro Area](writeProArea_overview.md) - [Button](button_overview.md) - [Button Grid](buttonGrid_overview.md) - [Check Box](checkbox_overview.md) - [Combo Box](comboBox_overview.md) - [Dropdown list](dropdownList_Overview.md) - [Group Box](groupBox.md) - [Hierarchical List](list_overview.md#overview) - [Input](input_overview.md) - [List Box](listbox_overview.md#overview) - [Line](shapes_overview.md#line) - [List Box Column](listbox_overview.md#list-box-columns) - [Oval](shapes_overview.md#oval) - [Picture Button](pictureButton_overview.md) - [Picture Pop up menu](picturePopupMenu_overview.md) - [Plug-in Area](pluginArea_overview.md#overview) - [Progress Indicators](progressIndicator.md) - [Radio Button](radio_overview.md) - [Ruler](ruler.md) - [Rectangle](shapes_overview.md#rectangle) - [Spinner](spinner.md) - [Splitter](splitters.md) - [Static Picture](staticPicture.md) - [Stepper](stepper.md) - [Subform](subform_overview.md) - [Tab control](tabControl.md) - [Text Area](text.md) - [Web Area](webArea_overview.md#overview) -* * * -## Right + +--- +## Direita Right coordinate of the object in the form. #### JSON Grammar -| Name | Data Type | Possible Values | -| ----- | --------- | --------------- | -| right | number | minimum: 0 | - +| Nome | Tipo de dados | Possible Values | +| ------- | ------------- | --------------- | +| direita | number | mínimo: 0 | #### Objects Supported [4D View Pro Area](viewProArea_overview.md) - [4D Write Pro Area](writeProArea_overview.md) - [Button](button_overview.md) - [Button Grid](buttonGrid_overview.md) - [Check Box](checkbox_overview.md) - [Combo Box](comboBox_overview.md) - [Dropdown list](dropdownList_Overview.md) - [Group Box](groupBox.md) - [Hierarchical List](list_overview.md#overview) - [Input](input_overview.md) - [List Box](listbox_overview.md#overview) - [Line](shapes_overview.md#line) - [List Box Column](listbox_overview.md#list-box-columns) - [Oval](shapes_overview.md#oval) - [Picture Button](pictureButton_overview.md) - [Picture Pop up menu](picturePopupMenu_overview.md) - [Plug-in Area](pluginArea_overview.md#overview) - [Progress Indicators](progressIndicator.md) - [Radio Button](radio_overview.md) - [Ruler](ruler.md) - [Rectangle](shapes_overview.md#rectangle) - [Spinner](spinner.md) - [Splitter](splitters.md) - [Static Picture](staticPicture.md) - [Stepper](stepper.md) - [Subform](subform_overview.md) - [Tab control](tabControl.md) - [Text Area](text.md) - [Web Area](webArea_overview.md#overview) -* * * -## Top + + +--- +## Topo Top coordinate of the object in the form. #### JSON Grammar -| Name | Data Type | Possible Values | -| ---- | --------- | --------------- | -| top | number | minimum: 0 | - +| Nome | Tipo de dados | Possible Values | +| ---- | ------------- | --------------- | +| top | number | mínimo: 0 | #### Objects Supported [4D View Pro Area](viewProArea_overview.md) - [4D Write Pro Area](writeProArea_overview.md) - [Button](button_overview.md) - [Button Grid](buttonGrid_overview.md) - [Check Box](checkbox_overview.md) - [Combo Box](comboBox_overview.md) - [Dropdown list](dropdownList_Overview.md) - [Group Box](groupBox.md) - [Hierarchical List](list_overview.md#overview) - [Input](input_overview.md) - [List Box](listbox_overview.md#overview) - [Line](shapes_overview.md#line) - [List Box Column](listbox_overview.md#list-box-columns) - [Oval](shapes_overview.md#oval) - [Picture Button](pictureButton_overview.md) - [Picture Pop up menu](picturePopupMenu_overview.md) - [Plug-in Area](pluginArea_overview.md#overview) - [Progress Indicators](progressIndicator.md) - [Radio Button](radio_overview.md) - [Ruler](ruler.md) - [Rectangle](shapes_overview.md#rectangle) - [Spinner](spinner.md) - [Splitter](splitters.md) - [Static Picture](staticPicture.md) - [Stepper](stepper.md) - [Subform](subform_overview.md) - [Tab control](tabControl.md) - [Text Area](text.md) - [Web Area](webArea_overview.md#overview) -* * * + + +--- ## Corner Radius Defines the corner roundness (in pixels) of objects of the [rectangle](shapes_overview.md#rectangle) type. By default, the radius value for rectangles is 0 pixels. You can change this property to draw rounded rectangles with custom shapes: @@ -123,119 +126,129 @@ You can also set this property using the [OBJECT Get corner radius](https://doc. #### JSON Grammar -| Name | Data Type | Possible Values | -| ------------ | --------- | --------------- | -| borderRadius | integer | minimum: 0 | - +| Nome | Tipo de dados | Possible Values | +| ------------ | ------------- | --------------- | +| borderRadius | integer | mínimo: 0 | #### Objects Supported -[Rectangle](shapes_overview.md#rectangle) +[Retângulo](shapes_overview.md#rectangle) -* * * -## Height -This property designates an object's vertical size. +--- +## Alto + +This property designates an object's vertical size. > Some objects may have a predefined height that cannot be altered. #### JSON Grammar -| Name | Data Type | Possible Values | -| ------ | --------- | --------------- | -| height | number | minimum: 0 | - +| Nome | Tipo de dados | Possible Values | +| ------ | ------------- | --------------- | +| height | number | mínimo: 0 | #### Objects Supported [4D View Pro Area](viewProArea_overview.md) - [4D Write Pro Area](writeProArea_overview.md) - [Button](button_overview.md) - [Button Grid](buttonGrid_overview.md) - [Check Box](checkbox_overview.md) - [Combo Box](comboBox_overview.md) - [Dropdown list](dropdownList_Overview.md) - [Group Box](groupBox.md) - [Hierarchical List](list_overview.md#overview) - [Input](input_overview.md) - [List Box](listbox_overview.md#overview) - [Line](shapes_overview.md#line) - [List Box Column](listbox_overview.md#list-box-columns) - [Oval](shapes_overview.md#oval) - [Picture Button](pictureButton_overview.md) - [Picture Pop up menu](picturePopupMenu_overview.md) - [Plug-in Area](pluginArea_overview.md#overview) - [Progress Indicators](progressIndicator.md) - [Radio Button](radio_overview.md) - [Ruler](ruler.md) - [Rectangle](shapes_overview.md#rectangle) - [Spinner](spinner.md) - [Splitter](splitters.md) - [Static Picture](staticPicture.md) - [Stepper](stepper.md) - [Subform](subform_overview.md) - [Tab control](tabControl.md) - [Text Area](text.md) - [Web Area](webArea_overview.md#overview) -* * * -## Width +--- +## Largura This property designates an object's horizontal size. - > * Some objects may have a predefined height that cannot be altered. > * If the [Resizable](properties_ResizingOptions.md#resizable) property is used for a [list box column](listbox_overview.md#list-box-columns), the user can also manually resize the column. > * When resizing the form, if the ["Grow" horizontal sizing](properties_ResizingOptions.md#horizontal-sizing) property was assigned to the list box, the right-most column will be increased beyond its maximum width if necessary. -#### JSON Grammar -| Name | Data Type | Possible Values | -| ----- | --------- | --------------- | -| width | number | minimum: 0 | +#### JSON Grammar +| Nome | Tipo de dados | Possible Values | +| ----- | ------------- | --------------- | +| width | number | mínimo: 0 | #### Objects Supported [4D View Pro Area](viewProArea_overview.md) - [4D Write Pro Area](writeProArea_overview.md) - [Button](button_overview.md) - [Button Grid](buttonGrid_overview.md) - [Check Box](checkbox_overview.md) - [Combo Box](comboBox_overview.md) - [Dropdown list](dropdownList_Overview.md) - [Group Box](groupBox.md) - [Hierarchical List](list_overview.md#overview) - [Input](input_overview.md) - [List Box](listbox_overview.md#overview) - [Line](shapes_overview.md#line) - [List Box Column](listbox_overview.md#list-box-columns) - [Oval](shapes_overview.md#oval) - [Picture Button](pictureButton_overview.md) - [Picture Pop up menu](picturePopupMenu_overview.md) - [Plug-in Area](pluginArea_overview.md#overview) - [Progress Indicators](progressIndicator.md) - [Radio Button](radio_overview.md) - [Ruler](ruler.md) - [Rectangle](shapes_overview.md#rectangle) - [Spinner](spinner.md) - [Splitter](splitters.md) - [Static Picture](staticPicture.md) - [Stepper](stepper.md) - [Subform](subform_overview.md) - [Tab control](tabControl.md) - [Text Area](text.md) - [Web Area](webArea_overview.md#overview) -* * * + + + + + + + +--- ## Maximum Width The maximum width of the column (in pixels). The width of the column cannot be increased beyond this value when resizing the column or form. - > When resizing the form, if the ["Grow" horizontal sizing](properties_ResizingOptions.md#horizontal-sizing) property was assigned to the list box, the right-most column will be increased beyond its maximum width if necessary. -#### JSON Grammar -| Name | Data Type | Possible Values | -| -------- | --------- | --------------- | -| maxWidth | number | minimum: 0 | +#### JSON Grammar +| Nome | Tipo de dados | Possible Values | +| -------- | ------------- | --------------- | +| maxWidth | number | mínimo: 0 | #### Objects Supported [List Box Column](listbox_overview.md#list-box-columns) -* * * +--- ## Minimum Width The minimum width of the column (in pixels). The width of the column cannot be reduced below this value when resizing the column or form. - > When resizing the form, if the ["Grow" horizontal sizing](properties_ResizingOptions.md#horizontal-sizing) property was assigned to the list box, the right-most column will be increased beyond its maximum width if necessary. -#### JSON Grammar -| Name | Data Type | Possible Values | -| -------- | --------- | --------------- | -| minWidth | number | minimum: 0 | +#### JSON Grammar +| Nome | Tipo de dados | Possible Values | +| -------- | ------------- | --------------- | +| minWidth | number | mínimo: 0 | #### Objects Supported [List Box Column](listbox_overview.md#list-box-columns) -* * * -## Row Height + + + + + + +--- +## Altura linha + Sets the height of list box rows (excluding headers and footers). By default, the row height is set according to the platform and the font size. -#### JSON Grammar -| Name | Data Type | Possible Values | -| --------- | --------- | ---------------------------------------- | -| rowHeight | string | css value in unit "em" or "px" (default) | +#### JSON Grammar +| Nome | Tipo de dados | Possible Values | +| --------- | ------------- | ---------------------------------------- | +| rowHeight | string | css value in unit "em" or "px" (default) | #### Objects Supported [List Box](listbox_overview.md#overview) -#### See also -[Row Height Array](#row-height-array) +#### Veja também +[Array altura linha](#row-height-array) -* * * -## Row Height Array -`4D View Pro only: This feature requires a 4D View Pro license.` +--- +## Array altura linha +`Só para 4D View Pro: esta funcionalidade exige uma licença 4D View Pro.` This property is used to specify the name of a row height array that you want to associate with the list box. A row height array must be of the numeric type (longint by default). @@ -249,21 +262,19 @@ RowHeights{5}:=3 ``` Assuming that the unit of the rows is "lines," then the fifth row of the list box will have a height of three lines, while every other row will keep its default height. - > * The Row Height Array property is not taken into account for hierarchical list boxes. > * For array-based list boxes, this property is available only if the [Automatic Row Height](#automatic-row-height) option is not selected. #### JSON Grammar -| Name | Data Type | Possible Values | -| --------------- | --------- | ---------------------------- | -| rowHeightSource | string | Name of a 4D array variable. | - +| Nome | Tipo de dados | Possible Values | +| --------------- | ------------- | ---------------------------- | +| rowHeightSource | string | Name of a 4D array variable. | #### Objects Supported [List Box](listbox_overview.md#overview) -#### See also -[Row Height](#row-height) \ No newline at end of file +#### Veja também +[Altura linha](#row-height) diff --git a/website/translated_docs/pt/FormObjects/properties_Crop.md b/website/translated_docs/pt/FormObjects/properties_Crop.md index 18efd590218fae..035614da93a19f 100644 --- a/website/translated_docs/pt/FormObjects/properties_Crop.md +++ b/website/translated_docs/pt/FormObjects/properties_Crop.md @@ -3,36 +3,35 @@ id: propertiesCrop title: Crop --- -* * * - -## Columns +--- +## Colunas Sets the number of columns in a thumbnail table. #### JSON Grammar -| Name | Data Type | Possible Values | -|:----------- |:---------:| --------------- | -| columnCount | integer | minimum: 1 | - +| Nome | Tipo de dados | Possible Values | +|:----------- |:-------------:| --------------- | +| columnCount | integer | mínimo: 1 | #### Objects Supported [Picture Button](pictureButton_overview.md) - [Button Grid](buttonGrid_overview.md) - [Picture Pop-up Menu](picturePopupMenu_overview.md) -* * * + + +--- ## Rows Sets the number of rows in a thumbnail table. #### JSON Grammar -| Name | Data Type | Possible Values | -|:-------- |:---------:| --------------- | -| rowCount | integer | minimum: 1 | - +| Nome | Tipo de dados | Possible Values | +|:-------- |:-------------:| --------------- | +| rowCount | integer | mínimo: 1 | #### Objects Supported -[Picture Button](pictureButton_overview.md) - [Button Grid](buttonGrid_overview.md) - [Picture Pop-up Menu](picturePopupMenu_overview.md) \ No newline at end of file +[Picture Button](pictureButton_overview.md) - [Button Grid](buttonGrid_overview.md) - [Picture Pop-up Menu](picturePopupMenu_overview.md) diff --git a/website/translated_docs/pt/FormObjects/properties_DataSource.md b/website/translated_docs/pt/FormObjects/properties_DataSource.md index 12baa06035acf0..f9eb7afac4c4ad 100644 --- a/website/translated_docs/pt/FormObjects/properties_DataSource.md +++ b/website/translated_docs/pt/FormObjects/properties_DataSource.md @@ -1,14 +1,12 @@ --- id: propertiesDataSource -title: Data Source +title: Fonte de dados --- -* * * - +--- ## Automatic Insertion When this option is selected, if a user enters a value that is not found in the choice list associated with the object, this value is automatically added to the list stored in memory. You can associate choice lists to objects using: - - the [Choice List](properties_DataSource.md#choice-list) JSON property - the [OBJECT SET LIST BY NAME](https://doc.4d.com/4Dv17R5/4D/17-R5/OBJECT-SET-LIST-BY-NAME.301-4128227.en.html) or [OBJECT SET LIST BY REFERENCE](https://doc.4d.com/4Dv17R5/4D/17-R5/OBJECT-SET-LIST-BY-REFERENCE.301-4128237.en.html) commands. - the form editor's Property List. @@ -18,106 +16,104 @@ For example, given a choice list containing "France, Germany, Italy" that is ass ![](assets/en/FormObjects/comboBox_AutomaticInsertion_example.png) Naturally, the value entered must not belong to the list of [excluded values](properties_RangeOfValues.md#excluded-list) associated with the object, if one has been set. - > If the list was created from a list defined in Design mode, the original list is not modified. When the **automatic insertion** option is not selected (default), the value entered is stored in the object but not in the list in memory. #### JSON Grammar -| Name | Data Type | Possible Values | -| ------------------ | --------- | --------------- | -| automaticInsertion | boolean | true, false | - +| Nome | Tipo de dados | Possible Values | +| ------------------ | ------------- | --------------- | +| automaticInsertion | booleano | true, false | #### Objects Supported [Combo Box](comboBox_overview.md) - [List Box Column](listbox_overview.md#list-box-columns) -* * * + + +--- ## Choice List Associates a choice list with an object. It can be a choice list name (a list reference) or a collection of default values. #### JSON Grammar -| Name | Data Type | Possible Values | +| Nome | Tipo de dados | Possible Values | | ---------- | ---------------- | --------------------------------------------------- | | choiceList | list, collection | A list of possible values | -| list | list, collection | A list of possible values (hierarchical lists only) | +| lista | list, collection | A list of possible values (hierarchical lists only) | #### Objects Supported -[Drop-down List](dropdownList_Overview.md) - [Combo Box](comboBox_overview.md) - [Hierarchical List](list_overview.md#overview) - [List Box Column](listbox_overview.md#list-box-columns) +[Lista suspensa](dropdownList_Overview.md) - [Combo Box](comboBox_overview.md) - [Lista hierárquica](list_overview.md#overview) - [Coluna List Box](listbox_overview.md#list-box-columns) -* * * + +--- ## Choice List (static list) List of static values to use as labels for the tab control object. #### JSON Grammar -| Name | Data Type | Possible Values | +| Nome | Tipo de dados | Possible Values | | ------ | ---------------- | ---------------------------------------- | | labels | list, collection | A list of values to fill the tab control | - #### Objects Supported [Tab Control](tabControl.md) -* * * - -## Current item +--- +## Item atual `Collection or entity selection list boxes` Specifies a variable or expression that will be assigned the collection element/entity selected by the user. You must use an object variable or an assignable expression that accepts objects. If the user does not select anything or if you used a collection of scalar values, the Null value is assigned. - > This property is "read-only", it is automatically updated according to user actions in the list box. You cannot edit its value to modify the list box selection status. #### JSON Grammar -| Name | Data Type | Possible Values | -| ----------------- | --------- | ----------------- | -| currentItemSource | string | Object expression | - +| Nome | Tipo de dados | Possible Values | +| ----------------- | ------------- | ----------------- | +| currentItemSource | string | Object expression | #### Objects Supported - [List Box ](listbox_overview.md#overview) -* * * -## Current item position + +--- + +## Posição item atual `Collection or entity selection list boxes` Specifies a variable or expression that will be assigned a longint indicating the position of the collection element/entity selected by the user. -* if no element/entity is selected, the variable or expression receives zero, -* if a single element/entity is selected, the variable or expression receives its location, -* if multiple elements/entities are selected, the variable or expression receives the position of element/entity that was last selected. - +* if no element/entity is selected, the variable or expression receives zero, +* if a single element/entity is selected, the variable or expression receives its location, +* if multiple elements/entities are selected, the variable or expression receives the position of element/entity that was last selected. > This property is "read-only", it is automatically updated according to user actions in the list box. You cannot edit its value to modify the list box selection status. #### JSON Grammar -| Name | Data Type | Possible Values | -| ------------------------- | --------- | ----------------- | -| currentItemPositionSource | string | Number expression | - +| Nome | Tipo de dados | Possible Values | +| ------------------------- | ------------- | ----------------- | +| currentItemPositionSource | string | Number expression | #### Objects Supported - [List Box ](listbox_overview.md) -* * * -## Data Type + + + +--- +## Tipo de dados Please refer to [Expression Type](properties_Object.md#expression-type) section. @@ -125,7 +121,12 @@ Please refer to [Expression Type](properties_Object.md#expression-type) section. [List Box Column](listbox_overview.md#list-box-columns) -* * * + + + + + +--- ## Default (list of) values @@ -141,18 +142,19 @@ You must enter a list of values. In the Form editor, a specific dialog box allow #### JSON Grammar -| Name | Data Type | Possible Values | -| ------ | ---------- | ---------------------------------------------------------------- | -| values | collection | A collection of default values (strings), ex: "a", "b", "c", "d" | - +| Nome | Tipo de dados | Possible Values | +| ------ | ------------- | ---------------------------------------------------------------- | +| values | collection | A collection of default values (strings), ex: "a", "b", "c", "d" | #### Objects Supported [List Box Column (array type only)](listbox_overview.md#list-box-columns) -* * * -## Expression + + +--- +## Expressão This description is specific to [selection](listbox_overview.md#selection-list-boxes) and [collection](listbox_overview.md#collection-or-entity-selection-list-boxes) type list box columns. See also **[Variable or Expression](properties_Object.md#variable-or-expression)** section. @@ -161,47 +163,47 @@ A 4D expression to be associated with a column. You can enter: - A **simple variable** (in this case, it must be explicitly declared for compilation). You can use any type of variable except BLOBs and arrays. The value of the variable will be generally calculated in the `On Display Detail` event. - A **field** using the standard [Table]Field syntax ([selection type list box](listbox_overview.md#selection-list-boxes) only), for example: `[Employees]LastName`. The following types of fields can be used: - - * String - * Numeric - * Date - * Time - * Picture - * Boolean - You can use fields from the Master Table or from other tables. -* A **4D expression** (simple expression, formula or 4D method). The expression must return a value. The value will be evaluated in the `On Display Detail` and `On Data Change` events. The result of the expression will be automatically displayed when you switch to Application mode. The expression will be evaluated for each record of the selection (current or named) of the Master Table (for selection type list boxes), each element of the collection (for collection type list boxes) or each entity of the selection (for entity selection list boxes). If it is empty, the column will not display any results. - The following expression types are supported: - - * String - * Numeric - * Date - * Picture - * Boolean - - - For collection/entity selection list boxes, Null or unsupported types are displayed as empty strings. - When using collections or entity selections, you will usually declare the element property or entity attribute associated to a column within an expression containing [This](https://doc.4d.com/4Dv17R6/4D/17-R6/This.301-4310806.en.html). `This` is a dedicated 4D command that returns a reference to the currently processed element. For example, you can use **This.\** where **\** is the path of a property in the collection or an entity attribute path to access the current value of each element/entity. - If you use a collection of scalar values, 4D will create an object for each collection element with a single property (named "value"), filled with the element value. In this case, you will use **This.value** as expression. - - If a [non-assignable expression](Concepts/quick-tour.md#expressions) is used (e.g. `[Person]FirstName+" "+[Person]LastName`), the column is never enterable even if the [Enterable](properties_Entry.md#enterable) property is enabled. + * String + * Numeric + * Date + * Hora + * Imagem + * Boolean + You can use fields from the Master Table or from other tables. + +- A **4D expression** (simple expression, formula or 4D method). The expression must return a value. The value will be evaluated in the `On Display Detail` and `On Data Change` events. The result of the expression will be automatically displayed when you switch to Application mode. The expression will be evaluated for each record of the selection (current or named) of the Master Table (for selection type list boxes), each element of the collection (for collection type list boxes) or each entity of the selection (for entity selection list boxes). If it is empty, the column will not display any results. + The following expression types are supported: + * String + * Numeric + * Date + * Imagem + * Booleano + + For collection/entity selection list boxes, Null or unsupported types are displayed as empty strings. +When using collections or entity selections, you will usually declare the element property or entity attribute associated to a column within an expression containing [This](https://doc.4d.com/4Dv17R6/4D/17-R6/This.301-4310806.en.html). `This` is a dedicated 4D command that returns a reference to the currently processed element. For example, you can use **This.\** where **\** is the path of a property in the collection or an entity attribute path to access the current value of each element/entity. +If you use a collection of scalar values, 4D will create an object for each collection element with a single property (named "value"), filled with the element value. In this case, you will use **This.value** as expression. + + If a [non-assignable expression](Concepts/quick-tour.md#expressions) is used (e.g. `[Person]FirstName+" "+[Person]LastName`), the column is never enterable even if the [Enterable](properties_Entry.md#enterable) property is enabled. If a field, a variable, or an assignable expression (*e.g. Person.lastName*) is used, the column can be enterable or not depending on the [Enterable](properties_Entry.md#enterable) property. -#### JSON Grammar -| Name | Data Type | Possible Values | -| ---------- | --------- | ----------------------------------------------------------------------- | -| dataSource | string | A 4D variable, field name, or an arbitrary complex language expression. | +#### JSON Grammar +| Nome | Tipo de dados | Possible Values | +| ---------- | ------------- | ----------------------------------------------------------------------- | +| dataSource | string | A 4D variable, field name, or an arbitrary complex language expression. | #### Objects Supported [List Box Column](listbox_overview.md#list-box-columns) -* * * -## Master Table + +--- + +## Tabela mestre `Current selection list boxes` Specifies the table whose current selection will be used. This table and its current selection will form the reference for the fields associated with the columns of the list box (field references or expressions containing fields). Even if some columns contain fields from other tables, the number of rows displayed will be defined by the master table. @@ -210,18 +212,19 @@ All database tables can be used, regardless of whether the form is related to a #### JSON Grammar -| Name | Data Type | Possible Values | -| ----- | --------- | --------------- | -| table | number | Table number | - +| Nome | Tipo de dados | Possible Values | +| ------ | ------------- | --------------- | +| tabela | number | Table number | #### Objects Supported - [List Box](listbox_overview.md#overview) -* * * -## Save as + +--- + +## Salvar como + This property is available in the following conditions: @@ -241,45 +244,40 @@ Using this property requires compliance with the following principles: - Valid and unique references must be associated with list items. - If you use this property for a [drop-down list](dropdownList_Overview.md), it must be associated with a field. -#### JSON Grammar -| Name | Data Type | Possible Values | -| ------ | --------- | -------------------- | -| saveAs | string | "value", "reference" | +#### JSON Grammar +| Nome | Tipo de dados | Possible Values | +| ------ | ------------- | -------------------- | +| saveAs | string | "value", "reference" | #### Objects Supported - [Drop-down List](dropdownList_Overview.md) - [Input](input_overview.md) - [List Box Column](listbox_overview.md#list-box-columns) -* * * -## Selected Items +--- +## Itens selecionados `Collection or entity selection list boxes` Specifies a variable or expression that will be assigned the elements or entities selected by the user. -* for a collection list box, you must use a collection variable or an assignable expression that accepts collections, -* for an entity selection list box, an entity selection object is built. You must use an object variable or an assignable expression that accepts objects. - +* for a collection list box, you must use a collection variable or an assignable expression that accepts collections, +* for an entity selection list box, an entity selection object is built. You must use an object variable or an assignable expression that accepts objects. > This property is "read-only", it is automatically updated according to user actions in the list box. You cannot edit its value to modify the list box selection status. #### JSON Grammar -| Name | Data Type | Possible Values | -| ------------------- | --------- | --------------------- | -| selectedItemsSource | string | Collection expression | - +| Nome | Tipo de dados | Possible Values | +| ------------------- | ------------- | --------------------- | +| selectedItemsSource | string | Collection expression | #### Objects Supported - [List Box ](listbox_overview.md#overview) -* * * +--- ## Selection Name - `Named selection list boxes` Specifies the named selection to be used. You must enter the name of a valid named selection. It can be a process or interprocess named selection. The contents of the list box will be based on this selection. The named selection chosen must exist and be valid at the time the list box is displayed, otherwise the list box will be displayed blank. @@ -288,11 +286,9 @@ Specifies the named selection to be used. You must enter the name of a valid nam #### JSON Grammar -| Name | Data Type | Possible Values | -| -------------- | --------- | -------------------- | -| namedSelection | string | Named selection name | - +| Nome | Tipo de dados | Possible Values | +| -------------- | ------------- | -------------------- | +| namedSelection | string | Named selection name | #### Objects Supported - -[List Box](listbox_overview.md#overview) \ No newline at end of file +[List Box](listbox_overview.md#overview) diff --git a/website/translated_docs/pt/FormObjects/properties_Display.md b/website/translated_docs/pt/FormObjects/properties_Display.md index 98ed924db0fd31..487fc0c537a98f 100644 --- a/website/translated_docs/pt/FormObjects/properties_Display.md +++ b/website/translated_docs/pt/FormObjects/properties_Display.md @@ -1,10 +1,9 @@ --- id: propertiesDisplay -title: Display +title: Visualização --- -* * * - +--- ## Alpha Format Alpha formats control the way the alphanumeric fields and variables appear when displayed or printed. Here is a list of formats provided for alphanumeric fields: @@ -20,44 +19,48 @@ For example, consider a part number with a format such as "RB-1762-1". The alpha format would be: ##-####-# - When the user enters "RB17621," the field displays: RB-1762-1 - The field actually contains "RB17621". If the user enters more characters than the format allows, 4D displays the last characters. For example, if the format is: (#######) - and the user enters "proportion", the field displays: (portion) - The field actually contains "proportion". 4D accepts and stores the entire entry no matter what the display format. No information is lost. #### JSON Grammar -| Name | Data Type | Possible Values | -| ---------- | --------- | ------------------------------------------------------------------------------------ | -| textFormat | string | "### ####", "(###) ### ####", "### ### ####", "### ## ####", "00000", custom formats | - +| Nome | Tipo de dados | Possible Values | +| ---------- | ------------- | ------------------------------------------------------------------------------------ | +| textFormat | string | "### ####", "(###) ### ####", "### ### ####", "### ## ####", "00000", custom formats | #### Objects Supported [Drop-down List](dropdownList_Overview.md) - [Combo Box](comboBox_overview.md) - [List Box Column](listbox_overview.md#list-box-columns) - [List Box Footer](listbox_overview.md#list-box-footers) -* * * + + + + + + + + + + +--- ## Date Format Date formats control the way dates appear when displayed or printed. For data entry, you enter dates in the MM/DD/YYYY format, regardless of the display format you have chosen. - > Unlike [Alpha](#alpha-format) and [Number](#number-format) formats, display formats for dates must only be selected among the 4D built-in formats. The table below shows choices available: @@ -74,30 +77,28 @@ The table below shows choices available: | Internal date short | short | 03/25/2020 | | ISO Date Time *(3)* | iso8601 | 2020-03-25T00:00:00 | - *(1)* To avoid ambiguity and in accordance with current practice, the abbreviated date formats display "jun" for June and "jul" for July. This particularity only applies to French versions of 4D. *(2)* The year is displayed using two digits when it belongs to the interval (1930;2029) otherwise it will be displayed using four digits. This is by default but it can be modified using the [SET DEFAULT CENTURY](https://doc.4d.com/4Dv17R6/4D/17-R6/SET-DEFAULT-CENTURY.301-4311596.en.html) command. *(3)* The `ISO Date Time` format corresponds to the XML date and time representation standard (ISO8601). It is mainly intended to be used when importing/exporting data in XML format and in Web Services. - > Regardless of the display format, if the year is entered with two digits then 4D assumes the century to be the 21st if the year belongs to the interval (00;29) and the 20th if it belongs to the interval (30;99). This is the default setting but it can be modified using the [SET DEFAULT CENTURY](https://doc.4d.com/4Dv17R6/4D/17-R6/SET-DEFAULT-CENTURY.301-4311596.en.html) command. -#### JSON Grammar -| Name | Data Type | Possible Values | -| ---------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| dateFormat | string | "systemShort", "systemMedium", "systemLong", "iso8601", "rfc822", "short", "shortCentury", "abbreviated", "long", "blankIfNull" (can be combined with the other possible values) | +#### JSON Grammar +| Nome | Tipo de dados | Possible Values | +| ---------- | ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| dateFormat | string | "systemShort", "systemMedium", "systemLong", "iso8601", "rfc822", "short", "shortCentury", "abbreviated", "long", "blankIfNull" (can be combined with the other possible values) | #### Objects Supported [Combo Box](comboBox_overview.md) - [Drop-down List](dropdownList_Overview.md) - [Input](input_overview.md) - [List Box Column](listbox_overview.md#list-box-columns) - [List Box Footer](listbox_overview.md#list-box-footers) -* * * -## Number Format +--- +## Number Format > Number fields include the Integer, Long integer, Integer 64 bits, Real and Float types. Number formats control the way numbers appear when displayed or printed. For data entry, you enter only the numbers (including a decimal point or minus sign if necessary), regardless of the display format you have chosen. @@ -111,28 +112,29 @@ In each of the number display formats, the number sign (#), zero (0), caret (^), | Placeholder | Effect for leading or trailing zero | | ----------- | ----------------------------------- | | # | Displays nothing | -| 0 | Displays 0 | +| 0 | Mostra 0 | | ^ | Displays a space (1) | | * | Displays an asterisk | - (1) The caret (^) generates a space character that occupies the same width as a digit in most fonts. + For example, if you want to display three-digit numbers, you could use the format ###. If the user enters more digits than the format allows, 4D displays <<< in the field to indicate that more digits were entered than the number of digits specified in the display format. -If the user enters a negative number, the leftmost character is displayed as a minus sign (unless a negative display format has been specified). If ##0 is the format, minus 26 is displayed as –26 and minus 260 is displayed as <<< because the minus sign occupies a placeholder and there are only three placeholders. +If the user enters a negative number, the leftmost character is displayed as a minus sign (unless a negative display format has been specified). If ##0 is the format, minus 26 is displayed as –26 and minus 260 is displayed as <<< because the minus sign occupies a placeholder and there are only three placeholders. > No matter what the display format, 4D accepts and stores the number entered in the field. No information is lost. Each placeholder character has a different effect on the display of leading or trailing zeros. A leading zero is a zero that starts a number before the decimal point; a trailing zero is a zero that ends a number after the decimal point. Suppose you use the format ##0 to display three digits. If the user enters nothing in the field, the field displays 0. If the user enters 26, the field displays 26. + ### Separator characters The numeric display formats (except for scientific notations) are automatically based on regional system parameters. 4D replaces the “.” and “,” characters by, respectively, the decimal separator and the thousand separator defined in the operating system. The period and comma are thus considered as placeholder characters, following the example of 0 or #. +> Em Windows, ao utilizar a tecla do separador decimal do teclado numérico, 4D diferencia entre o tipo de campo onde se encontra o cursor: * em um campo de tipo Real, ao utilizar esta tecla se insere o separador decimal definido no sistema, * em qualquer outro tipo de campo, esta tecla insere o caractere associado à tecla, normalmente um ponto (.) ou uma vírgula (,). -> On Windows, when using the decimal separator key of the numeric keypad, 4D makes a distinction depending on the type of field where the cursor is located: * in a Real type field, using this key will insert the decimal separator defined in the system, * in any other type of field, this key inserts the character associated with the key, usually a period (.) or comma (,). ### Decimal points and other display characters @@ -141,14 +143,12 @@ You can use a decimal point in a number display format. If you want the decimal You can use any other characters in the format. When used alone, or placed before or after placeholders, the characters always appear. For example, if you use the following format: $##0 - a dollar sign always appears because it is placed before the placeholders. If characters are placed between placeholders, they appear only if digits are displayed on both sides. For example, if you define the format: ###.##0 - the point appears only if the user enters at least four digits. @@ -159,23 +159,19 @@ Spaces are treated as characters in number display formats. A number display format can have up to three parts allowing you to specify display formats for positive, negative, and zero values. You specify the three parts by separating them with semicolons as shown below: Positive;Negative;Zero - You do not have to specify all three parts of the format. If you use just one part, 4D uses it for all numbers, placing a minus sign in front of negative numbers. If you use two parts, 4D uses the first part for positive numbers and zero and the second part for negative numbers. If you use three parts, the first is for positive numbers, the second for negative numbers, and the third for zero. - > The third part (zero) is not interpreted and does not accept replacement characters. If you enter `###;###;#`, the zero value will be displayed “#”. In other words, what you actually enter is what will be displayed for the zero value. Here is an example of a number display format that shows dollar signs and commas, places negative values in parentheses, and does not display zeros: $###,##0.00;($###,##0.00); - Notice that the presence of the second semicolon instructs 4D to use nothing to display zero. The following format is similar except that the absence of the second semicolon instructs 4D to use the positive number format for zero: $###,##0.00;($###,##0.00) - In this case, the display for zero would be $0.00. @@ -184,12 +180,11 @@ In this case, the display for zero would be $0.00. If you want to display numbers in scientific notation, use the **ampersand** (&) followed by a number to specify the number of digits you want to display. For example, the format: &3 - would display 759.62 as: 7.60e+2 - + The scientific notation format is the only format that will automatically round the displayed number. Note in the example above that the number is rounded up to 7.60e+2 instead of truncating to 7.59e+2. @@ -197,8 +192,8 @@ The scientific notation format is the only format that will automatically round You can display a number in hexadecimal using the following display formats: -* `&x`: This format displays hexadecimal numbers using the “0xFFFF” format. -* `&$`: This format displays hexadecimal numbers using the “$FFFF” format. +* `&x`: This format displays hexadecimal numbers using the “0xFFFF” format. +* `&$`: This format displays hexadecimal numbers using the “$FFFF” format. ### XML notation @@ -211,61 +206,61 @@ You can display a number as a time (with a time format) by using `&/` followed b For example, the format: &/5 - corresponds to the 5th time format in the pop-up menu, specifically the AM/PM time. A number field with this format would display 25000 as: 6:56 AM - -### Examples +### Exemplos The following table shows how different formats affect the display of numbers. The three columns — Positive, Negative, and Zero — each show how 1,234.50, –1,234.50, and 0 would be displayed. -| Format Entered | Positive | Negative | Zero | -| ---------------------------------- | -------------- | ----------- | ---------------------- | -| ### | <<< | <<< | | -| #### | 1234 | <<<< | | -| ####### | 1234 | -1234 | | -| #####.## | 1234.5 | -1234.5 | | -| ####0.00 | 1234.50 | -1234.50 | 0.00 | -| #####0 | 1234 | -1234 | 0 | -| +#####0;–#####0;0 | +1234 | -1234 | 0 | -| #####0DB;#####0CR;0 | 1234DB | 1234CR | 0 | -| #####0;(#####0) | 1234 | (1234) | 0 | -| ###,##0 | 1,234 | -1,234 | 0 | -| ##,##0.00 | 1,234.50 | -1,234.50 | 0.00 | -| \^\^\^\^\^\^\^ | 1234 | -1234 | | -| \^\^\^\^\^\^0 | 1234 | -1234 | 0 | -| \^\^\^,\^\^0 | 1,234 | -1,234 | 0 | -| \^\^,\^\^0.00 | 1,234.50 | -1,234.50 | 0.00 | -| ******\* | **\*1234 | **-1234 | ******\* | -| **\****0 | **\*1234 | **-1234 | ******0 | -| ***,*\*0 | **1,234 | \*-1,234 | ******0 | -| **,**0.00 | \*1,234.50 | -1,234.50 | ****\*0.00 | -| $*,**0.00;–$*,**0.00 | $1,234.50 | -$1,234.50 | $****0.00 | -| $\^\^\^\^0 | $ 1234 | $–1234 | $ 0 | -| $\^\^\^0;–$\^\^\^0 | $1234 | –$1234 | $ 0 | -| $\^\^\^0 ;($\^\^\^0) | $1234 | ($1234) | $ 0 | -| $\^,\^\^0.00 ;($\^,\^\^0.00) | $1,234.50 | ($1,234.50) | $ 0.00 | -| &2 | 1.2e+3 | -1.2e+3 | 0.0e+0 | -| &5 | 1.23450e+3 | -1.23450e+3 | 0.00000 | -| &xml | 1234.5 | -1234.5 | 0 | - +| Format Entered | Positive | Negative | Zero | +| -------------------------------------- | ---------------- | ------------- | ---------------------------- | +| ### | <<< | <<< | | +| #### | 1234 | <<<< | | +| ####### | 1234 | -1234 | | +| #####.## | 1234.5 | -1234.5 | | +| ####0.00 | 1234.50 | -1234.50 | 0.00 | +| #####0 | 1234 | -1234 | 0 | +| +#####0;–#####0;0 | +1234 | -1234 | 0 | +| #####0DB;#####0CR;0 | 1234DB | 1234CR | 0 | +| #####0;(#####0) | 1234 | (1234) | 0 | +| ###,##0 | 1,234 | -1,234 | 0 | +| ##,##0.00 | 1,234.50 | -1,234.50 | 0.00 | +| \^\^\^\^\^\^\^ | 1234 | -1234 | | +| \^\^\^\^\^\^0 | 1234 | -1234 | 0 | +| \^\^\^,\^\^0 | 1,234 | -1,234 | 0 | +| \^\^,\^\^0.00 | 1,234.50 | -1,234.50 | 0.00 | +| \*\*\*\*\*\*\* | \*\*\*1234 | \*\*-1234 | \*\*\*\*\*\*\* | +| \*\*\**\*\*0 | \*\*\*1234 | \*\*-1234 | \*\*\*\*\*\*0 | +| \*\*\*,*\*0 | \*\*1,234 | \*-1,234 | \*\*\*\*\*\*0 | +| \*\*,\*\*0.00 | \*1,234.50 | -1,234.50 | \*\*\*\*\*0.00 | +| $\*,\*\*0.00;–$\*,\*\*0.00 | $1,234.50 | -$1,234.50 | $\*\*\*\*0.00 | +| $\^\^\^\^0 | $ 1234 | $–1234 | $ 0 | +| $\^\^\^0;–$\^\^\^0 | $1234 | –$1234 | $ 0 | +| $\^\^\^0 ;($\^\^\^0) | $1234 | ($1234) | $ 0 | +| $\^,\^\^0.00 ;($\^,\^\^0.00) | $1,234.50 | ($1,234.50) | $ 0.00 | +| &2 | 1.2e+3 | -1.2e+3 | 0.0e+0 | +| &5 | 1.23450e+3 | -1.23450e+3 | 0.00000 | +| &xml | 1234.5 | -1234.5 | 0 | #### JSON Grammar -| Name | Data Type | Possible Values | -| ------------ | --------- | -------------------------------------------------------------- | -| numberFormat | string | Numbers (including a decimal point or minus sign if necessary) | - +| Nome | Tipo de dados | Possible Values | +| ------------ | ------------- | -------------------------------------------------------------- | +| numberFormat | string | Numbers (including a decimal point or minus sign if necessary) | #### Objects Supported [Combo Box](comboBox_overview.md) - [Drop-down List](dropdownList_Overview.md) - [Input](input_overview.md) - [List Box Column](listbox_overview.md#list-box-columns) - [List Box Footer](listbox_overview.md#list-box-footers) - [Progress Indicators](progressIndicator.md) -* * * + + + + +--- ## Picture Format Picture formats control how pictures appear when displayed or printed. For data entry, the user always enters pictures by pasting them from the Clipboard or by drag and drop, regardless of the display format. @@ -287,7 +282,6 @@ The **Scaled to fit** format causes 4D to resize the picture to fit the dimensio The **Truncated (centered)** format causes 4D to center the picture in the area and crop any portion that does not fit within the area. 4D crops equally from each edge and from the top and bottom. The **Truncated (non-centered)** format causes 4D to place the upper-left corner of the picture in the upper-left corner of the area and crop any portion that does not fit within the area. 4D crops from the right and bottom. - > When the picture format is **Truncated (non-centered)**, it is possible to add scroll bars to the input area. ![](assets/en/FormObjects/property_pictureFormat_Truncated.png) @@ -304,7 +298,8 @@ If you have applied the **Scaled to fit centered (proportional)** format, the pi ![](assets/en/FormObjects/property_pictureFormat_ScaledProportional.png) -### Replicated + +### Replicado `JSON grammar: "tiled"` @@ -316,26 +311,27 @@ If the field is reduced to a size smaller than that of the original picture, the #### JSON Grammar -| Name | Data Type | Possible Values | -| ------------- | --------- | ----------------------------------------------------------------------------------------------------- | -| pictureFormat | string | "truncatedTopLeft", "scaled", "truncatedCenter", "tiled", "proportionalTopLeft", "proportionalCenter" | - +| Nome | Tipo de dados | Possible Values | +| ------------- | ------------- | ----------------------------------------------------------------------------------------------------- | +| pictureFormat | string | "truncatedTopLeft", "scaled", "truncatedCenter", "tiled", "proportionalTopLeft", "proportionalCenter" | #### Objects Supported [Input](input_overview.md) - [List Box Column](listbox_overview.md#list-box-columns) - [List Box Footer](listbox_overview.md#list-box-footers) -* * * + + + +--- ## Time Format Time formats control the way times appear when displayed or printed. For data entry, you enter times in the 24-hour HH:MM:SS format or the 12-hour HH:MM:SS AM/PM format, regardless of the display format you have chosen. - > Unlike [Alpha](#alpha-format) and [Number](#number-format) formats, display formats for times must only be selected among the 4D built-in formats. The table below shows the Time field display formats and gives examples: -| Format name | JSON string | Comments | Example for 04:30:25 | +| Format name | JSON string | Comentários | Example for 04:30:25 | | ---------------------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------- | | HH:MM:SS | hh_mm_ss | | 04:30:25 | | HH:MM | hh_mm | | 04:30 | @@ -346,50 +342,48 @@ The table below shows the Time field display formats and gives examples: | Min Sec | MM_SS | Time expressed as a duration from 00:00:00 | 270 Minutes 25 Seconds | | ISO Date Time | iso8601 | Corresponds to the XML standard for representing time-related data. It is mainly intended to be used when importing/exporting data in XML format | 0000-00-00T04:30:25 | | System time short | - (default) | Standard time format defined in the system | 04:30:25 | -| System time long abbreviated | systemMedium | macOS only: Abbreviated time format defined in the system. -Windows: this format is the same as the System time short format | 4•30•25 AM | -| System time long | systemLong | macOS only: Long time format defined in the system. -Windows: this format is the same as the System time short format | 4:30:25 AM HNEC | - +| System time long abbreviated | systemMedium | macOS only: Abbreviated time format defined in the system.
    Windows: this format is the same as the System time short format | 4•30•25 AM | +| System time long | systemLong | macOS only: Long time format defined in the system.
    Windows: this format is the same as the System time short format | 4:30:25 AM HNEC | #### JSON Grammar -| Name | Data Type | Possible Values | -| ---------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| timeFormat | string | "systemShort", "systemMedium", "systemLong", "iso8601", "hh_mm_ss", "hh_mm", "hh_mm_am", "mm_ss", "HH_MM_SS", "HH_MM", "MM_SS", "blankIfNull" (can be combined with the other possible values) | - +| Nome | Tipo de dados | Possible Values | +| ---------- | ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| timeFormat | string | "systemShort", "systemMedium", "systemLong", "iso8601", "hh_mm_ss", "hh_mm", "hh_mm_am", "mm_ss", "HH_MM_SS", "HH_MM", "MM_SS", "blankIfNull" (can be combined with the other possible values) | #### Objects Supported [Combo Box](comboBox_overview.md) - [Drop-down List](dropdownList_Overview.md) - [Input](input_overview.md) - [List Box Column](listbox_overview.md#list-box-columns) - [List Box Footer](listbox_overview.md#list-box-footers) -* * * + + +--- ## Text when False/Text when True When a [boolean expression](properties_Object.md#expression-type) is displayed as: - - a text in an [input object](input_overview.md) - a ["popup"](properties_Display.md#display-type) in a [list box column](listbox_overview.md#list-box-columns), ... you can select the text to display for each value: - - **Text when True** - the text to be displayed when the value is "true" - **Text when False** - the text to be displayed when the value is "false" #### JSON Grammar -| Name | Data Type | Possible Values | -| ------------- | --------- | ------------------------------------------------------------------------ | -| booleanFormat | string | "\<*textWhenTrue*\>;\<*textWhenFalse*\>", e.g. "Assigned;Unassigned" | +| Nome | Tipo de dados | Possible Values | +| ------------- | ------------- | ------------------------------------------------------------------------ | +| booleanFormat | string | "\<*textWhenTrue*\>;\<*textWhenFalse*\>", e.g. "Assigned;Unassigned" | #### Objects Supported [List Box Column](listbox_overview.md#list-box-columns) - [Input](input_overview.md) -* * * + + +--- ## Display Type Used to associate a display format with the column data. The formats provided depends on the variable type (array type list box) or the data/field type (selection and collection type list boxes). @@ -400,184 +394,227 @@ Boolean columns can also be displayed as pop-up menus. In this case, the [Text w #### JSON Grammar -- **number columns**: "automatic" (default) or "checkbox" - - **boolean columns**: "checkbox" (default) or "popup" - #### Objects Supported - - [List Box Column](listbox_overview.md#list-box-columns) - - * * * - - ## Not rendered - - When this property is enabled, the object is not drawn on the form, however it can still be activated. - - In particular, this property allows implementing "invisible" buttons. Non-rendered buttons can be placed on top of graphic objects. They remain invisible and do not highlight when clicked, however their action is triggered when they are clicked. - - #### JSON Grammar - - | Name | Data Type | Possible Values | - | ------- | --------- | --------------- | - | display | boolean | true, false | - - - #### Objects Supported - - [Button](button_overview.md) - [Drop-down List](dropdownList_Overview.md) - - * * * - - ## Three-States - - Allows a check box object to accept a third state. The variable associated with the check box returns the value 2 when the check box is in the third state. - - #### Three-states check boxes in list box columns - - List box columns with a numeric [data type](properties_Object.md#expression-type) can be displayed as three-states check boxes. If chosen, the following values are displayed: * 0 = unchecked box, * 1 = checked box, * 2 (or any value >0) = semi-checked box (third state). For data entry, this state returns the value 2. * -1 = invisible check box, * -2 = unchecked box, not enterable, * -3 = checked box, not enterable, * -4 = semi-checked box, not enterable - - In this case as well, the [Title](#title) property is also available so that the title of the check box can be entered. - - #### JSON Grammar - - | Name | Data Type | Possible Values | - | ---------- | --------- | --------------- | - | threeState | boolean | true, false | - - - #### Objects Supported - - [Check box](checkbox_overview.md) - [List Box Column](listbox_overview.md#list-box-columns) - - * * * - - ## Title - - This property is available for a list box column if: - - - the [column type](properties_Object.md#expression-type) is **boolean** and its [display type](properties_Display.md#display-type) is "Check Box" - - the [column type](properties_Object.md#expression-type) is **number** (numeric or integer) and its [display type](properties_Display.md#display-type) is "Three-states Checkbox". - - In that cases, the title of the check box can be entered using this property. - - #### JSON Grammar - - | Name | Data Type | Possible Values | - | ------------ | --------- | ---------------------------------- | - | controlTitle | string | Any custom label for the check box | - - - #### Objects Supported - - [List Box Column](listbox_overview.md#list-box-columns) - - * * * - - ## Truncate with ellipsis - - Controls the display of values when list box columns are too narrow to show their full contents. - - This option is available for columns with any type of contents, except pictures and objects. - - * When the property is enabled (default), if the contents of a list box cell exceed the width of the column, they are truncated and an ellipsis is displayed: - - ![](assets/en/FormObjects/property_truncate1.png) - - > The position of the ellipsis depends on the OS. In the above example (Windows), it is added on the right side of the text. On macOS, the ellipsis is added in the middle of the text. - - * When the property is disabled, if the contents of a cell exceed the width of the column, they are simply clipped with no ellipsis added: - - ![](assets/en/FormObjects/property_truncate2.png) - - The Truncate with ellipsis option is enabled by default and can be specified with list boxes of the Array, Selection, or Collection type. - - > When applied to Text type columns, the Truncate with ellipsis option is available only if the [Wordwrap](#wordwrap) option is not selected. When the Wordwrap property is selected, extra contents in cells are handled through the word-wrapping features so the Truncate with ellipsis property is not available. - - The Truncate with ellipsis property can be applied to Boolean type columns; however, the result differs depending on the [cell format](#display-type): - - - For Pop-up type Boolean formats, labels are truncated with an ellipsis, - - For Check box type Boolean formats, labels are always clipped. - #### JSON Grammar - - | Name | Data Type | Possible Values | - | ------------ | --------- | ---------------------- | - | truncateMode | string | "withEllipsis", "none" | - - - #### Objects Supported - - [List Box Column](listbox_overview.md#list-box-columns) - [List Box Header](listbox_overview.md#list-box-footers) - - * * * - - ## Visibility - - This property allows hiding by default the object in the Application environment. - - You can handle the Visible property for most form objects. This property simplifies dynamic interface development. In this context, it is often necessary to hide objects programatically during the `On load` event of the form then to display certain objects afterwards. The Visible property allows inverting this logic by making certain objects invisible by default. The developer can then program their display using the `OBJECT SET VISIBLE` command depending on the context. - - #### JSON Grammar - - | Name | Data Type | Possible Values | - | ---------- | --------- | ------------------- | - | visibility | string | "visible", "hidden" | - - - #### Objects Supported - - [4D View Pro area](viewProArea_overview) - [4D Write Pro area](writeProArea_overview) - [Button](button_overview.md) - [Button Grid](buttonGrid_overview.md) - [Check Box](checkbox_overview.md) - [Combo Box](comboBox_overview.md) - [Drop-down List](dropdownList_Overview.md) - [Group Box](groupBox.md) - [Hierarchical List](list_overview.md) - [List Box](listbox_overview.md) - [List Box Column](listbox_overview.md#list-box-columns) - [List Box Footer](listbox_overview.md#list-box-footers) - [List Box Header](listbox_overview.md#list-box-headers) - [Picture Button](pictureButton_overview.md) - [Picture Pop-up Menu](picturePopupMenu_overview.md) - [Plug-in Area](pluginArea_overview.md) - [Progress indicator](progressIndicator.md) - [Radio Button](radio_overview.md) - [Spinner](spinner.md) - [Splitter](splitters.md) - [Static Picture](staticPicture.md) - [Stepper](stepper.md) - [Subform](subform_overview.md) - [Tab control](tabControl.md) - [Text Area](text.md) - [Web Area](webArea_overview.md) - - * * * - - ## Wordwrap - - > For [input](input_overview.md) objects, available when the [Multiline](properties_Entry.md#multiline) property is set to "yes" . - - Manages the display of contents when it exceeds the width of the object. - - #### Checked for list box/Yes for input - - `JSON grammar: "normal"` - - When this option is selected, text automatically wraps to the next line whenever its width exceeds that of the column/area, if the column/area height permits it. - - - In single-line columns/areas, only the last word that can be displayed entirely is displayed. 4D inserts line returns; it is possible to scroll the contents of the area by pressing the down arrow key. - - - In multiline columns/areas, 4D carries out automatic line returns. - - ![](assets/en/FormObjects/wordwrap2.png) - - #### Unchecked for list box/No for input - - `JSON grammar: "none"` - - When this option is selected, 4D does not do any automatic line returns and the last word that can be displayed may be truncated. In text type areas, carriage returns are supported: - - ![](assets/en/FormObjects/wordwrap3.png) - - In list boxes, any text that is too long is truncated and displayed with an ellipse (...). In the following example, the Wordwrap option is **checked for the left column** and **unchecked for the right column**: - - ![](assets/en/FormObjects/property_wordwrap1.png) - - Note that regardless of the Wordwrap option’s value, the row height is not changed. If the text with line breaks cannot be entirely displayed in the column, it is truncated (without an ellipse). In the case of list boxes displaying just a single row, only the first line of text is displayed: - - ![](assets/en/FormObjects/property_wordwrap2.png) - - #### Automatic for input (default option) - - `JSON grammar: "automatic"` - - - In single-line areas, words located at the end of lines are truncated and there are no line returns. - - In multiline areas, 4D carries out automatic line returns. - - ![](assets/en/FormObjects/wordwrap1.png) - - #### JSON Grammar - - | Name | Data Type | Possible Values | - | -------- | --------- | -------------------------------------------------- | - | wordwrap | string | "automatic" (excluding list box), "normal", "none" | - - - #### Objects Supported - - [Input](input_overview.md) - [List Box Column](listbox_overview.md#list-box-columns) - [List Box Footer](listbox_overview.md#list-box-footers) \ No newline at end of file +| Nome | Tipo de dados | Possible Values | +| ----------- | ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| controlType | string |

  • **number columns**: "automatic" (default) or "checkbox"
  • **boolean columns**: "checkbox" (default) or "popup" | + +#### Objects Supported + +[List Box Column](listbox_overview.md#list-box-columns) + + + + + +--- +## Not rendered + +When this property is enabled, the object is not drawn on the form, however it can still be activated. + +In particular, this property allows implementing "invisible" buttons. Non-rendered buttons can be placed on top of graphic objects. They remain invisible and do not highlight when clicked, however their action is triggered when they are clicked. + + +#### JSON Grammar + +| Nome | Tipo de dados | Possible Values | +| ------- | ------------- | --------------- | +| display | booleano | true, false | + +#### Objects Supported + +[Button](button_overview.md) - [Drop-down List](dropdownList_Overview.md) + + + + + + + +--- +## Three-States + + + +Allows a check box object to accept a third state. A variável associada à caixa de seleção devolve o valor 2 quando a caixa estiver no terceiro estado. + + +#### Three-states check boxes in list box columns + +List box columns with a numeric [data type](properties_Object.md#expression-type) can be displayed as three-states check boxes. If chosen, the following values are displayed: +* 0 = unchecked box, +* 1 = checked box, +* 2 (or any value >0) = semi-checked box (third state). For data entry, this state returns the value 2. +* -1 = invisible check box, +* -2 = unchecked box, not enterable, +* -3 = checked box, not enterable, +* -4 = semi-checked box, not enterable + +In this case as well, the [Title](#title) property is also available so that the title of the check box can be entered. + +#### JSON Grammar + +| Nome | Tipo de dados | Possible Values | +| ---------- | ------------- | --------------- | +| threeState | booleano | true, false | + +#### Objects Supported + +[Check box](checkbox_overview.md) - [List Box Column](listbox_overview.md#list-box-columns) + + + + +--- +## Título + +This property is available for a list box column if: +- the [column type](properties_Object.md#expression-type) is **boolean** and its [display type](properties_Display.md#display-type) is "Check Box" +- the [column type](properties_Object.md#expression-type) is **number** (numeric or integer) and its [display type](properties_Display.md#display-type) is "Three-states Checkbox". + +In that cases, the title of the check box can be entered using this property. + +#### JSON Grammar + +| Nome | Tipo de dados | Possible Values | +| ------------ | ------------- | ---------------------------------- | +| controlTitle | string | Any custom label for the check box | + +#### Objects Supported + +[List Box Column](listbox_overview.md#list-box-columns) + + + + +--- + +## Truncate with ellipsis + +Controls the display of values when list box columns are too narrow to show their full contents. + +This option is available for columns with any type of contents, except pictures and objects. + +* When the property is enabled (default), if the contents of a list box cell exceed the width of the column, they are truncated and an ellipsis is displayed: + + ![](assets/en/FormObjects/property_truncate1.png) +> The position of the ellipsis depends on the OS. In the above example (Windows), it is added on the right side of the text. On macOS, the ellipsis is added in the middle of the text. + +* When the property is disabled, if the contents of a cell exceed the width of the column, they are simply clipped with no ellipsis added: + + ![](assets/en/FormObjects/property_truncate2.png) + +The Truncate with ellipsis option is enabled by default and can be specified with list boxes of the Array, Selection, or Collection type. + + +> When applied to Text type columns, the Truncate with ellipsis option is available only if the [Wordwrap](#wordwrap) option is not selected. When the Wordwrap property is selected, extra contents in cells are handled through the word-wrapping features so the Truncate with ellipsis property is not available. + +The Truncate with ellipsis property can be applied to Boolean type columns; however, the result differs depending on the [cell format](#display-type): +- For Pop-up type Boolean formats, labels are truncated with an ellipsis, +- For Check box type Boolean formats, labels are always clipped. + +#### JSON Grammar + +| Nome | Tipo de dados | Possible Values | +| ------------ | ------------- | ---------------------- | +| truncateMode | string | "withEllipsis", "none" | + + + +#### Objects Supported + +[List Box Column](listbox_overview.md#list-box-columns) - [List Box Header](listbox_overview.md#list-box-footers) + + + + + +--- +## Visibilidade + +This property allows hiding the object in the Application environment. + +You can handle the Visibility property for most form objects. This property is mainly used to simplify dynamic interface development. In this context, it is often necessary to hide objects programatically during the `On load` event of the form then to display certain objects afterwards. In this context, it is often necessary to hide objects programatically during the `On load` event of the form then to display certain objects afterwards. The developer can then program their display using the [`OBJECT SET VISIBLE`](https://doc.4d.com/4dv18/help/command/en/page603.html) command when needed. + +#### Automatic visibility in list forms + +In the context of ["list" forms](FormEditor/properties_FormProperties.md#form-type), the Visibility property supports two specific values: + +- **If record selected** (JSON name: "selectedRows") +- **If record not selected** (JSON name: "unselectedRows") + +This property is only used when drawing objects located in the body of a list form. It tells 4D whether or not to draw the object depending on whether the record being processed is selected/not selected. It allows you to represent a selection of records using visual attributes other than highlight colors: + +![](assets/en/FormObjects/select-row.png) + +4D does not take this property into account if the object was hidden using the [`OBJECT SET VISIBLE`](https://doc.4d.com/4dv18/help/command/en/page603.html) command; in this case, the object remains invisible regardless of whether or not the record is selected. + + +#### JSON Grammar + +| Nome | Tipo de dados | Possible Values | +| ---------- | ------------- | --------------------------------------------------------------------------------------- | +| visibility | string | "visible", "hidden", "selectedRows" (list form only), "unselectedRows" (list form only) | + +#### Objects Supported + +[4D View Pro area](viewProArea_overview.md) - [4D Write Pro area](writeProArea_overview.md) - [Button](button_overview.md) - [Button Grid](buttonGrid_overview.md) - [Check Box](checkbox_overview.md) - [Combo Box](comboBox_overview.md) - [Drop-down List](dropdownList_Overview.md) - [Group Box](groupBox.md) - [Hierarchical List](list_overview.md) - [List Box](listbox_overview.md) - [List Box Column](listbox_overview.md#list-box-columns) - [List Box Footer](listbox_overview.md#list-box-footers) - [List Box Header](listbox_overview.md#list-box-headers) - [Picture Button](pictureButton_overview.md) - [Picture Pop-up Menu](picturePopupMenu_overview.md) - [Plug-in Area](pluginArea_overview.md) - [Progress indicator](progressIndicator.md) - [Radio Button](radio_overview.md) - [Spinner](spinner.md) - [Splitter](splitters.md) - [Static Picture](staticPicture.md) - [Stepper](stepper.md) - [Subform](subform_overview.md) - [Tab control](tabControl.md) - [Text Area](text.md) - [Web Area](webArea_overview.md) + + + + + + +--- +## Wordwrap + +> For [input](input_overview.md) objects, available when the [Multiline](properties_Entry.md#multiline) property is set to "yes" . + +Manages the display of contents when it exceeds the width of the object. + +#### Checked for list box/Yes for input +`JSON grammar: "normal"` + +When this option is selected, text automatically wraps to the next line whenever its width exceeds that of the column/area, if the column/area height permits it. + +- In single-line columns/areas, only the last word that can be displayed entirely is displayed. 4D inserts line returns; it is possible to scroll the contents of the area by pressing the down arrow key. + +- In multiline columns/areas, 4D carries out automatic line returns. + +![](assets/en/FormObjects/wordwrap2.png) + + + +#### Unchecked for list box/No for input +`JSON grammar: "none"` + +When this option is selected, 4D does not do any automatic line returns and the last word that can be displayed may be truncated. In text type areas, carriage returns are supported: + +![](assets/en/FormObjects/wordwrap3.png) + +In list boxes, any text that is too long is truncated and displayed with an ellipse (...). In the following example, the Wordwrap option is **checked for the left column** and **unchecked for the right column**: + +![](assets/en/FormObjects/property_wordwrap1.png) + +Note that regardless of the Wordwrap option’s value, the row height is not changed. If the text with line breaks cannot be entirely displayed in the column, it is truncated (without an ellipse). In the case of list boxes displaying just a single row, only the first line of text is displayed: + +![](assets/en/FormObjects/property_wordwrap2.png) + + +#### Automatic for input (default option) +`JSON grammar: "automatic"` + +- In single-line areas, words located at the end of lines are truncated and there are no line returns. +- In multiline areas, 4D carries out automatic line returns. + +![](assets/en/FormObjects/wordwrap1.png) + + +#### JSON Grammar + +| Nome | Tipo de dados | Possible Values | +| -------- | ------------- | -------------------------------------------------- | +| wordwrap | string | "automatic" (excluding list box), "normal", "none" | + +#### Objects Supported + +[Input](input_overview.md) - [List Box Column](listbox_overview.md#list-box-columns) - [List Box Footer](listbox_overview.md#list-box-footers) diff --git a/website/translated_docs/pt/FormObjects/properties_Entry.md b/website/translated_docs/pt/FormObjects/properties_Entry.md index a517b534a3389b..e2eb711b43bf13 100644 --- a/website/translated_docs/pt/FormObjects/properties_Entry.md +++ b/website/translated_docs/pt/FormObjects/properties_Entry.md @@ -1,29 +1,29 @@ --- id: propertiesEntry -title: Entry +title: Entrada --- -* * * - +--- ## Auto Spellcheck 4D includes an integrated and customizable spell-check utility. Text type [inputs](input_overview.md) can be checked, as well as [4D Write Pro](writeProArea_overview.md) documents. The Auto Spellcheck property activates the spell-check for each object. When used, a spell-check is automatically performed during data entry. You can also execute the `SPELL CHECKING` 4D language command for each object to be checked. + #### JSON Grammar -| Name | Data Type | Possible Values | -| ---------- | --------- | --------------- | -| spellcheck | boolean | true, false | +| Nome | Tipo de dados | Possible Values | +| ---------- | ------------- | --------------- | +| spellcheck | booleano | true, false | #### Objects Supported [4D Write Pro area](writeProArea_overview.md) - [Input](input_overview.md) -* * * +--- ## Context Menu Allows the user access to a standard context menu in the object when the form is executed. @@ -31,26 +31,29 @@ Allows the user access to a standard context menu in the object when the form is For a picture type [input](input_overview.md), in addition to standard editing commands (Cut, Copy, Paste and Clear), the menu contains the **Import...** command, which can be used to import a picture stored in a file, as well as the **Save as...** command, which can be used to save the picture to disk. The menu can also be used to modify the display format of the picture: the **Truncated non-centered**, **Scaled to fit** and **Scaled to fit centered prop.** options are provided. The modification of the [display format](properties_Display#picture-format) using this menu is temporary; it is not saved with the record. For a [multi-style](properties_Text.md#multi-style) text type [input](input_overview.md), in addition to standard editing commands, the context menu provides the following commands: - - **Fonts...**: displays the font system dialog box - **Recent fonts**: displays the names of recent fonts selected during the session. The list can store up to 10 fonts (beyond that, the last font used replaces the oldest). By default, this list is empty and the option is not displayed. You can manage this list using the `SET RECENT FONTS` and `FONT LIST` commands. - commands for supported style modifications: font, size, style, color and background color. When the user modifies a style attribute via this pop-up menu, 4D generates the `On After Edit` form event. For a [Web Area](webArea_overview.md), the contents of the menu depend of the rendering engine of the platform. It is possible to control access to the context menu via the [`WA SET PREFERENCE`](https://doc.4d.com/4Dv17R6/4D/17-R6/WA-SET-PREFERENCE.301-4310780.en.html) command. -#### JSON Grammar -| Name | Data Type | Possible Values | -| ----------- | --------- | ------------------------------------- | -| contextMenu | string | "automatic" (used if missing), "none" | +#### JSON Grammar +| Nome | Tipo de dados | Possible Values | +| ----------- | ------------- | ------------------------------------- | +| contextMenu | string | "automatic" (used if missing), "none" | #### Objects Supported [Input](input_overview.md) - [Web Area](webArea_overview.md) - [4D Write Pro areas](writeProArea_overview.md) -* * * + + + + +--- ## Enterable The Enterable attribute indicates whether users can enter values into the object. @@ -59,19 +62,19 @@ Objects are enterable by default. If you want to make a field or an object non-e When this property is disabled, any pop-up menus associated with a list box column via a list are disabled. -#### JSON Grammar -| Name | Data Type | Possible Values | -| --------- | --------- | --------------- | -| enterable | boolean | true, false | +#### JSON Grammar +| Nome | Tipo de dados | Possible Values | +| --------- | ------------- | --------------- | +| enterable | booleano | true, false | #### Objects Supported [4D Write Pro areas](writeProArea_overview.md) - [Hierarchical List](list_overview.md) - [Input](input_overview.md) - [List Box Column](listbox_overview.md#list-box-columns) - [Progress Bar](progressIndicator.md) - [Ruler](ruler.md) - [Stepper](stepper.md) -* * * +--- ## Entry Filter An entry filter controls exactly what the user can type during data entry. Unlike [required lists](properties_RangeOfValues.md#required-list) for example, entry filters operate on a character-by-character basis. For example, if a part number always consists of two letters followed by three digits, you can use an entry filter to restrict the user to that pattern. You can even control the particular letters and numbers. @@ -91,11 +94,12 @@ Most of the time, you can use one of the [built-in filters](#default-entry-filte For information about creating entry filters, see [Filter and format codes](https://doc.4d.com/4Dv18/4D/18/Filter-and-format-codes.300-4575706.en.html). + ### Default entry filters Here is a table that explains each of the entry filter choices in the Entry Filter drop-down list: -| Entry Filter | Description | +| Entry Filter | Descrição | | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | | ~A | Allow any letters, but convert to uppercase. | | &9 | Allow only numbers. | @@ -104,211 +108,227 @@ Here is a table that explains each of the entry filter choices in the Entry Filt | &@ | Allow only alphanumeric characters. No special characters. | | ~a## | State name abbreviation (e.g., CA). Allow any two letters, but convert to uppercase. | | !0&9##/##/## | Standard date entry format. Display zeros in entry spaces. Allow any numbers. | -| !0&9 Day: ## Month: ## Year: ## | Custom date entry format. Display zeros in entry spaces. Allow any numbers. Two entries after each word. | +| !0&9 Day: ## Month: ## Year: ## | Time entry format. Display zeros in entry spaces. Allow any numbers. Limited to hours and minutes. | | !0&9##:## | Time entry format. Limited to hours and minutes. Display zeros in entry spaces. Allow any four numbers, separated by a colon. | | !0&9## Hrs ## Mins ## Secs | Time entry format. Display zeros in entry spaces. Allow any two numbers before each word. | | !0&9Hrs: ## Mins: ## Secs: ## | Time entry format. Display zeros in entry spaces. Allow any two numbers after each word. | | !0&9##-##-##-## | Local telephone number format. Display zeros in entry spaces. Allow any number. Three entries, hyphen, four entries. | | !_&9(###)!0###-#### | Long distance telephone number. Display underscores in first three entry spaces, zeros in remainder. | | !0&9###-###-### | Long distance telephone number. Display zeros in entry spaces. Allow any number. Three entries, hyphen, three entries, hyphen, four entries. | -| !0&9###-##-### | Social Security number. Display zeros in entry spaces. Allow any numbers. | +| !0&9###-##-#### | Social Security number. Display zeros in entry spaces. Allow any numbers. | | ~"A-Z;0-9; ;,;.;-" | Uppercase letters and punctuation. Allow only capital letters, numbers, spaces, commas, periods, and hyphens. | | &"a-z;0-9; ;,;.;-" | Upper and lowercase letters and punctuation. Allow lowercase letters, numbers, spaces, commas, periods, and hyphens. | -| &"0-9;.;-" | Numbers. Allow only numbers, decimal points, and hyphens (minus sign). | +| &"0-9;.;-" | Números. Allow only numbers, decimal points, and hyphens (minus sign). | + + +#### JSON Grammar + +| Nome | Tipo de dados | Possible Values | +| ----------- | ------------- | ---------------------------------------------------------------------------------------------------------------------------- | +| entryFilter | string |
  • Entry filter code or
  • Entry filter name (filter names start with | ) | + + +#### Objects Supported + +[Combo Box](comboBox_overview.md) - [Hierarchical List](list_overview.md) - [Input](input_overview.md) - [List Box Column](listbox_overview.md#list-box-columns) + + + + + + + +--- +## Focável + +When the **Focusable** property is enabled for an object, the object can have the focus (and can thus be activated by the keyboard for instance). It is outlined by a gray dotted line when it is selected — except when the [Hide focus rectangle](properties_Appearance.md#hide-focus-rectangle) option has also been selected. + +> An [input object](input_overview.md) is always focusable if it has the [Enterable](#enterable) property. + +* ![](assets/en/FormObjects/property_focusable1.png)
    Check box shows focus when selected

    +* ![](assets/en/FormObjects/property_focusable2.png)
    Check box is selected but cannot show focus| + + +When the **Focusable** property is selected for a non-enterable object, the user can select, copy or even drag-and-drop the contents of the area. + + +#### JSON Grammar + +| Nome | Tipo de dados | Possible Values | +| --------- | ------------- | --------------- | +| focusable | booleano | true, false | + + +#### Objects Supported + +[4D Write Pro areas](writeProArea_overview.md) - [Button](button_overview.md) - [Check Box](checkbox_overview.md) - [Drop-down List](dropdownList_Overview.md) - [Hierarchical List](list_overview.md) - [Input](input_overview.md) - [List Box](listbox_overview.md) - [Plug-in Area](pluginArea_overview.md) - [Radio Button](radio_overview.md) - [Subform](subform_overview.md) + + + + +--- +## Keyboard Layout + +This property associates a specific keyboard layout to an [input object](input_overview.md). For example, in an international application, if a form contains a field whose contents must be entered in Greek characters, you can associate the "Greek" keyboard layout with this field. This way, during data entry, the keyboard configuration is automatically changed when this field has the focus. + +By default, the object uses the current keyboard layout. + +> You can also set and get the keyboard dynamically using the `OBJECT SET KEYBOARD LAYOUT` and `OBJECT Get keyboard layout` commands. #### JSON Grammar -- Entry filter code or - - Entry filter name (filter names start with | ) - #### Objects Supported - - [Combo Box](comboBox_overview.md) - [Hierarchical List](list_overview.md) - [Input](input_overview.md) - [List Box Column](listbox_overview.md#list-box-columns) - - * * * - - ## Focusable - - When the **Focusable** property is enabled for an object, the object can have the focus (and can thus be activated by the keyboard for instance). It is outlined by a gray dotted line when it is selected — except when the [Hide focus rectangle](properties_Appearance.md#hide-focus-rectangle) option has also been selected. - - > An [input object](input_overview.md) is always focusable if it has the [Enterable](#enterable) property. - - * ![](assets/en/FormObjects/property_focusable1.png) - Check box shows focus when selected - - < - - p> - - < - - p> - - * ![](assets/en/FormObjects/property_focusable2.png) - Check box is selected but cannot show focus| - - When the **Focusable** property is selected for a non-enterable object, the user can select, copy or even drag-and-drop the contents of the area. - - #### JSON Grammar - - | Name | Data Type | Possible Values | - | --------- | --------- | --------------- | - | focusable | boolean | true, false | - - - #### Objects Supported - - [4D Write Pro areas](writeProArea_overview.md) - [Button](button_overview.md) - [Check Box](checkbox_overview.md) - [Drop-down List](dropdownList_Overview.md) - [Hierarchical List](list_overview.md) - [Input](input_overview.md) - [List Box](listbox_overview.md) - [Plug-in Area](pluginArea_overview.md) - [Radio Button](radio_overview.md) - [Subform](subform_overview.md) - - * * * - - ## Keyboard Layout - - This property associates a specific keyboard layout to an [input object](input_overview.md). For example, in an international application, if a form contains a field whose contents must be entered in Greek characters, you can associate the "Greek" keyboard layout with this field. This way, during data entry, the keyboard configuration is automatically changed when this field has the focus. - - By default, the object uses the current keyboard layout. - - > You can also set and get the keyboard dynamically using the `OBJECT SET KEYBOARD LAYOUT` and `OBJECT Get keyboard layout` commands. - - #### JSON Grammar - - | Name | Data Type | Possible Values | - | --------------- | --------- | --------------------------------------------------------------------------- | - | keyboardDialect | text | Language code, for example "ar-ma" or "cs". See RFC3066, ISO639 and ISO3166 | - - - #### Objects Supported - - [4D Write Pro areas](writeProArea_overview.md) - [Input](input_overview.md) - - * * * - - ## Multiline - - This property is available for [inputs objects](input_overview.md) containing expressions of the Text type and fields of the Alpha and Text type. It can have three different values: Yes, No, Automatic (default). - - #### Automatic - - - In single-line inputs, words located at the end of lines are truncated and there are no line returns. - - In multiline inputs, 4D carries out automatic line returns: - ![](assets/en/FormObjects/multilineAuto.png) - #### No - - - In single-line inputs, words located at the end of lines are truncated and there are no line returns. - - There are never line returns: the text is always displayed on a single row. If the Alpha or Text field or variable contains carriage returns, the text located after the first carriage return is removed as soon as the area is modified: - ![](assets/en/FormObjects/multilineNo.png) - #### Yes - - When this value is selected, the property is managed by the [Wordwrap](properties_Display.md#wordwrap) option. - - #### JSON Grammar - - | Name | Data Type | Possible Values | - | --------- | --------- | ------------------------------------------------- | - | multiline | text | "yes", "no", "automatic" (default if not defined) | - - - #### Objects Supported - - [Input](input_overview.md) - - * * * - - ## Placeholder - - 4D can display placeholder text in the fields of your forms. - - Placeholder text appears as watermark text in a field, supplying a help tip, indication or example for the data to be entered. This text disappears as soon as the user enters a character in the area: - - ![](assets/en/FormObjects/property_placeholder.png) - - The placeholder text is displayed again if the contents of the field is erased. - - A placeholder can be displayed for the following types of data: - - - string (text or alpha) - - date and time when the **Blank if null** property is enabled. - - You can use an XLIFF reference in the ":xliff:resname" form as a placeholder, for example: - - :xliff:PH_Lastname - - - You only pass the reference in the "Placeholder" field; it is not possible to combine a reference with static text. - - > You can also set and get the placeholder text by programming using the [OBJECT SET PLACEHOLDER](https://doc.4d.com/4Dv17R5/4D/17-R5/OBJECT-SET-PLACEHOLDER.301-4128243.en.html) and [OBJECT Get placeholder](https://doc.4d.com/4Dv17R5/4D/17-R5/OBJECT-Get-placeholder.301-4128249.en.html) commands. - - #### JSON Grammar - - | Name | Data Type | Possible Values | - | ----------- | --------- | ---------------------------------------------------------------------------- | - | placeholder | string | Text to be displayed (grayed out) when the object does not contain any value | - - - #### Objects Supported - - [Combo Box](comboBox_overview.md) - [Input](input_overview.md) - - #### See also - - [Help tip](properties_Help.md) - - * * * - - ## Selection always visible - - This property keeps the selection visible within the object after it has lost the focus. This makes it easier to implement interfaces that allow the text style to be modified (see [Multi-style](properties_Text.md#multi-style)). - - #### JSON Grammar - - | Name | Data Type | Possible Values | - | ------------- | --------- | --------------- | - | showSelection | boolean | true, false | - - - #### Objects Supported - - [4D Write Pro areas](writeProArea_overview.md) - [Input](input_overview.md) - - * * * - - ## Shortcut - - This property allows setting special meaning keys (keyboard shortcuts) for [buttons](button_overview.md), [radio buttons](radio_overview.md), and [checkboxes](checkbox_overview.md). They allow the user to use the control using the keyboard instead of having to use the mouse. - - You can configure this option by clicking the [...] button in the Shortcuts property in the Property List. - - ![](assets/en/FormObjects/property_shortcut.png) - - > You can also assign a shortcut to a custom menu command. If there is a conflict between two shortcuts, the active object has priority. For more information about associating shortcuts with menus, refer to [Setting menu properties](https://doc.4d.com/4Dv17R5/4D/17-R5/Setting-menu-properties.300-4163525.en.html). - - To view a list of all the shortcuts used in the 4D Design environment, see the [Shortcuts Page](https://doc.4d.com/4Dv17R5/4D/17-R5/Shortcuts-Page.300-4163701.en.html) in the Preferences dialog box. - - #### JSON Grammar - - - any character key: "a", "b"... - - [F1]" -> "[F15]", "[Return]", "[Enter]", "[Backspace]", "[Tab]", "[Esc]", "[Del]", "[Home]", "[End]", "[Help]", "[Page up]", "[Page down]", "[left arrow]", "[right arrow]", "[up arrow]", "[down arrow]" - #### Objects Supported - - [Button](button_overview.md) - [Check Box](checkbox_overview.md) - [Picture Button](pictureButton_overview.md) - [Radio Button](radio_overview.md) - - * * * - - ## Single-Click Edit - - Enables direct passage to edit mode in list boxes. - - When this option is enabled, list box cells switch to edit mode after a single user click, regardless of whether or not this area of the list box was selected beforehand. Note that this option allows cells to be edited even when the list box [selection mode](properties_ListBox.md#selection-mode) is set to "None". - - When this option is not enabled, users must first select the cell row and then click on a cell in order to edit its contents. - - #### JSON Grammar - - | Name | Data Type | Possible Values | - | --------------- | --------- | --------------- | - | singleClickEdit | boolean | true, false | - - - #### Objects Supported - - [List Box](listbox_overview.md) \ No newline at end of file +| Nome | Tipo de dados | Possible Values | +| --------------- | ------------- | --------------------------------------------------------------------------- | +| keyboardDialect | texto | Language code, for example "ar-ma" or "cs". See RFC3066, ISO639 and ISO3166 | + + +#### Objects Supported + +[4D Write Pro areas](writeProArea_overview.md) - [Input](input_overview.md) + + + +--- +## Multiline + +This property is available for [inputs objects](input_overview.md) containing expressions of the Text type and fields of the Alpha and Text type. It can have three different values: Yes, No, Automatic (default). + +#### Automático +- In single-line inputs, words located at the end of lines are truncated and there are no line returns. +- In multiline inputs, 4D carries out automatic line returns: + ![](assets/en/FormObjects/multilineAuto.png) + +#### No +- In single-line inputs, words located at the end of lines are truncated and there are no line returns. +- There are never line returns: the text is always displayed on a single row. If the Alpha or Text field or variable contains carriage returns, the text located after the first carriage return is removed as soon as the area is modified: + ![](assets/en/FormObjects/multilineNo.png) + +#### Sim +When this value is selected, the property is managed by the [Wordwrap](properties_Display.md#wordwrap) option. + + +#### JSON Grammar + +| Nome | Tipo de dados | Possible Values | +| --------- | ------------- | ------------------------------------------------- | +| multiline | texto | "yes", "no", "automatic" (default if not defined) | + + +#### Objects Supported + +[Entrada](input_overview.md) + + + +--- +## Placeholder + +4D can display placeholder text in the fields of your forms. + +Placeholder text appears as watermark text in a field, supplying a help tip, indication or example for the data to be entered. This text disappears as soon as the user enters a character in the area: + +![](assets/en/FormObjects/property_placeholder.png) + +The placeholder text is displayed again if the contents of the field is erased. + +A placeholder can be displayed for the following types of data: + +- string (text or alpha) +- date and time when the **Blank if null** property is enabled. + +You can use an XLIFF reference in the ":xliff:resname" form as a placeholder, for example: + + :xliff:PH_Lastname + +You only pass the reference in the "Placeholder" field; it is not possible to combine a reference with static text. +> You can also set and get the placeholder text by programming using the [OBJECT SET PLACEHOLDER](https://doc.4d.com/4Dv17R5/4D/17-R5/OBJECT-SET-PLACEHOLDER.301-4128243.en.html) and [OBJECT Get placeholder](https://doc.4d.com/4Dv17R5/4D/17-R5/OBJECT-Get-placeholder.301-4128249.en.html) commands. + +#### JSON Grammar + +| Nome | Tipo de dados | Possible Values | +| ----------- | ------------- | ---------------------------------------------------------------------------- | +| placeholder | string | Text to be displayed (grayed out) when the object does not contain any value | + +#### Objects Supported + +[Combo Box](comboBox_overview.md) - [Input](input_overview.md) + + +#### Veja também + +[Dica de ajuda](properties_Help.md) + + + +--- +## Selection always visible + +This property keeps the selection visible within the object after it has lost the focus. This makes it easier to implement interfaces that allow the text style to be modified (see [Multi-style](properties_Text.md#multi-style)). + + +#### JSON Grammar + +| Nome | Tipo de dados | Possible Values | +| ------------- | ------------- | --------------- | +| showSelection | booleano | true, false | + + +#### Objects Supported + +[4D Write Pro areas](writeProArea_overview.md) - [Input](input_overview.md) + + + +--- +## Atalho + +This property allows setting special meaning keys (keyboard shortcuts) for [buttons](button_overview.md), [radio buttons](radio_overview.md), and [checkboxes](checkbox_overview.md). They allow the user to use the control using the keyboard instead of having to use the mouse. + +You can configure this option by clicking the [...] button in the Shortcuts property in the Property List. + + +![](assets/en/FormObjects/property_shortcut.png) +> You can also assign a shortcut to a custom menu command. If there is a conflict between two shortcuts, the active object has priority. For more information about associating shortcuts with menus, refer to [Setting menu properties](https://doc.4d.com/4Dv17R5/4D/17-R5/Setting-menu-properties.300-4163525.en.html). + +To view a list of all the shortcuts used in the 4D Design environment, see the [Shortcuts Page](https://doc.4d.com/4Dv17R5/4D/17-R5/Shortcuts-Page.300-4163701.en.html) in the Preferences dialog box. + +#### JSON Grammar + +| Nome | Tipo de dados | Possible Values | +| --------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| shortcutAccel | booleano | true, false (Ctrl Windows/Command macOS) | +| shortcutAlt | booleano | true, false | +| shortcutCommand | booleano | true, false | +| shortcutControl | booleano | true, false (macOS Control) | +| shortcutShift | booleano | true, false | +| | | | +| shortcutKey | string |

  • any character key: "a", "b"...
  • [F1]" -> "[F15]", "[Return]", "[Enter]", "[Backspace]", "[Tab]", "[Esc]", "[Del]", "[Home]", "[End]", "[Help]", "[Page up]", "[Page down]", "[left arrow]", "[right arrow]", "[up arrow]", "[down arrow]" | + + +#### Objects Supported + +[Botão](button_overview.md) - [Caixa de seleção](checkbox_overview.md) - [Botão imagem,](pictureButton_overview.md) - [Botão radio](radio_overview.md) + + + + + +--- +## Editar com um clique + +Enables direct passage to edit mode in list boxes. + +When this option is enabled, list box cells switch to edit mode after a single user click, regardless of whether or not this area of the list box was selected beforehand. Note that this option allows cells to be edited even when the list box [selection mode](properties_ListBox.md#selection-mode) is set to "None". + +When this option is not enabled, users must first select the cell row and then click on a cell in order to edit its contents. + +#### JSON Grammar + +| Nome | Tipo de dados | Possible Values | +| --------------- | ------------- | --------------- | +| singleClickEdit | booleano | true, false | + +#### Objects Supported + +[List Box](listbox_overview.md) diff --git a/website/translated_docs/pt/FormObjects/properties_Footers.md b/website/translated_docs/pt/FormObjects/properties_Footers.md index 8dd2eab657422e..02f76c57306b83 100644 --- a/website/translated_docs/pt/FormObjects/properties_Footers.md +++ b/website/translated_docs/pt/FormObjects/properties_Footers.md @@ -3,39 +3,37 @@ id: propertiesFooters title: Footers --- -* * * - -## Display Footers +--- +## Exibir rodapés This property is used to display or hide [list box column footers](listbox_overview.md#list-box-footers). There is one footer per column; each footer is configured separately. #### JSON Grammar -| Name | Data Type | Possible Values | -| ----------- | --------- | --------------- | -| showFooters | boolean | true, false | - +| Nome | Tipo de dados | Possible Values | +| ----------- | ------------- | --------------- | +| showFooters | booleano | true, false | #### Objects Supported [List Box](listbox_overview.md) -* * * -## Height + + +--- +## Alto This property is used to set the row height for a list box footer in **pixels** or **text lines** (when displayed). Both types of units can be used in the same list box: -* *Pixel* - the height value is applied directly to the row concerned, regardless of the font size contained in the columns. If a font is too big, the text is truncated. Moreover, pictures are truncated or resized according to their format. +* *Pixel* - the height value is applied directly to the row concerned, regardless of the font size contained in the columns. If a font is too big, the text is truncated. Moreover, pictures are truncated or resized according to their format. -* *Line* - the height is calculated while taking into account the font size of the row concerned. - - - * If more than one size is set, 4D uses the biggest one. For example, if a row contains "Verdana 18", "Geneva 12" and "Arial 9", 4D uses "Verdana 18" to determine the row height (for instance, 25 pixels). This height is then multiplied by the number of rows defined. - * This calculation does not take into account the size of pictures nor any styles applied to the fonts. - * In macOS, the row height may be incorrect if the user enters characters that are not available in the selected font. When this occurs, a substitute font is used, which may cause variations in size. +* *Line* - the height is calculated while taking into account the font size of the row concerned. + * If more than one size is set, 4D uses the biggest one. For example, if a row contains "Verdana 18", "Geneva 12" and "Arial 9", 4D uses "Verdana 18" to determine the row height (for instance, 25 pixels). This height is then multiplied by the number of rows defined. + * This calculation does not take into account the size of pictures nor any styles applied to the fonts. + * In macOS, the row height may be incorrect if the user enters characters that are not available in the selected font. When this occurs, a substitute font is used, which may cause variations in size. +> > > This property can also be set dynamically using the [LISTBOX SET FOOTERS HEIGHT](https://doc.4d.com/4Dv17R6/4D/17-R6/List-box-footer-specific-properties.300-4354808.en.html) command. -> This property can also be set dynamically using the [LISTBOX SET FOOTERS HEIGHT](https://doc.4d.com/4Dv17R6/4D/17-R6/List-box-footer-specific-properties.300-4354808.en.html) command. Conversion of units: When you switch from one unit to the other, 4D converts them automatically and displays the result in the Property List. For example, if the font used is "Lucida grande 24", a height of "1 line" is converted to "30 pixels" and a height of "60 pixels" is converted to "2 lines". @@ -43,27 +41,30 @@ Note that converting back and forth may lead to an end result that is different *(font Arial 18)*: 52 pixels -> 2 lines -> 40 pixels *(font Arial 12)*: 3 pixels -> 0.4 line rounded up to 1 line -> 19 pixels + #### JSON Example: - "List Box": { - "type": "listbox", - "showFooters": true, - "footerHeight": "44px", - ... - } - +``` + "List Box": { + "type": "listbox", + "showFooters": true, + "footerHeight": "44px", + ... + } +``` -#### JSON Grammar -| Name | Data Type | Possible Values | -| ------------ | --------- | ----------------------------- | -| footerHeight | string | positive decimal+px | em | +#### JSON Grammar +| Nome | Tipo de dados | Possible Values | +| ------------ | ------------- | ----------------------------- | +| footerHeight | string | positive decimal+px | em | #### Objects Supported [List Box](listbox_overview.md) -#### See also -[Headers](properties_Headers.md) - [List box footers](listbox_overview.md#list-box-footers) \ No newline at end of file +#### Veja também + +[Headers](properties_Headers.md) - [List box footers](listbox_overview.md#list-box-footers) diff --git a/website/translated_docs/pt/FormObjects/properties_Gridlines.md b/website/translated_docs/pt/FormObjects/properties_Gridlines.md index 292f12f6de8905..48f71007092848 100644 --- a/website/translated_docs/pt/FormObjects/properties_Gridlines.md +++ b/website/translated_docs/pt/FormObjects/properties_Gridlines.md @@ -3,36 +3,35 @@ id: propertiesGridlines title: Gridlines --- -* * * - -## Horizontal Line Color +--- +## Cor linha horizontal Defines the color of the horizontal lines in a list box (gray by default). #### JSON Grammar -| Name | Data Type | Possible Values | -| -------------------- | --------- | ------------------------------------------ | -| horizontalLineStroke | color | any css value, "'transparent", "automatic" | - +| Nome | Tipo de dados | Possible Values | +| -------------------- | ------------- | ------------------------------------------ | +| horizontalLineStroke | color | any css value, "'transparent", "automatic" | #### Objects Supported [List Box](listbox_overview.md) -* * * -## Vertical Line Color + + +--- +## Cor linha vertical Defines the color of the vertical lines in a list box (gray by default). #### JSON Grammar -| Name | Data Type | Possible Values | -| ------------------ | --------- | ------------------------------------------ | -| verticalLineStroke | color | any css value, "'transparent", "automatic" | - +| Nome | Tipo de dados | Possible Values | +| ------------------ | ------------- | ------------------------------------------ | +| verticalLineStroke | color | any css value, "'transparent", "automatic" | #### Objects Supported -[List Box](listbox_overview.md) \ No newline at end of file +[List Box](listbox_overview.md) diff --git a/website/translated_docs/pt/FormObjects/properties_Headers.md b/website/translated_docs/pt/FormObjects/properties_Headers.md index 57b1bd7b142ef4..c2ed211cc653a8 100644 --- a/website/translated_docs/pt/FormObjects/properties_Headers.md +++ b/website/translated_docs/pt/FormObjects/properties_Headers.md @@ -1,41 +1,38 @@ --- id: propertiesHeaders -title: Headers +title: Cabeçalhos --- -* * * - -## Display Headers +--- +## Exibir cabeçalhos This property is used to display or hide [list box column headers](listbox_overview.md#list-box-headers). There is one header per column; each header is configured separately. #### JSON Grammar -| Name | Data Type | Possible Values | -| ----------- | --------- | --------------- | -| showHeaders | boolean | true, false | - +| Nome | Tipo de dados | Possible Values | +| ----------- | ------------- | --------------- | +| showHeaders | booleano | true, false | #### Objects Supported [List Box](listbox_overview.md) -* * * -## Height -This property is used to set the row height for a list box header in **pixels** or **text lines** (when displayed). Both types of units can be used in the same list box: -* *Pixel* - the height value is applied directly to the row concerned, regardless of the font size contained in the columns. If a font is too big, the text is truncated. Moreover, pictures are truncated or resized according to their format. +--- +## Alto -* *Line* - the height is calculated while taking into account the font size of the row concerned. - - - * If more than one size is set, 4D uses the biggest one. For example, if a row contains "Verdana 18", "Geneva 12" and "Arial 9", 4D uses "Verdana 18" to determine the row height (for instance, 25 pixels). This height is then multiplied by the number of rows defined. - * This calculation does not take into account the size of pictures nor any styles applied to the fonts. - * In macOS, the row height may be incorrect if the user enters characters that are not available in the selected font. When this occurs, a substitute font is used, which may cause variations in size. +This property is used to set the row height for a list box header in **pixels** or **text lines** (when displayed). Both types of units can be used in the same list box: -> This property can also be set dynamically using the [LISTBOX SET HEADERS HEIGHT](https://doc.4d.com/4Dv17R6/4D/17-R6/LISTBOX-SET-HEADERS-HEIGHT.301-4311129.en.html) command. +* *Pixel* - the height value is applied directly to the row concerned, regardless of the font size contained in the columns. If a font is too big, the text is truncated. Moreover, pictures are truncated or resized according to their format. + +* *Line* - the height is calculated while taking into account the font size of the row concerned. + * If more than one size is set, 4D uses the biggest one. For example, if a row contains "Verdana 18", "Geneva 12" and "Arial 9", 4D uses "Verdana 18" to determine the row height (for instance, 25 pixels). This height is then multiplied by the number of rows defined. + * This calculation does not take into account the size of pictures nor any styles applied to the fonts. + * In macOS, the row height may be incorrect if the user enters characters that are not available in the selected font. When this occurs, a substitute font is used, which may cause variations in size. +> > > This property can also be set dynamically using the [LISTBOX SET HEADERS HEIGHT](https://doc.4d.com/4Dv17R6/4D/17-R6/LISTBOX-SET-HEADERS-HEIGHT.301-4311129.en.html) command. Conversion of units: When you switch from one unit to the other, 4D converts them automatically and displays the result in the Property List. For example, if the font used is "Lucida grande 24", a height of "1 line" is converted to "30 pixels" and a height of "60 pixels" is converted to "2 lines". @@ -45,25 +42,28 @@ Note that converting back and forth may lead to an end result that is different #### JSON Example: - "List Box": { - "type": "listbox", - "showHeaders": true, - "headerHeight": "22px", - ... - } - +``` + "List Box": { + "type": "listbox", + "showHeaders": true, + "headerHeight": "22px", + ... + } +``` -#### JSON Grammar -| Name | Data Type | Possible Values | -| ------------ | --------- | ------------------------------- | -| headerHeight | string | positive decimal+px | em ) | +#### JSON Grammar + +| Nome | Tipo de dados | Possible Values | +| ------------ | ------------- | ------------------------------- | +| headerHeight | string | positive decimal+px | em ) | #### Objects Supported [List Box](listbox_overview.md) -#### See also -[Footers](properties_Footers.md) - [List box headers](listbox_overview.md#list-box-headers) \ No newline at end of file +#### Veja também + +[Footers](properties_Footers.md) - [List box headers](listbox_overview.md#list-box-headers) diff --git a/website/translated_docs/pt/FormObjects/properties_Help.md b/website/translated_docs/pt/FormObjects/properties_Help.md index 563190af0e9776..dd532182ca915c 100644 --- a/website/translated_docs/pt/FormObjects/properties_Help.md +++ b/website/translated_docs/pt/FormObjects/properties_Help.md @@ -1,11 +1,10 @@ --- id: propertiesHelp -title: Help +title: Ajuda --- -* * * - -## Help Tip +--- +## Dica de Ajuda This property allows associating help messages with active objects in your forms. They can be displayed at runtime: @@ -18,19 +17,19 @@ You can either: - designate an existing help tip, previously specified in the [Help tips](https://doc.4d.com/4Dv17R5/4D/17-R5/Help-tips.200-4163423.en.html) editor of 4D. - or enter the help message directly as a string. This allows you to take advantage of XLIFF architecture. You can enter an XLIFF reference here in order to display a message in the application language (for more information about XLIFF, refer to [Appendix B: XLIFF architecture](https://doc.4d.com/4Dv17R5/4D/17-R5/Appendix-B-XLIFF-architecture.300-4163748.en.html). You can also use 4D references ([see Using references in static text](https://doc.4d.com/4Dv17R5/4D/17-R5/Using-references-in-static-text.300-4163725.en.html)). +> > > In macOS, displaying help tips is not supported in pop-up type windows. -> In macOS, displaying help tips is not supported in pop-up type windows. #### JSON Grammar -| Name | Data Type | Possible Values | -|:-------:|:---------:| ------------------------------------- | -| tooltip | text | additional information to help a user | - +| Nome | Tipo de dados | Possible Values | +|:-------:|:-------------:| ------------------------------------- | +| tooltip | texto | additional information to help a user | #### Objects Supported -[Button](button_overview.md) - [Button Grid](buttonGrid_overview.md) - [Check Box](checkbox_overview.md) - [Drop-down List](dropdownList_Overview.md) - [Combo Box](comboBox_overview.md#overview) - [Hierarchical List](list_overview.md#overview) - [List Box Header](listbox_overview.md#list-box-headers) - [List Box Footer](listbox_overview.md#list-box-footers) - [Picture Button](pictureButton_overview.md) - [Picture Pop-up menu](picturePopupMenu_overview.md) - [Radio Button](radio_overview.md) +[Button](button_overview.md) - [Button Grid](buttonGrid_overview.md) - [Check Box](checkbox_overview.md) - [Drop-down List](dropdownList_Overview.md) - [Combo Box](comboBox_overview.md#overview) - [Hierarchical List](list_overview.md#overview) - [List Box Header](listbox_overview.md#list-box-headers) - [List Box Footer](listbox_overview.md#list-box-footers) - [Picture Button](pictureButton_overview.md) - [Picture Pop-up menu](picturePopupMenu_overview.md) - [Radio Button](radio_overview.md) + #### Other help features @@ -45,6 +44,7 @@ When different tips are associated with the same object in several locations, th 2. form editor level 3. **[OBJECT SET HELP TIP](https://doc.4d.com/4Dv17R5/4D/17-R5/OBJECT-SET-HELP-TIP.301-4128221.en.html)** command (highest priority) -#### See also -[Placeholder](properties_Entry.md#placeholder) \ No newline at end of file +#### Veja também + +[Placeholder](properties_Entry.md#placeholder) diff --git a/website/translated_docs/pt/FormObjects/properties_Hierarchy.md b/website/translated_docs/pt/FormObjects/properties_Hierarchy.md index 0ee461fff47ac7..4445cc9081d5c8 100644 --- a/website/translated_docs/pt/FormObjects/properties_Hierarchy.md +++ b/website/translated_docs/pt/FormObjects/properties_Hierarchy.md @@ -3,25 +3,24 @@ id: propertiesHierarchy title: Hierarchy --- -* * * - -## Hierarchical List Box - +--- +## List box hierárquica `Array type list boxes` -This property specifies that the list box must be displayed in hierarchical form. In the JSON form, this feature is triggered [when the *dataSource* property value is an array](properties_Object.md#hierarchical-list-box), i.e. a collection. +Essa propriedade especifica que o list box deve ser exibido em forma hierárquica. No formulário JSON essa funcionalidade é ativada [quando o *dataSource* valor de propriedade for um array](properties_Object.md#hierarchical-list-box), ou seja uma coleção. -Additional options (**Variable 1...10**) are available when the *Hierarchical List Box* option is selected, corresponding to each *dataSource* array to use as break column. Each time a value is entered in a field, a new row is added. Up to 10 variables can be specified. These variables set the hierarchical levels to be displayed in the first column. +Opções adicionais (**Variable 1...10**) estão disponíveis quando a opção *List box hierárquica* for selecionada, correspondendo a cada array *dataSource* para usar como quebra de coluna. A cada vez que um valor é digitado em um campo, uma nova linha é adicionada. Podem ser especificadas até 10 variáveis. Essas variáveis estabelecem os níveis hierárquicos a serem exibidos na primeira coluna. See [Hierarchical list boxes](listbox_overview.md#hierarchical-list-boxes) -#### JSON Grammar -| Name | Data Type | Possible Values | -| ---------- | ------------ | ------------------------------------------------ | -| datasource | string array | Collection of array names defining the hierarchy | +#### JSON Grammar + +| Nome | Tipo de dados | Possible Values | +| ---------- | ------------- | ------------------------------------------------ | +| datasource | string array | Collection of array names defining the hierarchy | #### Objects Supported -[List Box](listbox_overview.md) \ No newline at end of file +[List Box](listbox_overview.md) diff --git a/website/translated_docs/pt/FormObjects/properties_ListBox.md b/website/translated_docs/pt/FormObjects/properties_ListBox.md index f8622bf026ba46..57663705fe6613 100644 --- a/website/translated_docs/pt/FormObjects/properties_ListBox.md +++ b/website/translated_docs/pt/FormObjects/properties_ListBox.md @@ -3,245 +3,247 @@ id: propertiesListBox title: List Box --- -* * * - -## Columns +--- +## Colunas Collection of columns of the list box. #### JSON Grammar -| Name | Data Type | Possible Values | +| Nome | Tipo de dados | Possible Values | | ------- | ---------------------------- | ------------------------------------------------ | | columns | collection of column objects | Contains the properties for the list box columns | - For a list of properties supported by column objects, please refer to the [Column Specific Properties](listbox_overview#column-specific-properties) section. #### Objects Supported [List Box](listbox_overview.md) -* * * - -## Detail Form Name - +--- +## Nome formulário detalhe `Selection type list box` Specifies the form to use for modifying or displaying individual records of the list box. The specified form is displayed: -* when using `Add Subrecord` and `Edit Subrecord` standard actions applied to the list box (see [Using standard actions](https://doc.4d.com/4Dv17R6/4D/17-R6/Using-standard-actions.300-4354811.en.html)), -* when a row is double-clicked and the [Double-click on Row](#double-click-on-row) property is set to "Edit Record" or "Display Record". +* when using `Add Subrecord` and `Edit Subrecord` standard actions applied to the list box (see [Using standard actions](https://doc.4d.com/4Dv17R6/4D/17-R6/Using-standard-actions.300-4354811.en.html)), +* when a row is double-clicked and the [Double-click on Row](#double-click-on-row) property is set to "Edit Record" or "Display Record". + +#### JSON Grammar + +| Nome | Tipo de dados | Possible Values | +| ---------- | ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| detailForm | string |
  • Name (string) of table or project form
  • POSIX path (string) to a .json file describing the form
  • Object describing the form | + +#### Objects Supported + +[List Box](listbox_overview.md) + + + + + + +--- +## Duplo clique em linha +`Selection type list box` + +Sets the action to be performed when a user double-clicks on a row in the list box. The available options are: + +* **Do nothing** (default): Double-clicking a row does not trigger any automatic action. +* **Edit Record**: Double-clicking a row displays the corresponding record in the detail form defined [for the list box](#detail-form-name). The record is opened in read-write mode so it can be modified. +* **Display Record**: Identical to the previous action, except that the record is opened in read-only mode so it cannot be modified. +> > > Double-clicking an empty row is ignored in list boxes. + +Regardless of the action selected/chosen, the `On Double clicked` form event is generated. + +For the last two actions, the On `Open Detail` form event is also generated. The `On Close Detail` is then generated when a record displayed in the detail form associated with the list box is about to be closed (regardless of whether or not the record was modified). + +#### JSON Grammar + +| Nome | Tipo de dados | Possible Values | +| ---------------------- | ------------- | ----------------------------------- | +| doubleClickInRowAction | string | "editSubrecord", "displaySubrecord" | + +#### Objects Supported + +[List Box](listbox_overview.md) + + + + +--- +## Ressaltar conjunto + +`Selection type list box` + +This property is used to specify the set to be used to manage highlighted records in the list box (when the **Arrays** data source is selected, a Boolean array with the same name as the list box is used). + +4D creates a default set named *ListBoxSetN* where *N* starts at 0 and is incremented according to the number of list boxes in the form. If necessary, you can modify the default set. It can be a local, process or interprocess set (we recommend using a local set, for example *$LBSet*, in order to limit network traffic). It is then maintained automatically by 4D. If the user selects one or more rows in the list box, the set is updated immediately. If you want to select one or more rows by programming, you can apply the commands of the “Sets” theme to this set. +> * The highlighted status of the list box rows and the highlighted status of the table records are completely independent. +> * If the “Highlight Set” property does not contain a name, it will not be possible to make selections in the list box. #### JSON Grammar -* Name (string) of table or project form - * POSIX path (string) to a .json file describing the form - * Object describing the form - #### Objects Supported - - [List Box](listbox_overview.md) - - * * * - - ## Double-click on row - - `Selection type list box` - - Sets the action to be performed when a user double-clicks on a row in the list box. The available options are: - - * **Do nothing** (default): Double-clicking a row does not trigger any automatic action. - * **Edit Record**: Double-clicking a row displays the corresponding record in the detail form defined [for the list box](#detail-form-name). The record is opened in read-write mode so it can be modified. - * **Display Record**: Identical to the previous action, except that the record is opened in read-only mode so it cannot be modified. - - > Double-clicking an empty row is ignored in list boxes. - - Regardless of the action selected/chosen, the `On Double clicked` form event is generated. - - For the last two actions, the On `Open Detail` form event is also generated. The `On Close Detail` is then generated when a record displayed in the detail form associated with the list box is about to be closed (regardless of whether or not the record was modified). - - #### JSON Grammar - - | Name | Data Type | Possible Values | - | ---------------------- | --------- | ----------------------------------- | - | doubleClickInRowAction | string | "editSubrecord", "displaySubrecord" | - - - #### Objects Supported - - [List Box](listbox_overview.md) - - * * * - - ## Highlight Set - - `Selection type list box` - - This property is used to specify the set to be used to manage highlighted records in the list box (when the **Arrays** data source is selected, a Boolean array with the same name as the list box is used). - - 4D creates a default set named *ListBoxSetN* where *N* starts at 0 and is incremented according to the number of list boxes in the form. If necessary, you can modify the default set. It can be a local, process or interprocess set (we recommend using a local set, for example *$LBSet*, in order to limit network traffic). It is then maintained automatically by 4D. If the user selects one or more rows in the list box, the set is updated immediately. If you want to select one or more rows by programming, you can apply the commands of the “Sets” theme to this set. - - > * The highlighted status of the list box rows and the highlighted status of the table records are completely independent. - > * If the “Highlight Set” property does not contain a name, it will not be possible to make selections in the list box. - - #### JSON Grammar - - | Name | Data Type | Possible Values | - | ------------ | --------- | --------------- | - | highlightSet | string | Name of the set | - - - #### Objects Supported - - [List Box](listbox_overview.md) - - * * * - - ## Locked columns and static columns - - Locked columns and static columns are two separate and independent functionalities in list boxes: - - * Locked columns always stay displayed to the left of the list box; they do not scroll horizontally. - * Static columns cannot be moved by drag and drop within the list box. - - > You can set static and locked columns by programming, refer to [List Box](https://doc.4d.com/4Dv17R6/4D/17-R6/List-Box.201-4310263.en.html) in the [4D Language Reference](https://doc.4d.com/4Dv17R6/4D/17-R6/4D-Language-Reference.100-4310216.en.html) manual. - - These properties interact as follows: - - * If you set columns that are only static, they cannot be moved. - - * If you set columns that are locked but not static, you can still change their position freely within the locked area. However, a locked column cannot be moved outside of this locked area. - - ![](assets/en/FormObjects/property_lockedStaticColumns1.png) - - * If you set all of the columns in the locked area as static, you cannot move these columns within the locked area. - - ![](assets/en/FormObjects/property_lockedStaticColumns2.png) - - * You can set a combination of locked and static columns according to your needs. For example, if you set three locked columns and one static column, the user can swap the two right-most columns within the locked area (since only the first column is static). - ### Number of Locked Columns - - Number of columns that must stay permanently displayed in the left part of the list box, even when the user scrolls through the columns horizontally. - - #### JSON Grammar - - | Name | Data Type | Possible Values | - | ----------------- | --------- | --------------- | - | lockedColumnCount | integer | minimum: 0 | - - - #### Objects Supported - - [List Box](listbox_overview.md) - - ### Number of Static Columns - - Number of columns that cannot be moved during execution. - - #### JSON Grammar - - | Name | Data Type | Possible Values | - | ----------------- | --------- | --------------- | - | staticColumnCount | integer | minimum: 0 | - - - #### Objects Supported - - [List Box](listbox_overview.md) - - * * * - - ## Number of Columns - - Sets the number of columns of the list box. - - > You can add or remove columns dynamically by programming, using commands such as [LISTBOX INSERT COLUMN](https://doc.4d.com/4Dv18/4D/18/LISTBOX-INSERT-COLUMN.301-4505224.en.html) or [LISTBOX DELETE COLUMN](https://doc.4d.com/4Dv18/4D/18/LISTBOX-DELETE-COLUMN.301-4505185.en.html). - - #### JSON Grammar - - | Name | Data Type | Possible Values | - | ----------- | --------- | --------------- | - | columnCount | integer | minimum: 1 | - - - #### Objects Supported - - [List Box](listbox_overview.md) - - * * * - - ## Row Control Array - - `Array type list box` - - A 4D array controlling the display of list box rows. - - You can set the "hidden", "disabled" and "selectable" interface properties for each row in an array-based list box using this array. It can also be designated using the `LISTBOX SET ARRAY` command. - - The row control array must be of the Longint type and include the same number of rows as the list box. Each element of the *Row Control Array* defines the interface status of its corresponding row in the list box. Three interface properties are available using constants in the "List Box" constant theme: - - | Constant | Value | Comment | - | ------------------------ | ----- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | - | lk row is disabled | 2 | The corresponding row is disabled. The text and controls such as check boxes are dimmed or grayed out. Enterable text input areas are no longer enterable. Default value: Enabled | - | lk row is hidden | 1 | The corresponding row is hidden. Hiding rows only affects the display of the list box. The hidden rows are still present in the arrays and can be managed by programming. The language commands, more particularly `LISTBOX Get number of rows` or `LISTBOX GET CELL POSITION`, do not take the displayed/hidden status of rows into account. For example, in a list box with 10 rows where the first 9 rows are hidden, `LISTBOX Get number of rows` returns 10. From the user’s point of view, the presence of hidden rows in a list box is not visibly discernible. Only visible rows can be selected (for example using the Select All command). Default value: Visible | - | lk row is not selectable | 4 | The corresponding row is not selectable (highlighting is not possible). Enterable text input areas are no longer enterable unless the [Single-Click Edit](properties_Entry.md#single-click-edit) option is enabled. Controls such as check boxes and lists are still functional however. This setting is ignored if the list box selection mode is "None". Default value: Selectable | - - - To change the status for a row, you just need to set the appropriate constant(s) to the corresponding array element. For example, if you do not want row #10 to be selectable, you can write: - - ```4d - aLControlArr{10}:=lk row is not selectable - ``` - - ![](assets/en/FormObjects/listbox_styles5.png) - - You can define several interface properties at once: - - ```4d - aLControlArr{8}:=lk row is not selectable + lk row is disabled - ``` - - ![](assets/en/FormObjects/listbox_styles6.png) - - Note that setting properties for an element overrides any other values for this element (if not reset). For example: - - ```4d - aLControlArr{6}:=lk row is disabled + lk row is not selectable - //sets row 6 as disabled AND not selectable - aLControlArr{6}:=lk row is disabled - //sets row 6 as disabled but selectable again - ``` - - #### JSON Grammar - - | Name | Data Type | Possible Values | - | ---------------- | --------- | ---------------------- | - | rowControlSource | string | Row control array name | - - - #### Objects Supported - - [List Box](listbox_overview.md) - - * * * - - ## Selection Mode - - Designates the option for allowing users to select rows: - - - **None**: Rows cannot be selected if this mode is chosen. Clicking on the list will have no effect unless the [Single-Click Edit](properties_Entry.md#single-click-edit) option is enabled. The navigation keys only cause the list to scroll; the `On Selection Change` form event is not generated. - - **Single**: One row at a time can be selected in this mode. Clicking on a row will select it. A **Ctrl+click** (Windows) or **Command+click** (macOS) on a row toggles its state (between selected or not). - The Up and Down arrow keys select the previous/next row in the list. The other navigation keys scroll the list. The `On Selection Change` form event is generated every time the current row is changed. - - **Multiple**: Several rows can be selected simultaneously in this mode. - #### JSON Grammar - - | Name | Data Type | Possible Values | - | ------------- | --------- | ---------------------------- | - | selectionMode | string | "multiple", "single", "none" | - - - #### Objects Supported - - [List Box](listbox_overview.md) \ No newline at end of file +| Nome | Tipo de dados | Possible Values | +| ------------ | ------------- | --------------- | +| highlightSet | string | Name of the set | + +#### Objects Supported + +[List Box](listbox_overview.md) + + + +--- +## Locked columns and static columns + +Locked columns and static columns are two separate and independent functionalities in list boxes: + +* Locked columns always stay displayed to the left of the list box; they do not scroll horizontally. +* Static columns cannot be moved by drag and drop within the list box. +> > > You can set static and locked columns by programming, refer to [List Box](https://doc.4d.com/4Dv17R6/4D/17-R6/List-Box.201-4310263.en.html) in the [4D Language Reference](https://doc.4d.com/4Dv17R6/4D/17-R6/4D-Language-Reference.100-4310216.en.html) manual. + +These properties interact as follows: + +* If you set columns that are only static, they cannot be moved. + +* If you set columns that are locked but not static, you can still change their position freely within the locked area. However, a locked column cannot be moved outside of this locked area. + +![](assets/en/FormObjects/property_lockedStaticColumns1.png) + +* If you set all of the columns in the locked area as static, you cannot move these columns within the locked area. + +![](assets/en/FormObjects/property_lockedStaticColumns2.png) + +* You can set a combination of locked and static columns according to your needs. For example, if you set three locked columns and one static column, the user can swap the two right-most columns within the locked area (since only the first column is static). + +### Número de colunas trancadas + +Number of columns that must stay permanently displayed in the left part of the list box, even when the user scrolls through the columns horizontally. + +#### JSON Grammar + +| Nome | Tipo de dados | Possible Values | +| ----------------- | ------------- | --------------- | +| lockedColumnCount | integer | mínimo: 0 | + +#### Objects Supported + +[List Box](listbox_overview.md) + + +### Número de colunas estáticas + +Number of columns that cannot be moved during execution. + +#### JSON Grammar + +| Nome | Tipo de dados | Possible Values | +| ----------------- | ------------- | --------------- | +| staticColumnCount | integer | mínimo: 0 | + +#### Objects Supported + +[List Box](listbox_overview.md) + + + + + + +--- +## Número de colunas + +Sets the number of columns of the list box. +> You can add or remove columns dynamically by programming, using commands such as [LISTBOX INSERT COLUMN](https://doc.4d.com/4Dv18/4D/18/LISTBOX-INSERT-COLUMN.301-4505224.en.html) or [LISTBOX DELETE COLUMN](https://doc.4d.com/4Dv18/4D/18/LISTBOX-DELETE-COLUMN.301-4505185.en.html). + +#### JSON Grammar + +| Nome | Tipo de dados | Possible Values | +| ----------- | ------------- | --------------- | +| columnCount | integer | mínimo: 1 | + +#### Objects Supported + +[List Box](listbox_overview.md) + + + + +--- +## Array controle linha + +`Array type list box` + +A 4D array controlling the display of list box rows. + +You can set the "hidden", "disabled" and "selectable" interface properties for each row in an array-based list box using this array. It can also be designated using the `LISTBOX SET ARRAY` command. + +The row control array must be of the Longint type and include the same number of rows as the list box. Each element of the *Row Control Array* defines the interface status of its corresponding row in the list box. Three interface properties are available using constants in the "List Box" constant theme: + +| Constante | Value | Comentário | +| ------------------------ | ----- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| lk row is disabled | 2 | The corresponding row is disabled. The text and controls such as check boxes are dimmed or grayed out. Enterable text input areas are no longer enterable. Default value: Enabled | +| lk row is hidden | 1 | The corresponding row is hidden. Hiding rows only affects the display of the list box. The hidden rows are still present in the arrays and can be managed by programming. The language commands, more particularly `LISTBOX Get number of rows` or `LISTBOX GET CELL POSITION`, do not take the displayed/hidden status of rows into account. For example, in a list box with 10 rows where the first 9 rows are hidden, `LISTBOX Get number of rows` returns 10. From the user’s point of view, the presence of hidden rows in a list box is not visibly discernible. Only visible rows can be selected (for example using the Select All command). Default value: Visible | +| lk row is not selectable | 4 | The corresponding row is not selectable (highlighting is not possible). Enterable text input areas are no longer enterable unless the [Single-Click Edit](properties_Entry.md#single-click-edit) option is enabled. Controls such as check boxes and lists are still functional however. This setting is ignored if the list box selection mode is "None". Default value: Selectable | + +To change the status for a row, you just need to set the appropriate constant(s) to the corresponding array element. For example, if you do not want row #10 to be selectable, you can write: + +```4d + aLControlArr{10}:=lk row is not selectable +``` + +![](assets/en/FormObjects/listbox_styles5.png) + +You can define several interface properties at once: + +```4d + aLControlArr{8}:=lk row is not selectable + lk row is disabled +``` + +![](assets/en/FormObjects/listbox_styles6.png) + +Note that setting properties for an element overrides any other values for this element (if not reset). Por exemplo: + +```4d + aLControlArr{6}:=lk row is disabled + lk row is not selectable + //define a linha 6 como desativada E não selecionável + aLControlArr{6}:=lk row is disabled + //define a linha 6 como desativada mas selecionável novamente +``` + + +#### JSON Grammar + +| Nome | Tipo de dados | Possible Values | +| ---------------- | ------------- | ---------------------- | +| rowControlSource | string | Row control array name | + +#### Objects Supported + +[List Box](listbox_overview.md) + + + +--- +## Modo seleção + +Designates the option for allowing users to select rows: +- **None**: Rows cannot be selected if this mode is chosen. Clicking on the list will have no effect unless the [Single-Click Edit](properties_Entry.md#single-click-edit) option is enabled. The navigation keys only cause the list to scroll; the `On Selection Change` form event is not generated. +- **Single**: One row at a time can be selected in this mode. Clicking on a row will select it. A **Ctrl+click** (Windows) or **Command+click** (macOS) on a row toggles its state (between selected or not). + The Up and Down arrow keys select the previous/next row in the list. The other navigation keys scroll the list. The `On Selection Change` form event is generated every time the current row is changed. +- **Multiple**: Several rows can be selected simultaneously in this mode. + + +#### JSON Grammar + +| Nome | Tipo de dados | Possible Values | +| ------------- | ------------- | ---------------------------- | +| selectionMode | string | "multiple", "single", "none" | + +#### Objects Supported + +[List Box](listbox_overview.md) diff --git a/website/translated_docs/pt/FormObjects/properties_Object.md b/website/translated_docs/pt/FormObjects/properties_Object.md index 3af065637524bf..4dbd18bc459d49 100644 --- a/website/translated_docs/pt/FormObjects/properties_Object.md +++ b/website/translated_docs/pt/FormObjects/properties_Object.md @@ -1,58 +1,59 @@ --- id: propertiesObject -title: Objects +title: Objetos --- -* * * - +--- ## Type -`MANDATORY SETTING` + `CONFIGURAÇÃO OBRIGATÓRIA` This property designates the type of the [active or inactive form object](formObjects_overview.md). + #### JSON Grammar -| Name | Data Type | Possible Values | -| ---- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| type | string | "button", "buttonGrid", "checkbox", "combo", "dropdown", "groupBox", "input", "line", "list", "listbox", "oval", "picture", "pictureButton", "picturePopup", "plugin", "progress", "radio", "rectangle", "ruler", "spinner", "splitter", "stepper", "subform", "tab", "text", "view", "webArea", "write" | +| Nome | Tipo de dados | Possible Values | +| ---- | ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| type | string | "button", "buttonGrid", "checkbox", "combo", "dropdown", "groupBox", "input", "line", "list", "listbox", "oval", "picture", "pictureButton", "picturePopup", "plugin", "progress", "radio", "rectangle", "ruler", "spinner", "splitter", "stepper", "subform", "tab", "text", "view", "webArea", "write" | #### Objects Supported [4D View Pro area](viewProArea_overview) - [4D Write Pro area](writeProArea_overview) - [Button](button_overview.md) - [Button Grid](buttonGrid_overview.md) - [Check Box](checkbox_overview.md) - [Combo Box](comboBox_overview.md) - [Drop-down List](dropdownList_Overview.md) - [Group Box](groupBox.md) - [Hierarchical List](list_overview.md) - [List Box](listbox_overview.md) - [List Box Column](listbox_overview.md#list-box-columns) - [List Box Footer](listbox_overview.md#list-box-footers) - [List Box Header](listbox_overview.md#list-box-headers) - [Picture Button](pictureButton_overview.md) - [Picture Pop-up Menu](picturePopupMenu_overview.md) - [Plug-in Area](pluginArea_overview.md) - [Progress indicator](progressIndicator.md) - [Radio Button](radio_overview.md) -[Spinner](spinner.md) - [Splitter](splitters.md) - [Static Picture](staticPicture.md) - [Stepper](stepper.md) - [Subform](subform_overview.md) - [Tab control](tabControl.md) - [Text Area](text.md) - [Web Area](webArea_overview.md) -* * * -## Object Name +--- +## Nome de objeto Each active form object is associated with an object name. Each object name must be unique. - > Object names are limited to a size of 255 bytes. When using 4D’s language, you can refer to an active form object by its object name (for more information about this, refer to [Object Properties](https://doc.4d.com/4Dv17R5/4D/17-R5/Object-Properties.300-4128195.en.html) in the 4D Language Reference manual). + + For more information about naming rules for form objects, refer to [Identifiers](Concepts/identifiers.md) section. #### JSON Grammar -| Name | Data Type | Possible Values | -| ---- | --------- | -------------------------------------------------------------------- | -| name | string | Any allowed name which does not belong to an already existing object | - +| Nome | Tipo de dados | Possible Values | +| ---- | ------------- | -------------------------------------------------------------------- | +| name | string | Any allowed name which does not belong to an already existing object | #### Objects Supported [4D View Pro area](viewProArea_overview) - [4D Write Pro area](writeProArea_overview) - [Button](button_overview.md) - [Button Grid](buttonGrid_overview.md) - [Check Box](checkbox_overview.md) - [Combo Box](comboBox_overview.md) - [Drop-down List](dropdownList_Overview.md) - [Group Box](groupBox.md) - [Hierarchical List](list_overview.md) - [List Box](listbox_overview.md) - [List Box Column](listbox_overview.md#list-box-columns) - [List Box Footer](listbox_overview.md#list-box-footers) - [List Box Header](listbox_overview.md#list-box-headers) - [Picture Button](pictureButton_overview.md) - [Picture Pop-up Menu](picturePopupMenu_overview.md) - [Plug-in Area](pluginArea_overview.md) - [Progress indicator](progressIndicator.md) - [Spinner](spinner.md) - [Splitter](splitters.md) - [Static Picture](staticPicture.md) - [Stepper](stepper.md) - [Radio Button](radio_overview.md) - [Subform](subform_overview.md) - [Tab control](tabControl.md) - [Text Area](text.md) - [Web Area](webArea_overview.md) -* * * -## Variable or Expression + +--- +## Variável ou expressão > See also **[Expression](properties_DataSource#expression)** for Selection and collection type list box columns. -This property specifies the source of the data. Each active form object is associated with an object name and a variable name. The variable name can be different from the object’s name. In the same form, you can use the same variable several times while each [object name](#object-name) must be unique. +This property specifies the source of the data. Each active form object is associated with an object name and a variable name. The variable name can be different from the object’s name. In the same form, you can use the same variable several times while each [object name](#object-name) must be unique. > Variable name size is limited to 31 bytes. See [Identifiers](Concepts/identifiers.md) section for more information about naming rules. The form object variables allow you to control and monitor the objects. For example, when a button is clicked, its variable is set to 1; at all other times, it is 0. The expression associated with a progress indicator lets you read and change the current setting. @@ -62,9 +63,10 @@ Variables or expressions can be enterable or non-enterable and can receive data ### Expressions You can use an expression as data source for an object. Any valid 4D expression is allowed: simple expression, formula, 4D function, project method name or field using the standard `[Table]Field` syntax. The expression is evaluated when the form is executed and reevaluated for each form event. Note that expressions can be [assignable or non-assignable](Concepts/quick-tour.md#expressions). - > If the value entered corresponds to both a variable name and a method name, 4D considers that you are indicating the method. + + ### Dynamic variables 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. @@ -83,7 +85,7 @@ When a variable is not named, when the form is loaded, 4D creates a new variable End if ``` -In the 4D code, dynamic variables can be accessed using a pointer obtained with the `OBJECT Get pointer` command. For example: +In the 4D code, dynamic variables can be accessed using a pointer obtained with the `OBJECT Get pointer` command. Por exemplo: ```4d // assign the time 12:00:00 to the variable for the "tstart" object @@ -96,205 +98,230 @@ There are two advantages with this mechanism: - 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. - 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. -### Hierarchical List Box -Using a string array (collection of arrays names) as *dataSource* value for a list box column defines a [hierarchical list box](listbox_overview.md#hierarchical-list-boxes). +### Array List Box + +For an array list box, the **Variable or Expression** property usually holds the name of the array variable defined for the list box, and for each column. However, you can use a string array (containing arrays names) as *dataSource* value for a list box column to define a [hierarchical list box](listbox_overview.md#hierarchical-list-boxes). + + + +#### JSON Grammar + +| Nome | Tipo de dados | Possible Values | +| ---------- | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| dataSource | string, or string array |
  • 4D variable, field name, or arbitrary complex language expression.
  • Empty string for [dynamic variables](#dynamic-variables).
  • String array (collection of array names) for a [hierarchical listbox](listbox_overview.md#hierarchical-list-boxes) column] | + + +#### Objects Supported + +[4D View Pro area](viewProArea_overview) - [4D Write Pro area](writeProArea_overview) - [Button](button_overview.md) - [Button Grid](buttonGrid_overview.md) - [Check Box](checkbox_overview.md) - [Combo Box](comboBox_overview.md) - [Drop-down List](dropdownList_Overview.md) - [Hierarchical List](list_overview.md#overview) - [List Box](listbox_overview.md#overview) - [List Box Column](listbox_overview.md#list-box-columns) - [List Box Header](listbox_overview.md#list-box-headers) - [List Box Footer](listbox_overview.md#list-box-footers) - [Picture Pop-up Menu](picturePopupMenu_overview.md) - [Plug-in Area](pluginArea_overview.md#overview) - [Progress indicator](progressIndicator.md) - [Spinner](spinner.md) - [Splitter](splitters.md) - [Stepper](stepper.md) - [Tab control](tabControl.md) - [Subform](subform_overview.md#overview) - [Radio Button](radio_overview.md) - [Web Area](webArea_overview.md) + + + + + +--- +## Expression Type + +> This property is called **Data Type** in the Property List for Selection and collection type list box columns. + + +Specify the data type for the expression or variable associated to the object. Note that main purpose of this setting is to configure options (such as display formats) available for the data type. It does not actually type the variable itself. Em vista da compilação de um banco de dados, deve utilizar os comandos da linguagem 4D do tema `Compilador`. + +However, this property has a typing function in the following specific cases: + +- **[Dynamic variables](#dynamic-variables)**: you can use this property to declare the type of dynamic variables. +- **[List Box Columns](listbox_overview.md#list-box-columns)**: this property is used to associate a display format with the column data. The formats provided will depend on the variable type (array type list box) or the data/field type (selection and collection type list boxes). The standard 4D formats that can be used are: Alpha, Numeric, Date, Time, Picture and Boolean. The Text type does not have specific display formats. Any existing custom formats are also available. +- **[Picture variables](input_overview.md)**: you can use this menu to declare the variables before loading the form in interpreted mode. Specific native mechanisms govern the display of picture variables in forms. These mechanisms require greater precision when configuring variables: from now on, they must have already been declared before loading the form — i.e., even before the `On Load` form event — unlike other types of variables. To do this, you need either for the statement `C_PICTURE(varName)` to have been executed before loading the form (typically, in the method calling the `DIALOG` command), or for the variable to have been typed at the form level using the expression type property. Otherwise, the picture variable will not be displayed correctly (only in interpreted mode). + #### JSON Grammar -- 4D variable, field name, or arbitrary complex language expression. - - Empty string for [dynamic variables](#dynamic-variables). - - String array (collection of array names) for a [hierarchical listbox](listbox_overview.md#hierarchical-list-boxes) column] - #### Objects Supported - - [4D View Pro area](viewProArea_overview) - [4D Write Pro area](writeProArea_overview) - [Button](button_overview.md) - [Button Grid](buttonGrid_overview.md) - [Check Box](checkbox_overview.md) - [Combo Box](comboBox_overview.md) - [Drop-down List](dropdownList_Overview.md) - [Hierarchical List](list_overview.md#overview) - [List Box](listbox_overview.md#overview) - [List Box Column](listbox_overview.md#list-box-columns) - [List Box Header](listbox_overview.md#list-box-headers) - [List Box Footer](listbox_overview.md#list-box-footers) - [Picture Pop-up Menu](picturePopupMenu_overview.md) - [Plug-in Area](pluginArea_overview.md#overview) - [Progress indicator](progressIndicator.md) - [Spinner](spinner.md) - [Splitter](splitters.md) - [Stepper](stepper.md) - [Tab control](tabControl.md) - [Subform](subform_overview.md#overview) - [Radio Button](radio_overview.md) - [Web Area](webArea_overview.md) - - * * * - - ## Expression Type - - > This property is called **Data Type** in the Property List for Selection and collection type list box columns. - - Specify the data type for the expression or variable associated to the object. Note that main purpose of this setting is to configure options (such as display formats) available for the data type. It does not actually type the variable itself. In view of database compilation, you must use the 4D language commands of the `Compiler` theme. - - However, this property has a typing function in the following specific cases: - - - **[Dynamic variables](#dynamic-variables)**: you can use this property to declare the type of dynamic variables. - - **[List Box Columns](listbox_overview.md#list-box-columns)**: this property is used to associate a display format with the column data. The formats provided will depend on the variable type (array type list box) or the data/field type (selection and collection type list boxes). The standard 4D formats that can be used are: Alpha, Numeric, Date, Time, Picture and Boolean. The Text type does not have specific display formats. Any existing custom formats are also available. - - **[Picture variables](input_overview.md)**: you can use this menu to declare the variables before loading the form in interpreted mode. Specific native mechanisms govern the display of picture variables in forms. These mechanisms require greater precision when configuring variables: from now on, they must have already been declared before loading the form — i.e., even before the `On Load` form event — unlike other types of variables. To do this, you need either for the statement `C_PICTURE(varName)` to have been executed before loading the form (typically, in the method calling the `DIALOG` command), or for the variable to have been typed at the form level using the expression type property. Otherwise, the picture variable will not be displayed correctly (only in interpreted mode). - #### JSON Grammar - - - **standard objects:** "integer", "boolean", "number", "picture", "text", date", "time", "arrayText", "arrayDate", "arrayTime", "arrayNumber", "collection", "object", "undefined" - - **list box columns:** "boolean", "number", "picture", "text", date" (*array/selection list box only*) "integer", "time", "object" - #### Objects Supported - - [Check Box](checkbox_overview.md) - [Combo Box](comboBox_overview.md) - [Drop-down List](dropdownList_Overview.md) - [Input](input_overview.md) - [List Box Column](listbox_overview.md#list-box-columns) - [List Box Footer](listbox_overview.md#list-box-footers) - [Plug-in Area](pluginArea_overview.md#overview) - [Progress indicator](progressIndicator.md) - [Radio Button](radio_overview.md) - [Ruler](ruler.md) - [Spinner](spinner.md) - [Stepper](stepper.md) - [Subform](subform_overview.md) - [Tab Control](tabControl.md) - - * * * - - ## CSS Class - - A list of space-separated words used as class selectors in css files. - - #### JSON Grammar - - | Name | Data Type | Possible Values | - | ----- | --------- | --------------------------------------------------------- | - | class | string | One string with CSS name(s) separated by space characters | - - - #### Objects Supported - - [4D View Pro area](viewProArea_overview) - [4D Write Pro area](writeProArea_overview) - [Button](button_overview.md) - [Button Grid](buttonGrid_overview.md) - [Check Box](checkbox_overview.md) - [Combo Box](comboBox_overview.md) - [Drop-down List](dropdownList_Overview.md) - [Group Box](groupBox.md) - [Hierarchical List](list_overview.md#overview) - [List Box](listbox_overview.md#overview) - [Picture Button](pictureButton_overview.md) - [Picture Pop-up Menu](picturePopupMenu_overview.md) - [Plug-in Area](pluginArea_overview.md#overview) - [Radio Button](radio_overview.md) - [Static Picture](staticPicture.md) - [Subform](subform_overview.md#overview) - [Text Area](text.md) - [Web Area](webArea_overview.md#overview) - - * * * - - ## Collection or entity selection - - To use collection elements or entities to define the row contents of the list box. - - Enter an expression that returns either a collection or an entity selection. Usually, you will enter the name of a variable, a collection element or a property that contain a collection or an entity selection. - - The collection or the entity selection must be available to the form when it is loaded. Each element of the collection or each entity of the entity selection will be associated to a list box row and will be available as an object through the [This](https://doc.4d.com/4Dv17R6/4D/17-R6/This.301-4310806.en.html) command: - - * if you used a collection of objects, you can call **This** in the datasource expression to access each property value, for example **This.\**. - * if you used an entity selection, you can call **This** in the datasource expression to access each attribute value, for example **This.\**. - - > If you used a collection of scalar values (and not objects), 4D allows you to display each value by calling **This.value** in the datasource expression. However in this case you will not be able to modify values or to access the current ite object (see below) Note: For information about entity selections, please refer to the [ORDA](https://doc.4d.com/4Dv17R6/4D/17-R6/ORDA.200-4354624.en.html) chapter. - - #### JSON Grammar - - | Name | Data Type | Possible Values | - | ---------- | --------- | ------------------------------------------------------------ | - | dataSource | string | Expression that returns a collection or an entity selection. | - - - #### Objects Supported - - [List Box](listbox_overview.md) - - * * * - - ## Data Source - - Specify the type of list box. - - ![](assets/en/FormObjects/listbox_dataSource.png) - - - **Arrays**(default): use array elements as the rows of the list box. - - **Current Selection**: use expressions, fields or methods whose values will be evaluated for each record of the current selection of a table. - - **Named Selection**: use expressions, fields or methods whose values will be evaluated for each record of a named selection. - - **Collection or Entity Selection**: use collection elements or entities to define the row contents of the list box. Note that with this list box type, you need to define the [Collection or Entity Selection](properties_Object.md#collection-or-entity-selection) property. - #### JSON Grammar - - | Name | Data Type | Possible Values | - | ----------- | --------- | ----------------------------------------------------------- | - | listboxType | string | "array", "currentSelection", "namedSelection", "collection" | - - - #### Objects Supported - - [List Box](listbox_overview.md) - - * * * - - ## Plug-in Kind - - Name of the [plug-in external area](pluginArea_overview.md) associated to the object. Plug-in external area names are published in the manifest.json file of the plug-in. - - #### JSON Grammar - - | Name | Data Type | Possible Values | - | -------------- | --------- | ------------------------------------------------------------- | - | pluginAreaKind | string | Name of the plug-in external area (starts with a % character) | - - - #### Objects Supported - - [Plug-in Area](pluginArea_overview.md) - - * * * - - ## Radio Group - - Enables radio buttons to be used in coordinated sets: only one button at a time can be selected in the set. - - #### JSON Grammar - - | Name | Data Type | Possible Values | - | ---------- | --------- | ---------------- | - | radioGroup | string | Radio group name | - - - #### Objects Supported - - [Radio Button](radio_overview.md) - - * * * - - ## Title - - Allows inserting a label on an object. The font and the style of this label can be specified. - - You can force a carriage return in the label by using the \ character (backslash). - - ![](assets/en/FormObjects/property_title.png) - - To insert a \ in the label, enter "\\". - - By default, the label is placed in the center of the object. When the object also contains an icon, you can modify the relative location of these two elements using the [Title/Picture Position](properties_TextAndPicture.md#title-picture-position) property. - - For database translation purposes, you can enter an XLIFF reference in the title area of a button (see [Appendix B: XLIFF architecture](https://doc.4d.com/4Dv17R5/4D/17-R5/Appendix-B-XLIFF-architecture.300-4163748.en.html)). - - #### JSON Grammar - - | Name | Data Type | Possible Values | - | ---- | --------- | --------------- | - | text | string | any text | - - - #### Objects Supported - - [Button](button_overview.md) - [Check Box](checkbox_overview.md) - [List Box Header](listbox_overview.md#list-box-headers) - [Radio Button](radio_overview.md) - [Text Area](text.md) - - * * * - - ## Variable Calculation - - This property sets the type of calculation to be done in a [column footer](listbox_overview.md#list-box-footers) area. - - > The calculation for footers can also be set using the `LISTBOX SET FOOTER CALCULATION` 4D command. - - There are several types of calculations available. The following table shows which calculations can be used according to the type of data found in each column and indicates the type automatically affected by 4D to the footer variable (if it is not typed by the code): - - | Calculation | Num | Text | Date | Time | Bool | Pict | footer var type | - | --------------------- | --- | ---- | ---- | ---- | ---- | ---- | ------------------- | - | Minimum | X | | X | X | X | | Same as column type | - | Maximum | X | | X | X | X | | Same as column type | - | Sum | X | | X | | X | | Same as column type | - | Count | X | X | X | X | X | X | Longint | - | Average | X | | | X | | | Real | - | Standard deviation(*) | X | | | X | | | Real | - | Variance(*) | X | | | X | | | Real | - | Sum squares(*) | X | | | X | | | Real | - | Custom ("none") | X | X | X | X | X | X | Any | - - - (*) Only for array type list boxes. - - When an automatic calculation is set, it is applied to all the values found in the list box column. Note that the calculation does not take the shown/hidden state of list box rows into account. If you want to restrict a calculation to only visible rows, you must use a custom calculation. - - When **Custom** ("none" in JSON) is set, no automatic calculations are performed by 4D and you must assign the value of the variable in this area by programming. - - > Automatic calculations are not supported with: * footers of columns based on formulas, * footers of [Collection and Entity selection](listbox_overview.md#collection-or-entity-selection-list-boxes) list boxes. You need to use custom calculations. - - #### JSON Grammar - - | Name | Data Type | Possible Values | - | ------------------- | --------- | ----------------------------------------------------------------------------------------------------- | - | variableCalculation | string | "none", "minimum", "maximum", "sum", "count", "average", "standardDeviation", "variance", "sumSquare" | - - - #### Objects Supported - - [List Box Footer](listbox_overview.md#list-box-footers) \ No newline at end of file +| Nome | Tipo de dados | Possible Values | +| ------------------ | ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| dataSourceTypeHint | string |
  • **standard objects:** "integer", "boolean", "number", "picture", "text", date", "time", "arrayText", "arrayDate", "arrayTime", "arrayNumber", "collection", "object", "undefined"
  • **list box columns:** "boolean", "number", "picture", "text", date" (*array/selection list box only*) "integer", "time", "object" | + +#### Objects Supported + +[Check Box](checkbox_overview.md) - [Combo Box](comboBox_overview.md) - [Drop-down List](dropdownList_Overview.md) - [Input](input_overview.md) - [List Box Column](listbox_overview.md#list-box-columns) - [List Box Footer](listbox_overview.md#list-box-footers) - [Plug-in Area](pluginArea_overview.md#overview) - [Progress indicator](progressIndicator.md) - [Radio Button](radio_overview.md) - [Ruler](ruler.md) - [Spinner](spinner.md) - [Stepper](stepper.md) - [Subform](subform_overview.md) - [Tab Control](tabControl.md) + + +--- +## CSS Class + +A list of space-separated words used as class selectors in css files. + + +#### JSON Grammar + +| Nome | Tipo de dados | Possible Values | +| ----- | ------------- | --------------------------------------------------------- | +| class | string | One string with CSS name(s) separated by space characters | + + +#### Objects Supported + +[4D View Pro area](viewProArea_overview) - [4D Write Pro area](writeProArea_overview) - [Button](button_overview.md) - [Button Grid](buttonGrid_overview.md) - [Check Box](checkbox_overview.md) - [Combo Box](comboBox_overview.md) - [Drop-down List](dropdownList_Overview.md) - [Group Box](groupBox.md) - [Hierarchical List](list_overview.md#overview) - [List Box](listbox_overview.md#overview) - [Picture Button](pictureButton_overview.md) - [Picture Pop-up Menu](picturePopupMenu_overview.md) - [Plug-in Area](pluginArea_overview.md#overview) - [Radio Button](radio_overview.md) - [Static Picture](staticPicture.md) - [Subform](subform_overview.md#overview) - [Text Area](text.md) - [Web Area](webArea_overview.md#overview) + + + +--- +## Seleção de entidade ou coleção + +To use collection elements or entities to define the row contents of the list box. + +Enter an expression that returns either a collection or an entity selection. Usually, you will enter the name of a variable, a collection element or a property that contain a collection or an entity selection. + +The collection or the entity selection must be available to the form when it is loaded. Each element of the collection or each entity of the entity selection will be associated to a list box row and will be available as an object through the [This](https://doc.4d.com/4Dv17R6/4D/17-R6/This.301-4310806.en.html) command: + +* if you used a collection of objects, you can call **This** in the datasource expression to access each property value, for example **This.\**. +* if you used an entity selection, you can call **This** in the datasource expression to access each attribute value, for example **This.\**. +> > > If you used a collection of scalar values (and not objects), 4D allows you to display each value by calling **This.value** in the datasource expression. However in this case you will not be able to modify values or to access the current ite object (see below) Note: For information about entity selections, please refer to the [ORDA](https://doc.4d.com/4Dv17R6/4D/17-R6/ORDA.200-4354624.en.html) chapter. + +#### JSON Grammar + +| Nome | Tipo de dados | Possible Values | +| ---------- | ------------- | ------------------------------------------------------------ | +| dataSource | string | Expression that returns a collection or an entity selection. | + +#### Objects Supported + +[List Box](listbox_overview.md) + + + + + + +--- +## Fonte de dados + +Specify the type of list box. + +![](assets/en/FormObjects/listbox_dataSource.png) + +- **Arrays**(default): use array elements as the rows of the list box. +- **Current Selection**: use expressions, fields or methods whose values will be evaluated for each record of the current selection of a table. +- **Named Selection**: use expressions, fields or methods whose values will be evaluated for each record of a named selection. +- **Collection or Entity Selection**: use collection elements or entities to define the row contents of the list box. Note that with this list box type, you need to define the [Collection or Entity Selection](properties_Object.md#collection-or-entity-selection) property. + +#### JSON Grammar + +| Nome | Tipo de dados | Possible Values | +| ----------- | ------------- | ----------------------------------------------------------- | +| listboxType | string | "array", "currentSelection", "namedSelection", "collection" | + +#### Objects Supported + +[List Box](listbox_overview.md) + + + + + + +--- +## Plug-in Kind + +Name of the [plug-in external area](pluginArea_overview.md) associated to the object. Plug-in external area names are published in the manifest.json file of the plug-in. + + +#### JSON Grammar + +| Nome | Tipo de dados | Possible Values | +| -------------- | ------------- | ------------------------------------------------------------- | +| pluginAreaKind | string | Name of the plug-in external area (starts with a % character) | + + +#### Objects Supported +[Plug-in Area](pluginArea_overview.md) + + + +--- + +## Radio Group + +Enables radio buttons to be used in coordinated sets: only one button at a time can be selected in the set. + +#### JSON Grammar + +| Nome | Tipo de dados | Possible Values | +| ---------- | ------------- | ---------------- | +| radioGroup | string | Radio group name | + + +#### Objects Supported + +[Radio Button](radio_overview.md) + + + +--- + +## Título + +Allows inserting a label on an object. The font and the style of this label can be specified. + +You can force a carriage return in the label by using the \ character (backslash). + +![](assets/en/FormObjects/property_title.png) + +To insert a \ in the label, enter "\\". + +By default, the label is placed in the center of the object. When the object also contains an icon, you can modify the relative location of these two elements using the [Title/Picture Position](properties_TextAndPicture.md#title-picture-position) property. + +Para a tradução do banco de dados, pode introduzir uma referência XLIFF na área do título de um botão (ver [Apêndice B: arquitetura XLIFF](https://doc.4d.com/4Dv17R5/4D/17-R5/Appendix-B-XLIFF-architecture.300-4163748.en.html)). + +#### JSON Grammar + +| Nome | Tipo de dados | Possible Values | +| ----- | ------------- | --------------- | +| texto | string | qualquer texto | + +#### Objects Supported + +[Button](button_overview.md) - [Check Box](checkbox_overview.md) - [List Box Header](listbox_overview.md#list-box-headers) - [Radio Button](radio_overview.md) - [Text Area](text.md) + + + + + + + +--- +## Variable Calculation + +This property sets the type of calculation to be done in a [column footer](listbox_overview.md#list-box-footers) area. +> Ó cálculo de rodapés também pode ser definido com o comando 4D `LISTBOX SET FOOTER CALCULATION`. + +There are several types of calculations available. The following table shows which calculations can be used according to the type of data found in each column and indicates the type automatically affected by 4D to the footer variable (if it is not typed by the code): + +| Calculation | Num | Texto | Date | Hora | Bool | Pict | footer var type | +| --------------------- | --- | ----- | ---- | ---- | ---- | ---- | ------------------- | +| Mínimo | X | | X | X | X | | Same as column type | +| Máximo | X | | X | X | X | | Same as column type | +| Sum | X | | X | | X | | Same as column type | +| Contagem | X | X | X | X | X | X | Inteiro longo | +| Average | X | | | X | | | Real | +| Standard deviation(*) | X | | | X | | | Real | +| Variance(*) | X | | | X | | | Real | +| Sum squares(*) | X | | | X | | | Real | +| Custom ("none") | X | X | X | X | X | X | Qualquer | + +(*) Only for array type list boxes. + +When an automatic calculation is set, it is applied to all the values found in the list box column. Note that the calculation does not take the shown/hidden state of list box rows into account. If you want to restrict a calculation to only visible rows, you must use a custom calculation. + +When **Custom** ("none" in JSON) is set, no automatic calculations are performed by 4D and you must assign the value of the variable in this area by programming. +> Os cálculos automáticos não são compatíveis: * com rodapés de colunas baseadas em fórmulas, * os rodapés dos list boxes [Coleção e seleção de entidades](listbox_overview.md#collection-or-entity-selection-list-boxes). Precisa utilizar cálculos personalizados. + +#### JSON Grammar + +| Nome | Tipo de dados | Possible Values | +| ------------------- | ------------- | ----------------------------------------------------------------------------------------------------- | +| variableCalculation | string | "none", "minimum", "maximum", "sum", "count", "average", "standardDeviation", "variance", "sumSquare" | + +#### Objects Supported + +[List Box Footer](listbox_overview.md#list-box-footers) diff --git a/website/translated_docs/pt/FormObjects/properties_Picture.md b/website/translated_docs/pt/FormObjects/properties_Picture.md index 0edf708db43671..8ba103119a5339 100644 --- a/website/translated_docs/pt/FormObjects/properties_Picture.md +++ b/website/translated_docs/pt/FormObjects/properties_Picture.md @@ -1,33 +1,34 @@ --- id: propertiesPicture -title: Picture +title: Imagem --- -* * * - +--- ## Pathname Pathname of a static source picture for a [picture button](pictureButton_overview.md), [picture pop-up Menu](picturePopupMenu_overview.md), or [static picture](staticPicture.md). You must use the POSIX syntax. Two main locations can be used for static picture path: -- in the **Resources** folder of the project database. Appropriate when you want to share static pictures between several forms in the database. In this case, the Pathname is "/RESOURCES/\". +- na pasta **Resources** do banco de dados projeto. Apropriado quando quiser compartir imagens estáticas entre vários formulários do banco de dados. In this case, the Pathname is "/RESOURCES/\". - in an image folder (e.g. named **Images**) within the form folder. Appropriate when the static pictures are used only in the form and/or you want to be able to move or duplicate the whole form within the project or different projects. In this case, the Pathname is "\" and is resolved from the root of the form folder. + #### JSON Grammar -| Name | Data Type | Possible Values | -|:-------:|:---------:| ------------------------------------------- | -| picture | text | Relative or filesystem path in POSIX syntax | +| Nome | Tipo de dados | Possible Values | +|:------:|:-------------:| ------------------------------------------- | +| imagem | texto | Relative or filesystem path in POSIX syntax | #### Objects Supported [Picture button](pictureButton_overview.md) - [Picture Pop-up Menu](picturePopupMenu_overview.md) - [Static Picture](staticPicture.md) -* * * -## Display +--- +## Visualização + ### Scaled to fit @@ -37,7 +38,7 @@ The **Scaled to fit** format causes 4D to resize the picture to fit the dimensio ![](assets/en/FormObjects/property_pictureFormat_ScaledToFit.png) -### Replicated +### Replicado `JSON grammar: "tiled"` @@ -47,6 +48,8 @@ When the area that contains a picture with the **Replicated** format is enlarged If the field is reduced to a size smaller than that of the original picture, the picture is truncated (non-centered). + + ### Center / Truncated (non-centered) `JSON grammar: "truncatedCenter" / "truncatedTopLeft"` @@ -54,18 +57,17 @@ If the field is reduced to a size smaller than that of the original picture, the The **Center** format causes 4D to center the picture in the area and crop any portion that does not fit within the area. 4D crops equally from each edge and from the top and bottom. The **Truncated (non-centered)** format causes 4D to place the upper-left corner of the picture in the upper-left corner of the area and crop any portion that does not fit within the area. 4D crops from the right and bottom. - > When the picture format is **Truncated (non-centered)**, it is possible to add scroll bars to the input area. ![](assets/en/FormObjects/property_pictureFormat_Truncated.png) -#### JSON Grammar -| Name | Data Type | Possible Values | -| ------------- | --------- | -------------------------------------------------------- | -| pictureFormat | string | "scaled", "tiled", "truncatedCenter", "truncatedTopLeft" | +#### JSON Grammar +| Nome | Tipo de dados | Possible Values | +| ------------- | ------------- | -------------------------------------------------------- | +| pictureFormat | string | "scaled", "tiled", "truncatedCenter", "truncatedTopLeft" | #### Objects Supported -[Static Picture](staticPicture.md) \ No newline at end of file +[Static Picture](staticPicture.md) diff --git a/website/translated_docs/pt/FormObjects/properties_Plugins.md b/website/translated_docs/pt/FormObjects/properties_Plugins.md index 14c009dad37524..a0613897bba9ee 100644 --- a/website/translated_docs/pt/FormObjects/properties_Plugins.md +++ b/website/translated_docs/pt/FormObjects/properties_Plugins.md @@ -3,21 +3,22 @@ id: propertiesPlugIns title: Plug-ins --- -* * * - +--- ## Advanced Properties If advanced options are provided by the author of the plug-in, an **Advanced Properties** button may be enabled in the Property list. In this case, you can click this button to set these options, usually through a custom dialog box. Because the Advanced properties feature is under the control of the author of the plug-in, information about these Advanced options is the responsibility of the distributor of the plug-in. + + #### JSON Grammar -| Name | Data Type | Possible Values | -| ---------------- | --------- | ---------------------------------------------------------------------------------------------------------------------------- | -| customProperties | text | Plugin specific properties, passed to plugin as a JSON string if an object, or as a binary buffer if a base64 encoded string | +| Nome | Tipo de dados | Possible Values | +| ---------------- | ------------- | ---------------------------------------------------------------------------------------------------------------------------- | +| customProperties | texto | Plugin specific properties, passed to plugin as a JSON string if an object, or as a binary buffer if a base64 encoded string | #### Objects Supported -[Plug-in Area](pluginArea_overview.md) \ No newline at end of file +[Plug-in Area](pluginArea_overview.md) diff --git a/website/translated_docs/pt/FormObjects/properties_Print.md b/website/translated_docs/pt/FormObjects/properties_Print.md index 13f741bc815876..6c0973632a52a2 100644 --- a/website/translated_docs/pt/FormObjects/properties_Print.md +++ b/website/translated_docs/pt/FormObjects/properties_Print.md @@ -1,18 +1,18 @@ --- id: propertiesPrint -title: Print +title: Imprimir --- -* * * - +--- ## Print frame This property handles the print mode for objects whose size can vary from one record to another depending on their contents. These objects can be set to print with either a fixed or variable frame. Fixed frame objects print within the confines of the object as it was created on the form. Variable frame objects expand during printing to include the entire contents of the object. Note that the width of objects printed as a variable size is not affected by this property; only the height varies automatically based on the contents of the object. -You cannot place more than one variable frame object side-by-side on a form. You can place non-variable frame objects on either side of an object that will be printed with a variable size provided that the variable frame object is at least one line longer than the object beside it and that all objects are aligned on the top. If this condition is not respected, the contents of the other fields will be repeated for every horizontal slice of the variable frame object. +You cannot place more than one variable frame object side-by-side on a form. You can place non-variable frame objects on either side of an object that will be printed with a variable size provided that the variable frame object is at least one line longer than the object beside it and that all objects are aligned on the top. If this condition is not respected, the contents of the other fields will be repeated for every horizontal slice of the variable frame object. If this condition is not respected, the contents of the other fields will be repeated for every horizontal slice of the variable frame object. > The `Print object` and `Print form` commands do not support this property. + The print options are: - **Variable** option / **Print Variable Frame** checked: 4D enlarges or reduces the form object area in order to print all the subrecords. @@ -23,13 +23,14 @@ The print options are: > This property can be set by programming using the `OBJECT SET PRINT VARIABLE FRAME` command. + #### JSON Grammar -| Name | Data Type | Possible Values | -|:----------:|:---------:| --------------------------------------------------- | -| printFrame | string | "fixed", "variable", (subform only) "fixedMultiple" | +| Nome | Tipo de dados | Possible Values | +|:----------:|:-------------:| --------------------------------------------------- | +| printFrame | string | "fixed", "variable", (subform only) "fixedMultiple" | #### Objects Supported -[Input](input_overview.md) - [Subforms](subform_overview.md) (list subforms only) - [4D Write Pro areas](writeProArea_overview.md) \ No newline at end of file +[Input](input_overview.md) - [Subforms](subform_overview.md) (list subforms only) - [4D Write Pro areas](writeProArea_overview.md) diff --git a/website/translated_docs/pt/FormObjects/properties_RangeOfValues.md b/website/translated_docs/pt/FormObjects/properties_RangeOfValues.md index 31bd836443f4bb..1aee5fce692881 100644 --- a/website/translated_docs/pt/FormObjects/properties_RangeOfValues.md +++ b/website/translated_docs/pt/FormObjects/properties_RangeOfValues.md @@ -3,80 +3,76 @@ id: propertiesRangeOfValues title: Range of Values --- -* * * - +--- ## Default value You can assign a default value to be entered in an input object. This property is useful for example when the input [data source](properties_Object.md#variable-or-expression) is a field: the default value is entered when a new record is first displayed. You can change the value unless the input area has been defined as [non-enterable](properties_Entry.md#enterable). The default value can only be used if the [data source type](properties_Object.md#expression-type) is: - - text/string - number/integer - date - time -- boolean +- booleano 4D provides stamps for generating default values for the date, time, and sequence number. The date and time are taken from the system date and time. 4D automatically generates any sequence numbers needed. The table below shows the stamp to use to generate default values automatically: -| Stamp | Meaning | +| Stamp | Significado | | ----- | --------------- | | #D | Current date | | #H | Current time | | #N | Sequence number | - You can use a sequence number to create a unique number for each record in the table for the current data file. A sequence number is a longint that is generated for each new record. The numbers start at one (1) and increase incrementally by one (1). A sequence number is never repeated even if the record it is assigned to is deleted from the table. Each table has its own internal counter of sequence numbers. For more information, refer to the [Autoincrement](https://doc.4d.com/4Dv17R6/4D/17-R6/Field-properties.300-4354738.en.html#976029) paragraph. > Do not make confusion between this property and the "[default values](properties_DataSource.md#default-list-of-values)" property that allows to fill a list box column with static values. #### JSON Grammar -| Name | Data Type | Possible Values | +| Nome | Tipo de dados | Possible Values | | ------------ | ----------------------------------- | ------------------------------------------ | | defaultValue | string, number, date, time, boolean | Any value and/or a stamp: "#D", "#H", "#N" | - #### Objects Supported -[Input](input_overview.md) +[Entrada](input_overview.md) -* * * -## Excluded List -Allows setting a list whose values cannot be entered in the object. If an excluded value is entered, it is not accepted and an error message is displayed. +--- + +## Excluded List +Allows setting a list whose values cannot be entered in the object. Se um valor excluído for digitado, não será aceito e uma mensagem de erro é exibido. > If a specified list is hierarchical, only the items of the first level are taken into account. #### JSON Grammar -| Name | Data Type | Possible Values | -| ------------ | --------- | -------------------------------- | -| excludedList | list | A list of values to be excluded. | - +| Nome | Tipo de dados | Possible Values | +| ------------ | ------------- | -------------------------------- | +| excludedList | lista | A list of values to be excluded. | #### Objects Supported [Combo Box](comboBox_overview.md) - [List Box Column](listbox_overview.md#list-box-columns) - [Input](input_overview.md) -* * * + + +--- ## Required List Restricts the valid entries to the items on the list. For example, you may want to use a required list for job titles so that valid entries are limited to titles that have been approved by management. Making a list required does not automatically display the list when the field is selected. If you want to display the required list, assign the same list to the [Choice List](properties_DataSource.md#choice-list) property. However, unlike the [Choice List](properties_DataSource.md#choice-list) property, when a required list is defined, keyboard entry is no longer possible, only the selection of a list value using the pop-up menu is allowed. If different lists are defined using the [Choice List](properties_DataSource.md#choice-list) and Required List properties, the Required List property has priority. - > If a specified list is hierarchical, only the items of the first level are taken into account. #### JSON Grammar -| Name | Data Type | Possible Values | -| ------------ | --------- | --------------------------- | -| requiredList | list | A list of mandatory values. | - +| Nome | Tipo de dados | Possible Values | +| ------------ | ------------- | --------------------------- | +| requiredList | lista | A list of mandatory values. | #### Objects Supported -[Combo Box](comboBox_overview.md) - [List Box Column](listbox_overview.md#list-box-columns) - [Input](input_overview.md) \ No newline at end of file +[Combo Box](comboBox_overview.md) - [List Box Column](listbox_overview.md#list-box-columns) - [Input](input_overview.md) diff --git a/website/translated_docs/pt/FormObjects/properties_Reference.md b/website/translated_docs/pt/FormObjects/properties_Reference.md index 8ffce4257786fc..3b4376281af06a 100644 --- a/website/translated_docs/pt/FormObjects/properties_Reference.md +++ b/website/translated_docs/pt/FormObjects/properties_Reference.md @@ -4,616 +4,200 @@ title: JSON property list --- You will find in this page a comprehensive list of all object properties sorted through their JSON name. Click on a property name to access its detailed description. - > In the "Form Object Properties" chapter, properties are sorted according the Property List names and themes. + [a](#a) - [b](#b) - [c](#c) - [d](#d) - [e](#e) - [f](#f) - [g](#g) - [h](#h) - [i](#i) - [j](#j) - [k](#k) - [l](#l) - [m](#m) - [n](#n) - [p](#p) - [r](#r) - [s](#s) - [t](#t) - [u](#u) - [v](#v) - [w](#w) - [z](#z) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - Property - - Description - - Possible Values -
    - a - - -
    - action - - Typical activity to be performed. - - The name of a valid standard action. -
    - allowFontColorPicker - - Allows displaying system font picker or color picker to edit object attributes - - true, false (default) -
    - alternateFill - - Allows setting a different background color for odd-numbered rows/columns in a list box. - - Any CSS value; "transparent"; "automatic" -
    - automaticInsertion - - Enables automatically adding a value to a list when a user enters a value that is not in the object's associated choice list. - - true, false -
    - b - - -
    - booleanFormat - - Specifies only two possible values. - - true, false -
    - borderRadius - - The radius value for round rectangles. - - minimum: 0 -
    - borderStyle - - Allows setting a standard style for the object border. - - "system", "none", "solid", "dotted", "raised", "sunken", "double" -
    - bottom - - Positions an object at the bottom (centered). - - minimum: 0 -
    - c - - -
    - choiceList - - A list of choices associated with an object - - A list of choices -
    - class - - A list of space-separated words used as class selectors in css files. - - A list of class names -
    - columnCount - - Number of columns. - - minimum: 1 -
    - columns - - A collection of list box columns - - Collection of column objects with defined column properties -
    - contextMenu - - Provides the user access to a standard context menu in the selected area. - - "automatic", "none" -
    - continuousExecution - - Designates whether or not to run the method of an object while the user is tracking the control. - - true, false -
    - controlType - - Specifies how the value should be rendered in a list box cell. - - "input", "checkbox" (for boolean / numeric columns), "automatic", "popup" (only for boolean columns) -
    - currentItemSource - - The last selected item in a list box. - - Object expression -
    - currentItemPositionSource - - The position of the last selected item in a list box. - - Number expression -
    - customBackgroundPicture - - Sets the picture that will be drawn in the background of a button. - - Relative path in POSIX syntax. Must be used in conjunction with the style property with the "custom" option. -
    - customBorderX - - Sets the size (in pixels) of the internal horizontal margins of an object. Must be used with the style property with the "custom" option. - - minimum: 0 -
    - customBorderY - - Sets the size (in pixels) of the internal vertical margins of an object. Must be used with the style property with the "custom" option. - - minimum: 0 -
    - customOffset - - Sets a custom offset value in pixels. Must be used with the style property with the "custom" option. - - minimum: 0 -
    - customProperties - - Advanced properties (if any) - - JSON string or base64 encoded string -
    - d - - -
    - dataSource (objects)
    dataSource (subforms)
    dataSource (array list box)
    dataSource (Collection or entity selection list box)
    dataSource (list box column)
    dataSource (hierarchical list box) -
    - Specifies the source of the data. - - A 4D variable, field name, or an arbitrary complex language expression. -
    - dataSourceTypeHint (objects)
    dataSourceTypeHint (list box column) -
    - Indicates the variable type. - - "integer", "number", "boolean", "picture", "text", date", "time", "arrayText", "collection", "object", "undefined" -
    - dateFormat - - Controls the way dates appear when displayed or printed. Must only be selected among the 4D built-in formats. - - "systemShort", "systemMedium", "systemLong", "iso8601", "rfc822", "short", "shortCentury", "abbreviated", "long", "blankIfNull" (can be combined with the other possible values) -
    - defaultButton - - Modifies a button's appearance in order to indicate the recommended choice to the user. - - true, false -
    - defaultValue - - Defines a value or a stamp to be entered by default in an input object - - String or "#D", "#H", "#N" -
    - deletableInList - - Specifies if the user can delete subrecords in a list subform - - true, false -
    - detailForm (list box)
    detailForm (subform) -
    - Associates a detail form with a list subform. - - Name (string) of table or project form, a POSIX path (string) to a .json file describing the form, or an object describing the form -
    - display - - The object is drawn or not on the form. - - true, false -
    - doubleClickInEmptyAreaAction - - Action to perform in case of a double-click on an empty line of a list subform. - - "addSubrecord" or "" to do nothing -
    - doubleClickInRowAction (list box)
    doubleClickInRowAction (subform) -
    - Action to perform in case of a double-click on a record. - - "editSubrecord", "displaySubrecord" -
    - dpi - - Screen resolution for the 4D Write Pro area contents. - - 0=automatic, 72, 96 -
    - dragging - - Enables dragging function. - - "none", "custom", "automatic" (excluding list, list box) -
    - dropping - - Enables dropping function. - - "none", "custom", "automatic" (excluding list, list box) -
    - e - - -
    - enterable - - Indicates whether users can enter values into the object. - - true, false -
    - enterableInList - - Indicates whether users can modify record data directly in the list subform. - - true, false -
    -[entryFiler](properties_Entry.md#entry-filter)|Associates an entry filter with the object or column cells. This property is not accessible if the Enterable property is not enabled.|Text to narrow entries | |[events](https://doc.4d.com/4Dv18/4D/18/Form-Events.302-4504424.en.html)|List of all events selected for the object or form|Collection of event names, e.g. ["onClick","onDataChange"...].| |[excludedList](properties_RangeOfValues.md#excluded-list)|Allows setting a list whose values cannot be entered in the column.|A list of values to be excluded.| |**f**||| |[fill](properties_BackgroundAndBorder.md#background-color-fill-color)|Defines the background color of an object. |Any CSS value, "transparent", "automatic"| |[focusable](properties_Entry.md#focusable)|Indicates whether the object can have the focus (and can thus be activated by the keyboard for instance)|true, false| |[fontFamily](properties_Text.md#font)|Specifies the name of font family used in the object. |CSS font family name | -|[fontSize](properties_Text.md#font-size)|Sets the font size in points when no font theme is selected|minimum: 0| |[fontStyle](properties_Text.md#italic)|Sets the selected text to slant slightly to the right. |"normal", "italic"| |[fontTheme](properties_Text.md#font-theme)|Sets the automatic style |"normal", "main", "additional"| |[fontWeight](properties_Text.md#bold)|Sets the selected text to appear darker and heavier. | "normal", "bold"| |[footerHeight](properties_Footers.md#height)|Used to set the row height |pattern (\\d+)(p|em)?$ (positive decimal + px/em )| |[frameDelay](properties_Animation.md#switch-every-x-ticks)|Enables cycling through the contents of the picture button at the specified speed (in ticks).|minimum: 0| |**g**||| |[graduationStep](properties_Scale.md#graduation-step)| Scale display measurement.|minimum: 0| |**h**||| |[header](properties_Headers.md#header)|Defines the header of a list box column|Object with properties "text", "name", "icon", "dataSource", "fontWeight", "fontStyle", "tooltip" | |[headerHeight](properties_Headers.md#height)|Used to set the row height |pattern ^(\\d+)(px|em)?$ (positive decimal + px/em )| |[height](properties_CoordinatesAndSizing.md#height)|Designates an object's vertical size|minimum: 0| |[hideExtraBlankRows](properties_BackgroundAndBorder.md#hide-extra-blank-rows)|Deactivates the visibility of extra, empty rows. |true, false| |[hideFocusRing](properties_Appearance.md#hide-focus-rectangle)|Hides the selection rectangle when the object has the focus.|true, false| |[hideSystemHighlight](properties_Appearance.md#hide-selection-highlight)|Used to specify hiding highlighted records in the list box.|true, false| |[highlightSet](properties_ListBox.md#highlight-set)| string| Name of the set.| |[horizontalLineStroke](properties_Gridlines.md#horizontal-line-color)|Defines the color of the horizontal lines in a list box (gray by default).|Any CSS value, "'transparent", "automatic"| |**i**||| |[icon](properties_TextAndPicture.md#picture-pathname)|The pathname of the picture used for buttons, check boxes, radio buttons, list box headers.|Relative or filesystem path in POSIX syntax.| |[iconFrames](properties_TextAndPicture.md#number-of-states)|Sets the exact number of states present in the picture. |minimum: 1| |[iconPlacement](properties_TextAndPicture.md#icon-location)|Designates the placement of an icon in relation to the form object.|"none", "left", "right"| |**k**||| |[keyboardDialect](properties_Entry.md#keyboardDialect)|To associate a specific keyboard layout to an input.|A keyboard code string, e.g. "ar-ma"| |**l**||| |[labels](properties_DataSource.md#choice-list-static-list)|A list of values to be used as tab control labels|ex: "a", "b, "c", ...| -|[labelsPlacement](properties_Scale.md#label-location) (objects) -[labelsPlacement](properties_Appearance.md#tab-control-direction) (splitter / tab control)| Specifies the location of an object's displayed text.|"none", "top", "bottom", "left", "right"| |[layoutMode](properties_Appearance.md#view-mode) |Mode for displaying the 4D Write Pro document in the form area.|"page", "draft", "embedded"| |[left](properties_CoordinatesAndSizing.md#left)|Positions an object on the left.|minimum: 0| |list, see [choiceList](properties_DataSource.md#choice-list)|A list of choices associated with a hierarchical list|A list of choices| |[listboxType](properties_Object.md#data-source)|The list box data source.|"array", "currentSelection", "namedSelection", "collection"| |[listForm](properties_Subform.md#list-form)|List form to use in the subform.|Name (string) of table or project form, a POSIX path (string) to a .json file describing the form, or an object describing the form| |[lockedColumnCount](properties_ListBox.md#number-of-locked-columns) |Number of columns that must stay permanently displayed in the left part of a list box. |minimum: 0| |[loopBackToFirstFrame](properties_Animation.md#loop-back-to-first-frame)|Pictures are displayed in a continuous loop.|true, false| |**m**||| |[max](properties_Scale.md#maximum)|The maximum allowed value. For numeric steppers, these properties represent seconds when the object is associated with a time type value and are ignored when it is associated with a date type value. |minimum: 0 (for numeric data types)| |[maxWidth](properties_CoordinatesAndSizing.md#maximum-width)|Designates the largest size allowed for list box columns. |minimum: 0| |[metaSource](properties_Text.md#meta-info-expression)| A meta object containing style and selection settings.|An object expression| |[method](properties_Action.md#method)|A project method name. |The name of an existing project method| |[methodsAccessibility](properties_WebArea.md#access-4d-methods)|Which 4D methods can be called from a Web area|"none" (default), "all"| |[min](properties_Scale.md#minimum)|The minimum allowed value. For numeric steppers, these properties represent seconds when the object is associated with a time type value and are ignored when it is associated with a date type value.|minimum: 0 (for numeric data types)| |[minWidth](properties_CoordinatesAndSizing.md#minimum-width)|Designates the smallest size allowed for list box columns. |minimum: 0| |[movableRows](properties_Action.md#movable-rows)|Authorizes the movement of rows during execution. |true, false| |[multiline](properties_Entry.md#multiline)|Handles multiline contents. |"yes", "no", "automatic"| |**n**||| |[name](properties_Object.md#object-name)|The name of the form object. (Optional for the form)|Any name which does not belong to an already existing object| |[numberFormat](properties_Display.md#number-format) |Controls the way the alphanumeric fields and variables appear when displayed or printed.|Numbers (including a decimal point or minus sign if necessary)| |**p**||| |[picture](properties_Picture.md#pathname)|The pathname of the picture for picture buttons, picture pop-up menus, or static pictures|Relative or filesystem path in POSIX syntax.| |[pictureFormat](properties_Display.md#picture-format) (input, list box column or footer) -[pictureFormat](properties_Picture.md#display) (static picture)|Controls how pictures appear when displayed or printed.|"truncatedTopLeft", "scaled", "truncatedCenter", "tiled", "proportionalTopLeft" (excluding static pictures), "proportionalCenter"(excluding static pictures)| |[placeholder](properties_Entry.md#placeholder) |Grays out text when the data source value is empty.|Text to be grayed out.| |[pluginAreaKind](properties_Object.md#plug-in-kind)|Describes the type of plug-in. |The type of plug-in. | |[popupPlacement](properties_TextAndPicture.md#with-pop-up-menu) |Allows displaying a symbol that appears as a triangle in the button, which indicates that there is a pop-up menu attached. |"None", Linked", "Separated" | |[printFrame](properties_Print.md#print-frame)|Print mode for objects whose size can vary from one record to another depending on their contents |"fixed", "variable", (subform only) "fixedMultiple"| |[progressSource](properties_WebArea.md#progression)| A value between 0 and 100, representing the page load completion percentage in the Web area. Automatically updated by 4D, cannot be modified manually.|minimum: 0| |**r**||| |[radioGroup](properties_Object.md#radio-group)|Enables radio buttons to be used in coordinated sets: only one button at a time can be selected in the set.| Radio group name| |[requiredList](properties_RangeOfValues.md#required-list)|Allows setting a list where only certain values can be inserted. |A list of mandatory values.| |[resizable](properties_ResizingOptions.md#resizable)|Designates if the size of an object can be modified by the user.|"true", "false"| |[resizingMode](properties_ResizingOptions.md#column-auto-resizing)|Specifies if a list box column should be automatically resized | "rightToLeft", "legacy"| |[right](properties_CoordinatesAndSizing.md#right)|Positions an object on the right.|minimum: 0| |[rowControlSource](properties_ListBox.md#row-control-array) |A 4D array defining the list box rows. |Array| |[rowCount](properties_Crop.md#rows)|Sets the number of rows.|minimum: 1| |[rowFillSource](properties_BackgroundAndBorder.md#row-background-color-array) (array list box) -[rowFillSource](properties_BackgroundAndBorder.md#background-color-expression) (selection or collection list box)|The name of an array or expression to apply a custom background color to each row of a list box. |The name of an array or expression.| |[rowHeight](properties_CoordinatesAndSizing.md#row-height)|Sets the height of list box rows. |CSS value unit "em" or "px" (default)| |[rowHeightAuto](properties_CoordinatesAndSizing.md#automatic-row-height)|boolean |"true", "false"| |[rowHeightAutoMax](properties_CoordinatesAndSizing.md#maximum-width)|Designates the largest height allowed for list box rows. |CSS value unit "em" or "px" (default). minimum: 0| |[rowHeightAutoMin](properties_CoordinatesAndSizing.md#minimum-width)|Designates the smallest height allowed for list box rows. |CSS value unit "em" or "px" (default). minimum: 0| |[rowHeightSource](properties_CoordinatesAndSizing.md#row-height-array)|An array defining different heights for the rows in a list box. |Name of a 4D array variable.| |[rowStrokeSource](properties_Text.md#row-font-color-array) (array list box) -[rowStrokeSource](properties_Text.md#font-color-expression) (selection or collection/entity selection list box)|An array or expression for managing row colors.|Name of array or expression.| |[rowStyleSource](properties_Text.md#row-style-array) (array list box) -[rowStyleSource](properties_Text.md#style-expression) (selection or collection/entity selection list box)|An array or expression for managing row styles.|Name of array or expression.| |**s**||| |[scrollbarHorizontal](properties_Appearance.md#horizontal-scroll-bar) | A tool allowing the user to move the viewing area to the left or right.|"visible", "hidden", "automatic"| |[scrollbarVertical](properties_Appearance.md#vertical-scroll-bar) | A tool allowing the user to move the viewing area up or down.|"visible", "hidden", "automatic"| |[selectedItemsSource](properties_DataSource.md#selected-items)|Collection of the selected items in a list box.|Collection expression | |[selectionMode](properties_Action.md#multi-selectable) (hierarchical list) -[selectionMode](properties_ListBox.md#selection-mode) (list box) -[selectionMode](properties_Subform.md#selection-mode) (subform)|Allows the selection of multiple records/rows.|"multiple", "single", "none" |[shortcutAccel](properties_Entry.md#shortcut)|Specifies the system to use, Windows or Mac.|true, false| |[shortcutAlt](properties_Entry.md#shortcut)|Designates the Alt key|true, false| |[shortcutCommand](properties_Entry.md#shortcut)|Designates the Command key (macOS)|true, false| |[shortcutControl](properties_Entry.md#shortcut)|Designates the Control key (Windows)|true, false| |[shortcutKey](properties_Entry.md#shortcut)|The letter or name of a special meaning key.|"[F1]" -> "[F15]", "[Return]", "[Enter]", "[Backspace]", "[Tab]", "[Esc]", "[Del]", "[Home]", "[End]", "[Help]", "[Page up]", "[Page down]", "[left arrow]", "[right arrow]", "[up arrow]", "[down arrow]"| |[shortcutShift](properties_Entry.md#shortcut) |Designates the Shift key |true, false| |[showFooters](properties_Footers.md#display-headers)|Displays or hides column footers. |true, false| |[showGraduations](properties_Scale.md#display-graduation)|Displays/Hides the graduations next to the labels. |true, false| |[showHeaders](properties_Headers.md#display-headers)|Displays or hides column headers. |true, false| |[showHiddenChars](properties_Appearance.md#show-hidden-characters)|Displays/hides invisible characters.|true, false| |[showHorizontalRuler](properties_Appearance.md#show-horizontal-ruler)|Displays/hides the horizontal ruler when the document view is in Page view mode|true, false| |[showHTMLWysiwyg](properties_Appearance.md#show-html-wysiwyg)|Enables/disables the HTML WYSIWYG view|true, false| |[showPageFrames](properties_Appearance.md#show-page-frame)|Displays/hides the page frame when the document view is in Page view mode|true, false| |[showReferences](properties_Appearance.md#show-references)|Displays all 4D expressions inserted in the 4D Write Pro document as *references*|true, false| |[showSelection](properties_Entry.md#selection-always-visible)|Keeps the selection visible within the object after it has lost the focus |true, false| -|[showVerticalRuler](properties_Appearance.md#show-vertical-ruler)|Displays/hides the vertical ruler when the document view is in Page view mode|true, false| |[singleClickEdit](properties_Entry.md#single-click-edit)|Enables direct passage to edit mode.|true, false| |[sizingX](properties_ResizingOptions.md#horizontal-sizing)|Specifies if the horizontal size of an object should be moved or resized when a user resizes the form.|"grow", "move", "fixed"| |[sizingY](properties_ResizingOptions.md#horizontal-sizing)|Specifies if the vertical size of an object should be moved or resized when a user resizes the form.|"grow", "move", "fixed"| |[sortable](properties_Action.md#sortable)| Allows sorting column data by clicking the header.|true, false| |[spellcheck](properties_Entry.md#auto-spellcheck)|Activates the spell-check for the object |true, false| -|[splitterMode](properties_ResizingOptions.md#pusher)|When a splitter object has this property, other objects to its right (vertical splitter) or below it (horizontal splitter) are pushed at the same time as the splitter, with no stop.|"grow", "move", "fixed"| |[startPoint](shapes_overview.md#startpoint-property)|Starting point for drawing a line object (only available in JSON Grammar).|"bottomLeft", topLeft"| |[staticColumnCount](properties_ListBox.md#number-of-static-columns) | Number of columns that cannot be moved during execution.|minimum: 0| |[step](properties_Scale.md#step)| Minimum interval accepted between values during use. For numeric steppers, this property represents seconds when the object is associated with a time type value and days when it is associated with a date type value.|minimum: 1| |[storeDefaultStyle](properties_Text.md#store-with-default-style-tags)|Store the style tags with the text, even if no modification has been made|true, false| |[stroke](properties_Text.md#font-color) (text) -[stroke](properties_BackgroundAndBorder.md#line-color) (lines) -[stroke](properties_BackgroundAndBorder.md#transparent) (list box)|Specifies the color of the font or line used in the object. |Any CSS value, "transparent", "automatic"| |[strokeDashArray](properties_BackgroundAndBorder.md#dotted-line-type)|Describes dotted line type as a sequence of black and white points|Number array or string| |[strokeWidth](properties_BackgroundAndBorder.md#line-width) |Designates the thickness of a line.|An integer or 0 for smallest width on a printed form| |[style](properties_TextAndPicture.md#multi-style)|Enables the possibility of using specific styles in the selected area.|true, false| |[styledText](properties_Text.md#style)|Allows setting the general appearance of the button. See Button Style for more information.|"regular", "flat", "toolbar", "bevel", "roundedBevel", "gradientBevel", "texturedBevel", "office", "help", "circular", "disclosure", "roundedDisclosure", "custom"| |[switchBackWhenReleased](properties_Animation.md#switch-back-when-released)|Displays the first picture all the time except when the user clicks the button. Displays the second picture until the mouse button is released.|true, false| |[switchContinuously](properties_Animation.md#switch-continuously-on-clicks)|Allows the user to hold down the mouse button to display the pictures continuously (i.e., as an animation).|true, false| |[switchWhenRollover](properties_Animation.md#switch-when-roll-over)|Modifies the contents of the picture button when the mouse cursor passes over it. The initial picture is displayed when the cursor leaves the button’s area.|true, false| |**t**||| |[table](properties_Subform.md#source)|Table that the list subform belongs to (if any).|4D table name, or ""| |[text](properties_Object.md#title)|The title of the form object|Any text| |[textAlign](properties_Text.md#horizontal-alignment)|Horizontal location of text within the area that contains it. |"automatic", "right", "center", "justify", "left"| |[textAngle](properties_Text.md#orientation)|Modifies the orientation (rotation) of the text area. |0, 90, 180, 270| |[textDecoration](properties_Text.md#underline)|Sets the selected text to have a line running beneath it.|"normal", "underline"| |[textFormat](properties_Display.md#alpha-format)|Controls the way the alphanumeric fields and variables appear when displayed or printed.|"### ####", "(###) ### ####", "### ### ####", "### ## ####", "00000", custom formats| |[textPlacement](properties_TextAndPicture.md#title-picture-position)|Relative location of the button title in relation to the associated icon.|"left", "top", "right", "bottom", "center"| |[threeState](properties_Display.md#three-states)|Allows a check box object to accept a third state.|true, false| |[timeFormat](properties_Display.md#time-format)|Controls the way times appear when displayed or printed. Must only be selected among the 4D built-in formats. |"systemShort", "systemMedium", "systemLong", "iso8601", "hh_mm_ss", "hh_mm", "hh_mm_am", "mm_ss", "HH_MM_SS", "HH_MM", "MM_SS", "blankIfNull" (can be combined with the other possible values)| |[truncateMode](properties_Display.md#truncate-with-ellipsis) | Controls the display of values when list box columns are too narrow to show their full contents.|"withEllipsis", "none" | |[type](properties_Object.md#type)|Mandatory. Designates the data type of the form object.|"text", "rectangle", "groupBox", "tab", "line", "button", "checkbox", "radio", "dropdown", "combo", "webArea", "write", "subform", "plugin", "splitter", "buttonGrid", "progress", "ruler", "spinner", "stepper", "list", "pictureButton", "picturePopup", "listbox", "input", "view"| |[tooltip](properties_Help.md)| Provide users with additional information about a field.|Additional information to help a user| |[top](properties_CoordinatesAndSizing.md#top)|Positions an object at the top (centered).|minimum: 0| |**u**||| |[urlSource](properties_WebArea.md#url)|Designates the the URL loaded or being loading by the associated Web area. |A URL.| |[useLastFrameAsDisabled](properties_Animation.md#use-last-frame-as-disabled)|Enables setting the last thumbnail as the one to display when the button is disabled.|true, false| |[userInterface](properties_Appearance.md#user-interface)|4D View Pro area interface.|"none" (default), "ribbon", "toolbar"| |**v**||| |[values](properties_DataSource.md#default-list-values)|List of default values for an array listbox column|ex: "A","B","42"...| |[variableCalculation](properties_Object.md#variable-calculation)|Allows mathematical calculations to be performed.|"none", "minimum", "maximum", "sum", "count", "average", "standardDeviation", "variance", "sumSquare"| |[verticalAlign](properties_Text.md#vertical-alignment)|Vertical location of text within the area that contains it. |"automatic", "top", "middle", "bottom"| |[verticalLineStroke](properties_Gridlines.md#vertical-line-color)|Defines the color of the vertical lines in a list box (gray by default).|Any CSS value, "'transparent", "automatic"| |[visibility](properties_Display.md#visibility)|Allows hiding the object in the Application environment.|"visible", "hidden", "selectedRows", "unselectedRows"| |**w**||| |[webEngine](properties_WebArea.md#use-embedded-web-rendering-engine)| Used to choose between two rendering engines for the Web area, depending on the specifics of the application.|"embedded", "system"| |[width](properties_CoordinatesAndSizing.md#width)|Designates an object's horizontal size|minimum: 0| |[withFormulaBar](properties_Appearance.md#show-formula-bar)|Manages the display of a formula bar with the Toolbar interface in the 4D View Pro area.|true, false| |[wordwrap](properties_Display.md#wordwrap) |Manages the display of contents when it exceeds the width of the object. | "automatic" (excluding list box), "normal", "none"| |**z**||| |[zoom](properties_Appearance.md#zoom)|Zoom percentage for displaying 4D Write Pro area|number (minimum=0)| \ No newline at end of file +| Propriedade | Descrição | Possible Values | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| **a** | | | +| [action](properties_Action.md#standard-action) | Typical activity to be performed. | The name of a valid standard action. | +| [allowFontColorPicker](properties_Text.md#allow-font-color-picker) | Allows displaying system font picker or color picker to edit object attributes | true, false (default) | +| [alternateFill](properties_BackgroundAndBorder.md#alternate-background-color) | Allows setting a different background color for odd-numbered rows/columns in a list box. | Any CSS value; "transparent"; "automatic" | +| [automaticInsertion](properties_DataSource.md#automatic-insertion) | Enables automatically adding a value to a list when a user enters a value that is not in the object's associated choice list. | true, false | +| **b** | | | +| [booleanFormat](properties_Display.md#text-when-false-text-when-true) | Specifies only two possible values. | true, false | +| [borderRadius](properties_CoordinatesAndSizing.md#corner-radius) | The radius value for round rectangles. | mínimo: 0 | +| [borderStyle](properties_BackgroundAndBorder.md#border-line-style-dotted-line-type) | Allows setting a standard style for the object border. | "system", "none", "solid", "dotted", "raised", "sunken", "double" | +| [bottom](properties_CoordinatesAndSizing.md#bottom) | Positions an object at the bottom (centered). | mínimo: 0 | +| **c** | | | +| [choiceList](properties_DataSource.md#choice-list) | A list of choices associated with an object | A list of choices | +| [class](properties_Object.md#css-class) | A list of space-separated words used as class selectors in css files. | A list of class names | +| [columnCount](properties_Crop.md#columns) | Number of columns. | mínimo: 1 | +| [columns](properties_ListBox.md#columns) | A collection of list box columns | Collection of column objects with defined column properties | +| [contextMenu](properties_Entry.md#context-menu) | Provides the user access to a standard context menu in the selected area. | "automatic", "none" | +| [continuousExecution](properties_Action.md#execute-object-method) | Designates whether or not to run the method of an object while the user is tracking the control. | true, false | +| [controlType](properties_Display.md#display-type) | Specifies how the value should be rendered in a list box cell. | "input", "checkbox" (for boolean / numeric columns), "automatic", "popup" (only for boolean columns) | +| [currentItemSource](properties_DataSource.md#current-item) | The last selected item in a list box. | Object expression | +| [currentItemPositionSource](properties_DataSource.md#current-item-position) | The position of the last selected item in a list box. | Number expression | +| [customBackgroundPicture](properties_TextAndPicture.md#background-pathname) | Sets the picture that will be drawn in the background of a button. | Relative path in POSIX syntax. Must be used in conjunction with the style property with the "custom" option. | +| [customBorderX](properties_TextAndPicture.md#horizontal-margin) | Sets the size (in pixels) of the internal horizontal margins of an object. Must be used with the style property with the "custom" option. | mínimo: 0 | +| [customBorderY](properties_TextAndPicture.md#vertical-margin) | Sets the size (in pixels) of the internal vertical margins of an object. Must be used with the style property with the "custom" option. | mínimo: 0 | +| [customOffset](properties_TextAndPicture.md#icon-offset) | Sets a custom offset value in pixels. Must be used with the style property with the "custom" option. | mínimo: 0 | +| [customProperties](properties_Plugins.md#advanced-properties) | Advanced properties (if any) | JSON string or base64 encoded string | +| **d** | | | +| [dataSource](properties_Object.md#variable-or-expression) (objects)
    [dataSource](properties_Subform.md#source) (subforms)
    [dataSource](properties_Object.md#data-source) (array list box)
    [dataSource](properties_Object.md#collection-or-entity-selection) (Collection or entity selection list box)
    [dataSource](properties_DataSource.md#expression) (list box column)
    [dataSource](properties_Hierarchy.md#hierarchical-list-box) (hierarchical list box) | Specifies the source of the data. | A 4D variable, field name, or an arbitrary complex language expression. | +| [dataSourceTypeHint](properties_Object.md#expression-type) (objects)
    [dataSourceTypeHint](properties_DataSource.md#data-type) (list box column) | Indicates the variable type. | "integer", "number", "boolean", "picture", "text", date", "time", "arrayText", "collection", "object", "undefined" | +| [dateFormat](properties_Display.md#date-format) | Controls the way dates appear when displayed or printed. Must only be selected among the 4D built-in formats. | "systemShort", "systemMedium", "systemLong", "iso8601", "rfc822", "short", "shortCentury", "abbreviated", "long", "blankIfNull" (can be combined with the other possible values) | +| [defaultButton](properties_Appearance.md#default-button) | Modifies a button's appearance in order to indicate the recommended choice to the user. | true, false | +| [defaultValue](properties_RangeOfValues.md#default-value) | Defines a value or a stamp to be entered by default in an input object | String or "#D", "#H", "#N" | +| [deletableInList](properties_Subform.md#allow-deletion) | Specifies if the user can delete subrecords in a list subform | true, false | +| [detailForm](properties_ListBox.md#detail-form-name) (list box)
    [detailForm](properties_Subform.md#detail-form) (subform) | Associates a detail form with a list subform. | Name (string) of table or project form, a POSIX path (string) to a .json file describing the form, or an object describing the form | +| [display](properties_Display.md#not-rendered) | The object is drawn or not on the form. | true, false | +| [doubleClickInEmptyAreaAction](properties_Subform.md#double-click-on-empty-row) | Action to perform in case of a double-click on an empty line of a list subform. | "addSubrecord" or "" to do nothing | +| [doubleClickInRowAction](properties_ListBox.md#double-click-on-row) (list box)
    [doubleClickInRowAction](properties_Subform.md#double-click-on-row) (subform) | Action to perform in case of a double-click on a record. | "editSubrecord", "displaySubrecord" | +| [dpi](properties_Appearance.md#resolution) | Screen resolution for the 4D Write Pro area contents. | 0=automatic, 72, 96 | +| [dragging](properties_Action.md#draggable) | Enables dragging function. | "none", "custom", "automatic" (excluding list, list box) | +| [dropping](properties_Action.md#droppable) | Enables dropping function. | "none", "custom", "automatic" (excluding list, list box) | +| **e** | | | +| [enterable](properties_Entry.md#enterable) | Indicates whether users can enter values into the object. | true, false | +| [enterableInList](properties_Subform.md#enterable-in-list) | Indicates whether users can modify record data directly in the list subform. | true, false | +| [entryFiler](properties_Entry.md#entry-filter) | Associates an entry filter with the object or column cells. This property is not accessible if the Enterable property is not enabled. | Text to narrow entries | +| [events](https://doc.4d.com/4Dv18/4D/18/Form-Events.302-4504424.en.html) | List of all events selected for the object or form | Collection of event names, e.g. ["onClick","onDataChange"...]. | +| [excludedList](properties_RangeOfValues.md#excluded-list) | Allows setting a list whose values cannot be entered in the column. | A list of values to be excluded. | +| **f** | | | +| [fill](properties_BackgroundAndBorder.md#background-color-fill-color) | Defines the background color of an object. | Any CSS value, "transparent", "automatic" | +| [focusable](properties_Entry.md#focusable) | Indicates whether the object can have the focus (and can thus be activated by the keyboard for instance) | true, false | +| [fontFamily](properties_Text.md#font) | Specifies the name of font family used in the object. | CSS font family name | +| [fontSize](properties_Text.md#font-size) | Sets the font size in points when no font theme is selected | mínimo: 0 | +| [fontStyle](properties_Text.md#italic) | Sets the selected text to slant slightly to the right. | "normal", "italic" | +| [fontTheme](properties_Text.md#font-theme) | Sets the automatic style | "normal", "main", "additional" | +| [fontWeight](properties_Text.md#bold) | Sets the selected text to appear darker and heavier. | "normal", "bold" | +| [footerHeight](properties_Footers.md#height) | Used to set the row height | pattern (\\d+)(p|em)?$ (positive decimal + px/em ) | +| [frameDelay](properties_Animation.md#switch-every-x-ticks) | Enables cycling through the contents of the picture button at the specified speed (in ticks). | mínimo: 0 | +| **g** | | | +| [graduationStep](properties_Scale.md#graduation-step) | Scale display measurement. | mínimo: 0 | +| **h** | | | +| [header](properties_Headers.md#headers) | Defines the header of a list box column | Object with properties "text", "name", "icon", "dataSource", "fontWeight", "fontStyle", "tooltip" | +| [headerHeight](properties_Headers.md#height) | Used to set the row height | pattern ^(\\d+)(px|em)?$ (positive decimal + px/em ) | +| [height](properties_CoordinatesAndSizing.md#height) | Designates an object's vertical size | mínimo: 0 | +| [hideExtraBlankRows](properties_BackgroundAndBorder.md#hide-extra-blank-rows) | Deactivates the visibility of extra, empty rows. | true, false | +| [hideFocusRing](properties_Appearance.md#hide-focus-rectangle) | Hides the selection rectangle when the object has the focus. | true, false | +| [hideSystemHighlight](properties_Appearance.md#hide-selection-highlight) | Used to specify hiding highlighted records in the list box. | true, false | +| [highlightSet](properties_ListBox.md#highlight-set) | string | Name of the set. | +| [horizontalLineStroke](properties_Gridlines.md#horizontal-line-color) | Defines the color of the horizontal lines in a list box (gray by default). | Any CSS value, "'transparent", "automatic" | +| **i** | | | +| [icon](properties_TextAndPicture.md#picture-pathname) | The pathname of the picture used for buttons, check boxes, radio buttons, list box headers. | Relative or filesystem path in POSIX syntax. | +| [iconFrames](properties_TextAndPicture.md#number-of-states) | Sets the exact number of states present in the picture. | mínimo: 1 | +| [iconPlacement](properties_TextAndPicture.md#icon-location) | Designates the placement of an icon in relation to the form object. | "none", "left", "right" | +| **k** | | | +| [keyboardDialect](properties_Entry.md#keyboardDialect) | To associate a specific keyboard layout to an input. | A keyboard code string, e.g. "ar-ma" | +| **l** | | | +| [labels](properties_DataSource.md#choice-list-static-list) | A list of values to be used as tab control labels | ex: "a", "b, "c", ... | +| [labelsPlacement](properties_Scale.md#label-location) (objetos)
    [labelsPlacement](properties_Appearance.md#tab-control-direction) (splitter / aba) | Specifies the location of an object's displayed text. | "none", "top", "bottom", "left", "right" | +| [layoutMode](properties_Appearance.md#view-mode) | Mode for displaying the 4D Write Pro document in the form area. | "page", "draft", "embedded" | +| [left](properties_CoordinatesAndSizing.md#left) | Positions an object on the left. | mínimo: 0 | +| list, see [choiceList](properties_DataSource.md#choice-list) | A list of choices associated with a hierarchical list | A list of choices | +| [listboxType](properties_Object.md#data-source) | The list box data source. | "array", "currentSelection", "namedSelection", "collection" | +| [listForm](properties_Subform.md#list-form) | List form to use in the subform. | Name (string) of table or project form, a POSIX path (string) to a .json file describing the form, or an object describing the form | +| [lockedColumnCount](properties_ListBox.md#number-of-locked-columns) | Number of columns that must stay permanently displayed in the left part of a list box. | mínimo: 0 | +| [loopBackToFirstFrame](properties_Animation.md#loop-back-to-first-frame) | Pictures are displayed in a continuous loop. | true, false | +| **m** | | | +| [max](properties_Scale.md#maximum) | The maximum allowed value. For numeric steppers, these properties represent seconds when the object is associated with a time type value and are ignored when it is associated with a date type value. | minimum: 0 (for numeric data types) | +| [maxWidth](properties_CoordinatesAndSizing.md#maximum-width) | Designates the largest size allowed for list box columns. | mínimo: 0 | +| [metaSource](properties_Text.md#meta-info-expression) | A meta object containing style and selection settings. | An object expression | +| [method](properties_Action.md#method) | A project method name. | The name of an existing project method | +| [methodsAccessibility](properties_WebArea.md#access-4d-methods) | Which 4D methods can be called from a Web area | "none" (default), "all" | +| [min](properties_Scale.md#minimum) | The minimum allowed value. For numeric steppers, these properties represent seconds when the object is associated with a time type value and are ignored when it is associated with a date type value. | minimum: 0 (for numeric data types) | +| [minWidth](properties_CoordinatesAndSizing.md#minimum-width) | Designates the smallest size allowed for list box columns. | mínimo: 0 | +| [movableRows](properties_Action.md#movable-rows) | Authorizes the movement of rows during execution. | true, false | +| [multiline](properties_Entry.md#multiline) | Handles multiline contents. | "yes", "no", "automatic" | +| **n** | | | +| [name](properties_Object.md#object-name) | The name of the form object. (Optional for the form) | Any name which does not belong to an already existing object | +| [numberFormat](properties_Display.md#number-format) | Controls the way the alphanumeric fields and variables appear when displayed or printed. | Numbers (including a decimal point or minus sign if necessary) | +| **p** | | | +| [picture](properties_Picture.md#pathname) | The pathname of the picture for picture buttons, picture pop-up menus, or static pictures | Relative or filesystem path in POSIX syntax. | +| [pictureFormat](properties_Display.md#picture-format) (input, list box column or footer)
    [pictureFormat](properties_Picture.md#display) (static picture) | Controls how pictures appear when displayed or printed. | "truncatedTopLeft", "scaled", "truncatedCenter", "tiled", "proportionalTopLeft" (excluding static pictures), "proportionalCenter"(excluding static pictures) | +| [placeholder](properties_Entry.md#placeholder) | Grays out text when the data source value is empty. | Text to be grayed out. | +| [pluginAreaKind](properties_Object.md#plug-in-kind) | Describes the type of plug-in. | The type of plug-in. | +| [popupPlacement](properties_TextAndPicture.md#with-pop-up-menu) | Allows displaying a symbol that appears as a triangle in the button, which indicates that there is a pop-up menu attached. | "None", Linked", "Separated" | +| [printFrame](properties_Print.md#print-frame) | Print mode for objects whose size can vary from one record to another depending on their contents | "fixed", "variable", (subform only) "fixedMultiple" | +| [progressSource](properties_WebArea.md#progression) | A value between 0 and 100, representing the page load completion percentage in the Web area. Automatically updated by 4D, cannot be modified manually. | mínimo: 0 | +| **r** | | | +| [radioGroup](properties_Object.md#radio-group) | Enables radio buttons to be used in coordinated sets: only one button at a time can be selected in the set. | Radio group name | +| [requiredList](properties_RangeOfValues.md#required-list) | Allows setting a list where only certain values can be inserted. | A list of mandatory values. | +| [resizable](properties_ResizingOptions.md#resizable) | Designates if the size of an object can be modified by the user. | "true", "false" | +| [resizingMode](properties_ResizingOptions.md#column-auto-resizing) | Specifies if a list box column should be automatically resized | "rightToLeft", "legacy" | +| [direita](properties_CoordinatesAndSizing.md#right) | Positions an object on the right. | mínimo: 0 | +| [rowControlSource](properties_ListBox.md#row-control-array) | A 4D array defining the list box rows. | Array | +| [rowCount](properties_Crop.md#rows) | Sets the number of rows. | mínimo: 1 | +| [rowFillSource](properties_BackgroundAndBorder.md#row-background-color-array) (array list box)
    [rowFillSource](properties_BackgroundAndBorder.md#background-color-expression) (selection or collection list box) | The name of an array or expression to apply a custom background color to each row of a list box. | The name of an array or expression. | +| [rowHeight](properties_CoordinatesAndSizing.md#row-height) | Sets the height of list box rows. | CSS value unit "em" or "px" (default) | +| [rowHeightAuto](properties_CoordinatesAndSizing.md#automatic-row-height) | booleano | "true", "false" | +| [rowHeightAutoMax](properties_CoordinatesAndSizing.md#maximum-width) | Designates the largest height allowed for list box rows. | CSS value unit "em" or "px" (default). mínimo: 0 | +| [rowHeightAutoMin](properties_CoordinatesAndSizing.md#minimum-width) | Designates the smallest height allowed for list box rows. | CSS value unit "em" or "px" (default). mínimo: 0 | +| [rowHeightSource](properties_CoordinatesAndSizing.md#row-height-array) | An array defining different heights for the rows in a list box. | Name of a 4D array variable. | +| [rowStrokeSource](properties_Text.md#row-font-color-array) (array list box)
    [rowStrokeSource](properties_Text.md#font-color-expression) (selection or collection/entity selection list box) | An array or expression for managing row colors. | Name of array or expression. | +| [rowStyleSource](properties_Text.md#row-style-array) (array list box)
    [rowStyleSource](properties_Text.md#style-expression) (selection or collection/entity selection list box) | An array or expression for managing row styles. | Name of array or expression. | +| **s** | | | +| [scrollbarHorizontal](properties_Appearance.md#horizontal-scroll-bar) | A tool allowing the user to move the viewing area to the left or right. | "visible", "hidden", "automatic" | +| [scrollbarVertical](properties_Appearance.md#vertical-scroll-bar) | A tool allowing the user to move the viewing area up or down. | "visible", "hidden", "automatic" | +| [selectedItemsSource](properties_DataSource.md#selected-items) | Collection of the selected items in a list box. | Collection expression | +| [selectionMode](properties_Action.md#multi-selectable) (hierarchical list)
    [selectionMode](properties_ListBox.md#selection-mode) (list box)
    [selectionMode](properties_Subform.md#selection-mode) (subform) | Allows the selection of multiple records/rows. | "multiple", "single", "none" | +| [shortcutAccel](properties_Entry.md#shortcut) | Specifies the system to use, Windows or Mac. | true, false | +| [shortcutAlt](properties_Entry.md#shortcut) | Designates the Alt key | true, false | +| [shortcutCommand](properties_Entry.md#shortcut) | Designates the Command key (macOS) | true, false | +| [shortcutControl](properties_Entry.md#shortcut) | Designates the Control key (Windows) | true, false | +| [shortcutKey](properties_Entry.md#shortcut) | The letter or name of a special meaning key. | "[F1]" -> "[F15]", "[Return]", "[Enter]", "[Backspace]", "[Tab]", "[Esc]", "[Del]", "[Home]", "[End]", "[Help]", "[Page up]", "[Page down]", "[left arrow]", "[right arrow]", "[up arrow]", "[down arrow]" | +| [shortcutShift](properties_Entry.md#shortcut) | Designates the Shift key | true, false | +| [showFooters](properties_Footers.md#display-footers) | Displays or hides column footers. | true, false | +| [showGraduations](properties_Scale.md#display-graduation) | Displays/Hides the graduations next to the labels. | true, false | +| [showHeaders](properties_Headers.md#display-headers) | Displays or hides column headers. | true, false | +| [showHiddenChars](properties_Appearance.md#show-hidden-characters) | Displays/hides invisible characters. | true, false | +| [showHorizontalRuler](properties_Appearance.md#show-horizontal-ruler) | Displays/hides the horizontal ruler when the document view is in Page view mode | true, false | +| [showHTMLWysiwyg](properties_Appearance.md#show-html-wysiwyg) | Enables/disables the HTML WYSIWYG view | true, false | +| [showPageFrames](properties_Appearance.md#show-page-frame) | Displays/hides the page frame when the document view is in Page view mode | true, false | +| [showReferences](properties_Appearance.md#show-references) | Displays all 4D expressions inserted in the 4D Write Pro document as *references* | true, false | +| [showSelection](properties_Entry.md#selection-always-visible) | Keeps the selection visible within the object after it has lost the focus | true, false | +| [showVerticalRuler](properties_Appearance.md#show-vertical-ruler) | Displays/hides the vertical ruler when the document view is in Page view mode | true, false | +| [singleClickEdit](properties_Entry.md#single-click-edit) | Enables direct passage to edit mode. | true, false | +| [sizingX](properties_ResizingOptions.md#horizontal-sizing) | Specifies if the horizontal size of an object should be moved or resized when a user resizes the form. | "grow", "move", "fixed" | +| [sizingY](properties_ResizingOptions.md#horizontal-sizing) | Specifies if the vertical size of an object should be moved or resized when a user resizes the form. | "grow", "move", "fixed" | +| [sortable](properties_Action.md#sortable) | Allows sorting column data by clicking the header. | true, false | +| [spellcheck](properties_Entry.md#auto-spellcheck) | Activates the spell-check for the object | true, false | +| [splitterMode](properties_ResizingOptions.md#pusher) | When a splitter object has this property, other objects to its right (vertical splitter) or below it (horizontal splitter) are pushed at the same time as the splitter, with no stop. | "grow", "move", "fixed" | +| [startPoint](shapes_overview.md#startpoint-property) | Starting point for drawing a line object (only available in JSON Grammar). | "bottomLeft", topLeft" | +| [staticColumnCount](properties_ListBox.md#number-of-static-columns) | Number of columns that cannot be moved during execution. | mínimo: 0 | +| [step](properties_Scale.md#step) | Minimum interval accepted between values during use. For numeric steppers, this property represents seconds when the object is associated with a time type value and days when it is associated with a date type value. | mínimo: 1 | +| [storeDefaultStyle](properties_Text.md#store-with-default-style-tags) | Store the style tags with the text, even if no modification has been made | true, false | +| [stroke](properties_Text.md#font-color) (texto)
    [stroke](properties_BackgroundAndBorder.md#line-color) (linhas)
    [stroke](properties_BackgroundAndBorder.md#transparent) (list box) | Specifies the color of the font or line used in the object. | Any CSS value, "transparent", "automatic" | +| [strokeDashArray](properties_BackgroundAndBorder.md#dotted-line-type) | Describes dotted line type as a sequence of black and white points | Number array or string | +| [strokeWidth](properties_BackgroundAndBorder.md#line-width) | Designates the thickness of a line. | An integer or 0 for smallest width on a printed form | +| [style](properties_TextAndPicture.md#multi-style) | Allows setting the general appearance of the button. See Button Style for more information. | "regular", "flat", "toolbar", "bevel", "roundedBevel", "gradientBevel", "texturedBevel", "office", "help", "circular", "disclosure", "roundedDisclosure", "custom" | +| [styledText](properties_Text.md#style) | Enables the possibility of using specific styles in the selected area. | true, false | +| [switchBackWhenReleased](properties_Animation.md#switch-back-when-released) | Displays the first picture all the time except when the user clicks the button. Displays the second picture until the mouse button is released. | true, false | +| [switchContinuously](properties_Animation.md#switch-continuously-on-clicks) | Allows the user to hold down the mouse button to display the pictures continuously (i.e., as an animation). | true, false | +| [switchWhenRollover](properties_Animation.md#switch-when-roll-over) | Modifies the contents of the picture button when the mouse cursor passes over it. The initial picture is displayed when the cursor leaves the button’s area. | true, false | +| **t** | | | +| [tabela](properties_Subform.md#source) | Table that the list subform belongs to (if any). | 4D table name, or "" | +| [texto](properties_Object.md#title) | The title of the form object | Qualquer texto | +| [textAlign](properties_Text.md#horizontal-alignment) | Horizontal location of text within the area that contains it. | "automatic", "right", "center", "justify", "left" | +| [textAngle](properties_Text.md#orientation) | Modifies the orientation (rotation) of the text area. | 0, 90, 180, 270 | +| [textDecoration](properties_Text.md#underline) | Sets the selected text to have a line running beneath it. | "normal", "underline" | +| [textFormat](properties_Display.md#alpha-format) | Controls the way the alphanumeric fields and variables appear when displayed or printed. | "### ####", "(###) ### ####", "### ### ####", "### ## ####", "00000", custom formats | +| [textPlacement](properties_TextAndPicture.md#title-picture-position) | Relative location of the button title in relation to the associated icon. | "left", "top", "right", "bottom", "center" | +| [threeState](properties_Display.md#three-states) | Allows a check box object to accept a third state. | true, false | +| [timeFormat](properties_Display.md#time-format) | Controls the way times appear when displayed or printed. Must only be selected among the 4D built-in formats. | "systemShort", "systemMedium", "systemLong", "iso8601", "hh_mm_ss", "hh_mm", "hh_mm_am", "mm_ss", "HH_MM_SS", "HH_MM", "MM_SS", "blankIfNull" (can be combined with the other possible values) | +| [truncateMode](properties_Display.md#truncate-with-ellipsis) | Controls the display of values when list box columns are too narrow to show their full contents. | "withEllipsis", "none" | +| [type](properties_Object.md#type) | Mandatory. Designates the data type of the form object. | "text", "rectangle", "groupBox", "tab", "line", "button", "checkbox", "radio", "dropdown", "combo", "webArea", "write", "subform", "plugin", "splitter", "buttonGrid", "progress", "ruler", "spinner", "stepper", "list", "pictureButton", "picturePopup", "listbox", "input", "view" | +| [tooltip](properties_Help.md) | Provide users with additional information about a field. | Additional information to help a user | +| [top](properties_CoordinatesAndSizing.md#top) | Positions an object at the top (centered). | mínimo: 0 | +| **u** | | | +| [urlSource](properties_WebArea.md#url) | Designates the the URL loaded or being loading by the associated Web area. | A URL. | +| [useLastFrameAsDisabled](properties_Animation.md#use-last-frame-as-disabled) | Enables setting the last thumbnail as the one to display when the button is disabled. | true, false | +| [userInterface](properties_Appearance.md#user-interface) | 4D View Pro area interface. | "none" (default), "ribbon", "toolbar" | +| **v** | | | +| [values](properties_DataSource.md#default-list-values) | List of default values for an array listbox column | ex: "A","B","42"... | +| [variableCalculation](properties_Object.md#variable-calculation) | Allows mathematical calculations to be performed. | "none", "minimum", "maximum", "sum", "count", "average", "standardDeviation", "variance", "sumSquare" | +| [verticalAlign](properties_Text.md#vertical-alignment) | Vertical location of text within the area that contains it. | "automatic", "top", "middle", "bottom" | +| [verticalLineStroke](properties_Gridlines.md#vertical-line-color) | Defines the color of the vertical lines in a list box (gray by default). | Any CSS value, "'transparent", "automatic" | +| [visibility](properties_Display.md#visibility) | Allows hiding the object in the Application environment. | "visible", "hidden", "selectedRows", "unselectedRows" | +| **w** | | | +| [webEngine](properties_WebArea.md#use-embedded-web-rendering-engine) | Used to choose between two rendering engines for the Web area, depending on the specifics of the application. | "embedded", "system" | +| [width](properties_CoordinatesAndSizing.md#width) | Designates an object's horizontal size | mínimo: 0 | +| [withFormulaBar](properties_Appearance.md#show-formula-bar) | Manages the display of a formula bar with the Toolbar interface in the 4D View Pro area. | true, false | +| [wordwrap](properties_Display.md#wordwrap) | Manages the display of contents when it exceeds the width of the object. | "automatic" (excluding list box), "normal", "none" | +| **z** | | | +| [zoom](properties_Appearance.md#zoom) | Zoom percentage for displaying 4D Write Pro area | number (minimum=0) | diff --git a/website/translated_docs/pt/FormObjects/properties_ResizingOptions.md b/website/translated_docs/pt/FormObjects/properties_ResizingOptions.md index 745cb7cb83ee98..df13f413f674b4 100644 --- a/website/translated_docs/pt/FormObjects/properties_ResizingOptions.md +++ b/website/translated_docs/pt/FormObjects/properties_ResizingOptions.md @@ -3,9 +3,8 @@ id: propertiesResizingOptions title: Resizing Options --- -* * * - -## Column Auto-Resizing +--- +## Autodimensionamento coluna When this property is enabled (`rightToLeft` value in JSON), list box columns are automatically resized along with the list box, within the limits of the [minimum](properties_CoordinatesAndSizing.md#minimum-width) and [maximum](properties_CoordinatesAndSizing.md#maximum-width) widths defined. @@ -13,13 +12,13 @@ When this property is disabled (`legacy` value in JSON), only the rightmost colu ### How column auto-resizing works -* As the list box width increases, its columns are enlarged, one by one, starting from right to left, until each reaches its [maximum width](properties_CoordinatesAndSizing.md#maximum-width). Only columns with the [Resizable](#resizable) property selected are resized. +* As the list box width increases, its columns are enlarged, one by one, starting from right to left, until each reaches its [maximum width](properties_CoordinatesAndSizing.md#maximum-width). Only columns with the [Resizable](#resizable) property selected are resized. -* The same procedure applies when the list box width decreases, but in reverse order (*i.e.*, columns are resized starting from left to right). When each column has reached its [minimum width](properties_CoordinatesAndSizing.md#minimum-width), the horizontal scroll bar becomes active again. +* The same procedure applies when the list box width decreases, but in reverse order (*i.e.*, columns are resized starting from left to right). When each column has reached its [minimum width](properties_CoordinatesAndSizing.md#minimum-width), the horizontal scroll bar becomes active again. -* Columns are resized only when the horizontal scroll bar is not "active"; *i.e.*, all columns are fully visible in the list box at its current size. **Note**: If the horizontal scroll bar is hidden, this does not alter its state: a scroll bar may still be active, even though it is not visible. +* Columns are resized only when the horizontal scroll bar is not "active"; *i.e.*, all columns are fully visible in the list box at its current size. **Note**: If the horizontal scroll bar is hidden, this does not alter its state: a scroll bar may still be active, even though it is not visible. -* After all columns reach their maximum size, they are no longer enlarged and instead a blank (fake) column is added on the right to fill the extra space. If a fake (blank) column is present, when the list box width decreases, this is the first area to be reduced. +* After all columns reach their maximum size, they are no longer enlarged and instead a blank (fake) column is added on the right to fill the extra space. If a fake (blank) column is present, when the list box width decreases, this is the first area to be reduced. ![](assets/en/FormObjects/property_columnAutoResizing.png) @@ -31,75 +30,72 @@ The fake header and/or footer can be clicked but this does not have any effect o If a cell in the fake column is clicked, the [LISTBOX GET CELL POSITION](https://doc.4d.com/4Dv17R6/4D/17-R6/LISTBOX-GET-CELL-POSITION.301-4311145.en.html) command returns "X+1" for its column number (where X is the number of existing columns). -#### JSON Grammar -| Name | Data Type | Possible Values | -| ------------ | --------- | ----------------------- | -| resizingMode | string | "rightToLeft", "legacy" | +#### JSON Grammar +| Nome | Tipo de dados | Possible Values | +| ------------ | ------------- | ----------------------- | +| resizingMode | string | "rightToLeft", "legacy" | #### Objects Supported [List Box](listbox_overview.md) -* * * -## Horizontal Sizing -This property specifies if the horizontal size of an object should be moved or resized when a user resizes the form. It can also be set dynamically by the `OBJECT SET RESIZING OPTIONS` language command. -Three options are available: +--- +## Dimensionamento horizontal -| Option | JSON value | Result | -| ------ | ---------- | ---------------------------------------------------------------------------------------------------------------------- | -| Grow | "grow" | The same percentage is applied to the object’s width when the user resizes the width of the window, | -| Move | "move" | The object is moved the same amount left or right as the width increase when the user resizes the width of the window, | -| None | "fixed" | The object remains stationary when the form is resized | +This property specifies if the horizontal size of an object should be moved or resized when a user resizes the form. It can also be set dynamically by the `OBJECT SET RESIZING OPTIONS` language command. +Three options are available: +| Option | Valor JSON | Resultado | +| -------- | ---------- | ---------------------------------------------------------------------------------------------------------------------- | +| Agrandar | "grow" | The same percentage is applied to the object’s width when the user resizes the width of the window, | +| Mover | "move" | The object is moved the same amount left or right as the width increase when the user resizes the width of the window, | +| Nenhum | "fixed" | The object remains stationary when the form is resized | > This property works in conjunction with the [Vertical Sizing](#vertical-sizing) property. #### JSON Grammar -| Name | Data Type | Possible Values | -| ------- | --------- | ----------------------- | -| sizingX | string | "grow", "move", "fixed" | - +| Nome | Tipo de dados | Possible Values | +| ------- | ------------- | ----------------------- | +| sizingX | string | "grow", "move", "fixed" | #### Objects Supported [4D View Pro Area](viewProArea_overview.md) - [4D Write Pro Area](writeProArea_overview.md) - [Button](button_overview.md) - [Button Grid](buttonGrid_overview.md) - [Check Box](checkbox_overview.md) - [Combo Box](comboBox_overview.md) - [Dropdown list](dropdownList_Overview.md) - [Group Box](groupBox.md) - [Hierarchical List](list_overview.md#overview) - [Input](input_overview.md) - [List Box](listbox_overview.md#overview) - [Line](shapes_overview.md#line) - [List Box Column](listbox_overview.md#list-box-columns) - [Oval](shapes_overview.md#oval) - [Picture Button](pictureButton_overview.md) - [Picture Pop up menu](picturePopupMenu_overview.md) - [Plug-in Area](pluginArea_overview.md#overview) - [Progress Indicators](progressIndicator.md) - [Radio Button](radio_overview.md) - [Ruler](ruler.md) - [Rectangle](shapes_overview.md#rectangle) - [Spinner](spinner.md) - [Splitter](splitters.md) - [Static Picture](staticPicture.md) - [Stepper](stepper.md) - [Subform](subform_overview.md) - [Tab control](tabControl.md) - [Web Area](webArea_overview.md#overview) -* * * -## Vertical Sizing +--- +## Dimensionamento vertical This property specifies if the vertical size of an object should be moved or resized when a user resizes the form. It can also be set dynamically by the `OBJECT SET RESIZING OPTIONS` language command. Three options are available: -| Option | JSON value | Result | -| ------ | ---------- | -------------------------------------------------------------------------------------------------------------------- | -| Grow | "grow" | The same percentage is applied to the object's height when the user resizes the width of the window, | -| Move | "move" | The object is moved the same amount up or down as the height increase when the user resizes the width of the window, | -| None | "fixed" | The object remains stationary when the form is resized | - - +| Option | Valor JSON | Resultado | +| -------- | ---------- | -------------------------------------------------------------------------------------------------------------------- | +| Agrandar | "grow" | The same percentage is applied to the object's height when the user resizes the width of the window, | +| Mover | "move" | The object is moved the same amount up or down as the height increase when the user resizes the width of the window, | +| Nenhum | "fixed" | The object remains stationary when the form is resized | > This property works in conjunction with the [Horizontal Sizing](#horizontal-sizing) property. #### JSON Grammar -| Name | Data Type | Possible Values | -| ------- | --------- | ----------------------- | -| sizingY | string | "grow", "move", "fixed" | - +| Nome | Tipo de dados | Possible Values | +| ------- | ------------- | ----------------------- | +| sizingY | string | "grow", "move", "fixed" | #### Objects Supported [4D View Pro Area](viewProArea_overview.md) - [4D Write Pro Area](writeProArea_overview.md) - [Button](button_overview.md) - [Button Grid](buttonGrid_overview.md) - [Check Box](checkbox_overview.md) - [Combo Box](comboBox_overview.md) - [Dropdown list](dropdownList_Overview.md) - [Group Box](groupBox.md) - [Hierarchical List](list_overview.md#overview) - [Input](input_overview.md) - [List Box](listbox_overview.md#overview) - [Line](shapes_overview.md#line) - [List Box Column](listbox_overview.md#list-box-columns) - [Oval](shapes_overview.md#oval) - [Picture Button](pictureButton_overview.md) - [Picture Pop up menu](picturePopupMenu_overview.md) - [Plug-in Area](pluginArea_overview.md#overview) - [Progress Indicators](progressIndicator.md) - [Radio Button](radio_overview.md) - [Ruler](ruler.md) - [Rectangle](shapes_overview.md#rectangle) - [Spinner](spinner.md) - [Splitter](splitters.md) - [Static Picture](staticPicture.md) - [Stepper](stepper.md) - [Subform](subform_overview.md) - [Tab control](tabControl.md) - [Web Area](webArea_overview.md#overview) -* * * + +--- ## Pusher When a splitter object has this property, other objects to its right (vertical splitter) or below it (horizontal splitter) are pushed at the same time as the splitter, with no stop. @@ -112,30 +108,31 @@ When this property is not applied to the splitter, the result is as follows: ![](assets/en/FormObjects/splitter_pusher2.png) -#### JSON Grammar -| Name | Data Type | Possible Values | -|:------------ |:---------:|:------------------------------------:| -| splitterMode | string | "move" (pusher), "resize" (standard) | +#### JSON Grammar +| Nome | Tipo de dados | Possible Values | +|:------------ |:-------------:|:------------------------------------:| +| splitterMode | string | "move" (pusher), "resize" (standard) | #### Objects Supported -[Splitter](splitterTabControlOverview#splitters) +[Separador](splitterTabControlOverview#splitters) + + -* * * +--- ## Resizable Designates if the size of the column can be modified by the user. #### JSON Grammar -| Name | Data Type | Possible Values | -|:--------- |:---------:|:---------------:| -| resizable | boolean | "true", "false" | - +| Nome | Tipo de dados | Possible Values | +|:--------- |:-------------:|:---------------:| +| resizable | booleano | "true", "false" | #### Objects Supported -[List Box Column](listbox_overview.md#list-box-columns) \ No newline at end of file +[List Box Column](listbox_overview.md#list-box-columns) diff --git a/website/translated_docs/pt/FormObjects/properties_Scale.md b/website/translated_docs/pt/FormObjects/properties_Scale.md index 6409f6aaae0d3a..ccaf4447fc65e5 100644 --- a/website/translated_docs/pt/FormObjects/properties_Scale.md +++ b/website/translated_docs/pt/FormObjects/properties_Scale.md @@ -1,61 +1,61 @@ --- id: propertiesScale -title: Scale +title: Escala --- -* * * - +--- ## Barber shop Enables the "barber shop" variant for the thermometer. #### JSON Grammar -| Name | Data Type | Possible Values | -|:---------------:|:---------:| ----------------------------------------------------------- | -| [max](#maximum) | number | NOT passed = enabled; passed = disabled (basic thermometer) | - +| Nome | Tipo de dados | Possible Values | +|:---------------:|:-------------:| ----------------------------------------------------------- | +| [max](#maximum) | number | NOT passed = enabled; passed = disabled (basic thermometer) | #### Objects Supported [Barber shop](progressIndicator.md#barber-shop) -* * * + +--- ## Display graduation Displays/Hides the graduations next to the labels. #### JSON Grammar -| Name | Data Type | Possible Values | -|:---------------:|:---------:| --------------- | -| showGraduations | boolean | "true", "false" | - +| Nome | Tipo de dados | Possible Values | +|:---------------:|:-------------:| --------------- | +| showGraduations | booleano | "true", "false" | #### Objects Supported [Thermometer](progressIndicator.md#thermometer) - [Ruler](ruler.md#ruler) -* * * + +--- ## Graduation step Scale display measurement. #### JSON Grammar -| Name | Data Type | Possible Values | -|:--------------:|:---------:| --------------- | -| graduationStep | integer | minimum: 0 | +| Nome | Tipo de dados | Possible Values | +|:--------------:|:-------------:| --------------- | +| graduationStep | integer | mínimo: 0 | #### Objects Supported [Thermometer](progressIndicator.md#thermometer) - [Ruler](ruler.md#ruler) -* * * + +--- ## Label Location Specifies the location of an object's displayed text. @@ -66,18 +66,18 @@ Specifies the location of an object's displayed text. #### JSON Grammar -| Name | Data Type | Possible Values | -|:---------------:|:---------:| ---------------------------------------- | -| labelsPlacement | string | "none", "top", "bottom", "left", "right" | - +| Nome | Tipo de dados | Possible Values | +|:---------------:|:-------------:| ---------------------------------------- | +| labelsPlacement | string | "none", "top", "bottom", "left", "right" | #### Objects Supported [Thermometer](progressIndicator.md#thermometer) - [Ruler](ruler.md#ruler) -* * * -## Maximum + +--- +## Máximo Maximum value of an indicator. @@ -86,45 +86,46 @@ Maximum value of an indicator. #### JSON Grammar -| Name | Data Type | Possible Values | +| Nome | Tipo de dados | Possible Values | |:----:|:---------------:| ----------------------------------- | | max | string / number | minimum: 0 (for numeric data types) | - #### Objects Supported [Thermometer](progressIndicator.md#thermometer) - [Ruler](ruler.md#ruler) - [Stepper](stepper.md#stepper) -* * * -## Minimum + +--- +## Mínimo Minimum value of an indicator. For numeric steppers, this property represent seconds when the object is associated with a time type value and are ignored when it is associated with a date type value. #### JSON Grammar -| Name | Data Type | Possible Values | +| Nome | Tipo de dados | Possible Values | |:----:|:---------------:| ----------------------------------- | | min | string / number | minimum: 0 (for numeric data types) | - #### Objects Supported [Thermometer](progressIndicator.md#thermometer) - [Ruler](ruler.md#ruler) - [Stepper](stepper.md#stepper) -* * * + + +--- ## Step Minimum interval accepted between values during use. For numeric steppers, this property represents seconds when the object is associated with a time type value and days when it is associated with a date type value. #### JSON Grammar -| Name | Data Type | Possible Values | -|:----:|:---------:| --------------- | -| step | integer | minimum: 1 | +| Nome | Tipo de dados | Possible Values | +|:----:|:-------------:| --------------- | +| step | integer | mínimo: 1 | #### Objects Supported -[Thermometer](progressIndicator.md#thermometer) - [Ruler](ruler.md#ruler) - [Stepper](stepper.md#stepper) \ No newline at end of file +[Thermometer](progressIndicator.md#thermometer) - [Ruler](ruler.md#ruler) - [Stepper](stepper.md#stepper) diff --git a/website/translated_docs/pt/FormObjects/properties_Subform.md b/website/translated_docs/pt/FormObjects/properties_Subform.md index 14ea6d2193615f..6eb2cc2fd48b39 100644 --- a/website/translated_docs/pt/FormObjects/properties_Subform.md +++ b/website/translated_docs/pt/FormObjects/properties_Subform.md @@ -3,82 +3,75 @@ id: propertiesSubform title: Subform --- -* * * - +--- ## Allow Deletion Specifies if the user can delete subrecords in a list subform. #### JSON Grammar -| Name | Data Type | Possible Values | -| --------------- | --------- | --------------------------- | -| deletableInList | boolean | true, false (default: true) | - +| Nome | Tipo de dados | Possible Values | +| --------------- | ------------- | --------------------------- | +| deletableInList | booleano | true, false (default: true) | #### Objects Supported [Subform](subform_overview.md) -* * * -## Detail Form +--- +## Formulário detalhado You use this property to declare the detail form to use in the subform. It can be: -- a widget, i.e. a page-type subform endowed with specific functions. In this case, the [list subform](#list-form) and [Source](#source) properties must be empty or not present. - You can select a component form name when it is published in the component. - +- a widget, i.e. a page-type subform endowed with specific functions. In this case, the [list subform](#list-form) and [Source](#source) properties must be empty or not present. + You can select a component form name when it is published in the component. > You can generate [components](Concepts/components.md) providing additional functionalities through subforms. - the detail form to associate a with the [list subform](#list-form). The detail form can be used to enter or view subrecords. It generally contains more information than the list subform. Naturally, the detail form must belong to the same table as the subform. You normally use an Output form as the list form and an Input form as the detail form. If you do not specify the form to use for full page entry, 4D automatically uses the default Input format of the table. -#### JSON Grammar -| Name | Data Type | Possible Values | -| ---------- | --------- | ----------------------------------------------------------------------------------------------------------------------------------- | -| detailForm | string | Name (string) of table or project form, a POSIX path (string) to a .json file describing the form, or an object describing the form | +#### JSON Grammar +| Nome | Tipo de dados | Possible Values | +| ---------- | ------------- | ----------------------------------------------------------------------------------------------------------------------------------- | +| detailForm | string | Name (string) of table or project form, a POSIX path (string) to a .json file describing the form, or an object describing the form | #### Objects Supported [Subform](subform_overview.md) -* * * - +--- ## Double-click on empty row Action to perform in case of a double-click on an empty line of a list subform. The following options are available: - - Do nothing: Ignores double-click. - Add Record: Creates a new record in the subform and changes to editing mode. The record will be created directly in the list if the [Enterable in List] property is enabled. Otherwise, it will be created in page mode, in the [detail form](detail-form) associated with the subform. -#### JSON Grammar -| Name | Data Type | Possible Values | -| ---------------------------- | --------- | ---------------------------------- | -| doubleClickInEmptyAreaAction | string | "addSubrecord" or "" to do nothing | +#### JSON Grammar +| Nome | Tipo de dados | Possible Values | +| ---------------------------- | ------------- | ---------------------------------- | +| doubleClickInEmptyAreaAction | string | "addSubrecord" or "" to do nothing | #### Objects Supported [Subform](subform_overview.md) -#### See also - +#### Veja também [Double click on row](#double-click-on-row) -* * * - -## Double-click on row +--- +## Duplo clique em linha `List subform` Sets the action to be performed when a user double-clicks on a row in a list subform. The available options are: -* **Do nothing** (default): Double-clicking a row does not trigger any automatic action. -* **Edit Record**: Double-clicking a row displays the corresponding record in the [detail form defined for the list subform](#detail-form). The record is opened in read-write mode so it can be modified. -* **Display Record**: Identical to the previous action, except that the record is opened in read-only mode so it cannot be modified. +* **Do nothing** (default): Double-clicking a row does not trigger any automatic action. +* **Edit Record**: Double-clicking a row displays the corresponding record in the [detail form defined for the list subform](#detail-form). The record is opened in read-write mode so it can be modified. +* **Display Record**: Identical to the previous action, except that the record is opened in read-only mode so it cannot be modified. Regardless of the action selected/chosen, the `On Double clicked` form event is generated. @@ -86,97 +79,91 @@ For the last two actions, the On `Open Detail` form event is also generated. The #### JSON Grammar -| Name | Data Type | Possible Values | -| ---------------------- | --------- | ----------------------------------- | -| doubleClickInRowAction | string | "editSubrecord", "displaySubrecord" | - +| Nome | Tipo de dados | Possible Values | +| ---------------------- | ------------- | ----------------------------------- | +| doubleClickInRowAction | string | "editSubrecord", "displaySubrecord" | #### Objects Supported [Subform](subform_overview.md) -#### See also +#### Veja também [Double click on empty row](#double-click-on-empty-row) -* * * - +--- ## Enterable in list When a list subform has this property enabled, the user can modify record data directly in the list, without having to use the [associated detail form](#detail-form). > To do this, simply click twice on the field to be modified in order to switch it to editing mode (make sure to leave enough time between the two clicks so as not to generate a double-click). + #### JSON Grammar -| Name | Data Type | Possible Values | -| --------------- | --------- | --------------- | -| enterableInList | boolean | true, false | +| Nome | Tipo de dados | Possible Values | +| --------------- | ------------- | --------------- | +| enterableInList | booleano | true, false | #### Objects Supported [Subform](subform_overview.md) -* * * +--- ## List Form You use this property to declare the list form to use in the subform. A list subform lets you enter, view, and modify data in other tables. List subforms can be used for data entry in two ways: the user can enter data directly in the subform, or enter it in an [input form](#detail-form). In this configuration, the form used as the subform is referred to as the List form. The input form is referred to as the Detail form. -You can also allow the user to enter data in the List form. - #### JSON Grammar -| Name | Data Type | Possible Values | -| -------- | --------- | ----------------------------------------------------------------------------------------------------------------------------------- | -| listForm | string | Name (string) of table or project form, a POSIX path (string) to a .json file describing the form, or an object describing the form | - +| Nome | Tipo de dados | Possible Values | +| -------- | ------------- | ----------------------------------------------------------------------------------------------------------------------------------- | +| listForm | string | Name (string) of table or project form, a POSIX path (string) to a .json file describing the form, or an object describing the form | #### Objects Supported [Subform](subform_overview.md) -* * * + +--- ## Source Specifies the table that the list subform belongs to (if any). #### JSON Grammar -| Name | Data Type | Possible Values | -| ----- | --------- | --------------------------------- | -| table | string | 4D table name, or "" if no table. | - +| Nome | Tipo de dados | Possible Values | +| ------ | ------------- | --------------------------------- | +| tabela | string | 4D table name, or "" if no table. | #### Objects Supported [Subform](subform_overview.md) -* * * - -## Selection Mode +--- +## Modo seleção Designates the option for allowing users to select rows: - - **None**: Rows cannot be selected if this mode is chosen. Clicking on the list will have no effect unless the [Enterable in list](subform_overview.md#enterable-in-list) option is enabled. The navigation keys only cause the list to scroll; the `On Selection Change` form event is not generated. - **Single**: One row at a time can be selected in this mode. Clicking on a row will select it. A **Ctrl+click** (Windows) or **Command+click** (macOS) on a row toggles its state (between selected or not). - The Up and Down arrow keys select the previous/next row in the list. The other navigation keys scroll the list. The `On Selection Change` form event is generated every time the current row is changed. -- **Multiple**: Several rows can be selected simultaneously in this mode. + The Up and Down arrow keys select the previous/next row in the list. The other navigation keys scroll the list. The `On Selection Change` form event is generated every time the current row is changed. +- **Multiple**: Several rows can be selected simultaneously in this mode. - The selected subrecords are returned by the `GET HIGHLIGHTED RECORDS` command. - Clicking on the record will select it, but it does not modify the current record. - A **Ctrl+click** (Windows) or **Command+click** (macOS) on a record toggles its state (between selected or not). The Up and Down arrow keys select the previous/next record in the list. The other navigation keys scroll the list. The `On Selection Change` form event is generated every time the selected record is changed. -#### JSON Grammar -| Name | Data Type | Possible Values | -| ------------- | --------- | ---------------------------- | -| selectionMode | string | "multiple", "single", "none" | +#### JSON Grammar +| Nome | Tipo de dados | Possible Values | +| ------------- | ------------- | ---------------------------- | +| selectionMode | string | "multiple", "single", "none" | #### Objects Supported -[Subform](subform_overview.md) \ No newline at end of file +[Subform](subform_overview.md) diff --git a/website/translated_docs/pt/FormObjects/properties_Text.md b/website/translated_docs/pt/FormObjects/properties_Text.md index e1fb6ee303bdbf..fd345b4259b13d 100644 --- a/website/translated_docs/pt/FormObjects/properties_Text.md +++ b/website/translated_docs/pt/FormObjects/properties_Text.md @@ -1,97 +1,91 @@ --- id: propertiesText -title: Text +title: Texto --- -* * * - +--- ## Allow font/color picker When this property is enabled, the [OPEN FONT PICKER](https://doc.4d.com/4Dv18/4D/18/OPEN-FONT-PICKER.301-4505612.en.html) and [OPEN COLOR PICKER](https://doc.4d.com/4Dv18/4D/18/OPEN-COLOR-PICKER.301-4505611.en.html) commands can be called to display the system font and color picker windows. Using these windows, the users can change the font or color of a form object that has the focus directly by clicking. When this property is disabled (default), the open picker commands have no effect. -#### JSON Grammar -| Property | Data Type | Possible Values | -| -------------------- | --------- | --------------------- | -| allowFontColorPicker | boolean | false (default), true | +#### JSON Grammar +| Propriedade | Tipo de dados | Possible Values | +| -------------------- | ------------- | --------------------- | +| allowFontColorPicker | booleano | false (default), true | #### Objects Supported -[Input](input_overview.md) - -* * * +[Entrada](input_overview.md) -## Bold +--- +## Negrito Sets the selected text to appear darker and heavier. You can set this property using the [**OBJECT SET FONT STYLE**](https://doc.4d.com/4Dv17R5/4D/17-R5/OBJECT-SET-FONT-STYLE.301-4128244.en.html) command. - -> This is normal text. -> **This is bold text.** +> This is normal text.
    **This is bold text.** #### JSON Grammar -| Property | Data Type | Possible Values | -| ---------- | --------- | ---------------- | -| fontWeight | text | "normal", "bold" | - +| Propriedade | Tipo de dados | Possible Values | +| ----------- | ------------- | ---------------- | +| fontWeight | texto | "normal", "bold" | #### Objects Supported [Button](button_overview.md) - [Check Box](checkbox_overview.md) - [Combo Box](comboBox_overview.md) - [Drop-down List](dropdownList_Overview.md) - [Group Box](groupBox.md) - [Hierarchical List](list_overview.md#overview) - [Input](input_overview.md) - [List Box](listbox_overview.md#overview) - [List Box Column](listbox_overview.md#list-box-columns) - [List Box Footer](listbox_overview.md#list-box-footers) - [List Box Header](listbox_overview.md#list-box-headers) - [Radio Button](radio_overview.md) - [Text Area](text.md) -* * * -## Italic +--- +## Itálico Sets the selected text to slant slightly to the right. You can also set this property via the [**OBJECT SET FONT STYLE**](https://doc.4d.com/4Dv17R5/4D/17-R5/OBJECT-SET-FONT-STYLE.301-4128244.en.html) command. - -> This is normal text. -> *This is text in italics.* +> This is normal text.
    *This is text in italics.* #### JSON Grammar -| Name | Data Type | Possible Values | -| --------- | --------- | ------------------ | -| fontStyle | string | "normal", "italic" | - +| Nome | Tipo de dados | Possible Values | +| --------- | ------------- | ------------------ | +| fontStyle | string | "normal", "italic" | #### Objects Supported [Button](button_overview.md) - [Check Box](checkbox_overview.md) - [Combo Box](comboBox_overview.md) - [Drop-down List](dropdownList_Overview.md) - [Group Box](groupBox.md) - [Hierarchical List](list_overview.md#overview) - [Input](input_overview.md) - [List Box](listbox_overview.md#overview) - [List Box Column](listbox_overview.md#list-box-columns) - [List Box Footer](listbox_overview.md#list-box-footers) - [List Box Header](listbox_overview.md#list-box-headers) - [Radio Button](radio_overview.md) - [Text Area](text.md) -* * * -## Underline -Sets the text to have a line running beneath it. -> This is normal text. -> This is underlined text. +--- +## Sublinhado +Sets the text to have a line running beneath it. +> This is normal text.
    This is underlined text. #### JSON Grammar -| Name | Data Type | Possible Values | -| -------------- | --------- | --------------------- | -| textDecoration | string | "normal", "underline" | - +| Nome | Tipo de dados | Possible Values | +| -------------- | ------------- | --------------------- | +| textDecoration | string | "normal", "underline" | #### Objects Supported [Button](button_overview.md) - [Check Box](checkbox_overview.md) - [Combo Box](comboBox_overview.md) - [Drop-down List](dropdownList_Overview.md) - [Group Box](groupBox.md) - [Hierarchical List](list_overview.md#overview) - [Input](input_overview.md) - [List Box](listbox_overview.md#overview) - [List Box Column](listbox_overview.md#list-box-columns) - [List Box Footer](listbox_overview.md#list-box-footers) - [List Box Header](listbox_overview.md#list-box-headers) - [Radio Button](radio_overview.md) - [Text Area](text.md) -* * * -## Font -This property allows you to specify either the **font theme** or the **font family** used in the object. + + +--- +## Fonte + +This property allows you to specify either the **font theme** or the **font family** used in the object. > **Font theme** and **font family** properties are mutually exclusive. A font theme takes hold of font attributes, including size. A font family allows you to define font name, font size and font color. + ### Font Theme The font theme property designates an automatic style name. Automatic styles determine the font family, font size and font color to be used for the object dynamically according to system parameters. These parameters depend on: @@ -103,25 +97,29 @@ The font theme property designates an automatic style name. Automatic styles det With the font theme, you are guaranteed that titles are always displayed in accordance with the current interface standards of the system. However, their size may vary from one machine to another. Three font themes are available: - - **normal**: automatic style, applied by default to any new object created in the Form editor. - **main** and **additional** font themes are only supported by [text areas](text.md) and [inputs](input_overview.md). These themes are primarily intended for designing dialog boxes. They refer to font styles used, respectively, for main text and additional information in your interface windows. Here are typical dialog boxes (macOS and Windows) using these font themes: ![](assets/en/FormObjects/FontThemes.png) -> Font themes manage the font as well as its size and color. If you modify one of the properties managed by a font theme, it no longer works dynamically. However, you can apply custom style properties (Bold, Italic or Underline) without altering its functioning. +> Font themes manage the font as well as its size and color. Se modificar uma das propriedades gerenciadas por um tema de fonte, ele não funciona mais de forma dinâmica. Entretanto, pode aplicar propriedades de estilo personalizadas (Negrito, Itálico ou Subscrito) sem alterar seu funcionamento. + + #### JSON Grammar -| Name | Data Type | Possible Values | -| --------- | --------- | ------------------------------ | -| fontTheme | string | "normal", "main", "additional" | +| Nome | Tipo de dados | Possible Values | +| --------- | ------------- | ------------------------------ | +| fontTheme | string | "normal", "main", "additional" | #### Objects Supported [Button](button_overview.md) - [Check Box](checkbox_overview.md) - [Combo Box](comboBox_overview.md) - [Drop-down List](dropdownList_Overview.md) - [Group Box](groupBox.md) - [Hierarchical List](list_overview.md#overview) - [Input](input_overview.md) - [List Box](listbox_overview.md#overview) - [List Box Column](listbox_overview.md#list-box-columns) - [List Box Footer](listbox_overview.md#list-box-footers) - [List Box Header](listbox_overview.md#list-box-headers) - [Radio Button](radio_overview.md) - [Text Area](text.md) + + + ### Font Family There are two types of font family names: @@ -130,45 +128,41 @@ There are two types of font family names: * *generic-family:* The name of a generic-family, like "serif", "sans-serif", "cursive", "fantasy", "monospace". You can set this using the [**OBJECT SET FONT**](https://doc.4d.com/4Dv17R5/4D/17-R5/OBJECT-SET-FONT.301-4054834.en.html) command. +> This is Times New Roman font.
    This is Calibri font.
    This is Papyrus font. -> This is Times New Roman font. -> This is Calibri font. -> This is Papyrus font. #### JSON Grammar -| Name | Data Type | Possible Values | -| ---------- | --------- | -------------------- | -| fontFamily | string | CSS font family name | - - +| Nome | Tipo de dados | Possible Values | +| ---------- | ------------- | -------------------- | +| fontFamily | string | CSS font family name | > 4D recommends using only [web safe](https://www.w3schools.com/cssref/css_websafe_fonts.asp) fonts. #### Objects Supported [Button](button_overview.md) - [Check Box](checkbox_overview.md) - [Combo Box](comboBox_overview.md) - [Drop-down List](dropdownList_Overview.md) - [Group Box](groupBox.md) - [Hierarchical List](list_overview.md#overview) - [Input](input_overview.md) - [List Box](listbox_overview.md#overview) - [List Box Column](listbox_overview.md#list-box-columns) - [List Box Footer](listbox_overview.md#list-box-footers) - [List Box Header](listbox_overview.md#list-box-headers) - [Radio Button](radio_overview.md) - [Text Area](text.md) -* * * -## Font Size -> This property is only available when no [font theme](#font-theme) is selected. +--- +## Tamanho fonte + +> Esta propriedade só está disponível quando não estiver selecionado [tema de fonte](#font-theme). Allows defining the object's font size in points. #### JSON Grammar -| Name | Data Type | Possible Values | -| -------- | --------- | ------------------------------------- | -| fontSize | integer | Font size in points. Minimum value: 0 | - +| Nome | Tipo de dados | Possible Values | +| -------- | ------------- | ------------------------------------- | +| fontSize | integer | Font size in points. Minimum value: 0 | #### Objects Supported [Button](button_overview.md) - [Check Box](checkbox_overview.md) - [Combo Box](comboBox_overview.md) - [Drop-down List](dropdownList_Overview.md) - [Group Box](groupBox.md) - [Hierarchical List](list_overview.md#overview) - [Input](input_overview.md) - [List Box](listbox_overview.md#overview) - [List Box Column](listbox_overview.md#list-box-columns) - [List Box Footer](listbox_overview.md#list-box-footers) - [List Box Header](listbox_overview.md#list-box-headers) - [Radio Button](radio_overview.md) - [Text Area](text.md) -* * * -## Font Color +--- +## Cor fonte Designates the font color. @@ -182,20 +176,22 @@ The color can be specified by: You can also set this property using the [**OBJECT SET RGB COLORS**](https://doc.4d.com/4Dv18/4D/18/OBJECT-SET-RGB-COLORS.301-4505456.en.html) command. -#### JSON Grammar -| Name | Data Type | Possible Values | -| ------ | --------- | ----------------------------------------- | -| stroke | string | any css value, "transparent", "automatic" | +#### JSON Grammar +| Nome | Tipo de dados | Possible Values | +| ------ | ------------- | ----------------------------------------- | +| stroke | string | any css value, "transparent", "automatic" | #### Objects Supported [Button](button_overview.md) - [Check Box](checkbox_overview.md) - [Combo Box](comboBox_overview.md) - [Drop-down List](dropdownList_Overview.md) - [Group Box](groupBox.md) - [Hierarchical List](list_overview.md#overview) - [Input](input_overview.md) - [List Box](listbox_overview.md#overview) - [List Box Column](listbox_overview.md#list-box-columns) - [List Box Footer](listbox_overview.md#list-box-footers) - [List Box Header](listbox_overview.md#list-box-headers) - [Progress Indicators](progressIndicator.md) - [Ruler](ruler.md) - [Radio Button](radio_overview.md) - [Text Area](text.md) -* * * -## Font Color Expression + +--- + +## Expressão cor fonte `Selection and collection/entity selection type list boxes` @@ -204,30 +200,26 @@ Used to apply a custom font color to each row of the list box. You must use RGB You must enter an expression or a variable (array type variables cannot be used). The expression or variable will be evaluated for each row displayed. You can use the constants of the [SET RGB COLORS](https://doc.4d.com/4Dv17R6/4D/17-R6/SET-RGB-COLORS.302-4310385.en.html) theme. You can also set this property using the `LISTBOX SET PROPERTY` command with `lk font color expression` constant. - > This property can also be set using a [Meta Info Expression](properties_Text.md#meta-info-expression). The following example uses a variable name: enter *CompanyColor* for the **Font Color Expression** and, in the form method, write the following code: ```4d -CompanyColor:=Choose([Companies]ID;Background color;Light shadow color; -Foreground color;Dark shadow color) +CompanyColor:=Choose([Companies]ID;Background color;Light shadow color; Foreground color;Dark shadow color) ``` #### JSON Grammar -| Name | Data Type | Possible Values | -| --------------- | --------- | --------------------- | -| rowStrokeSource | string | Font color expression | - +| Nome | Tipo de dados | Possible Values | +| --------------- | ------------- | --------------------- | +| rowStrokeSource | string | Font color expression | #### Objects Supported [List Box](listbox_overview.md#overview) -* * * - -## Style Expression +--- +## Expressão estilo `Selection and collection/entity selection type list boxes` @@ -235,480 +227,280 @@ Used to apply a custom character style to each row of the list box or each cell You must enter an expression or a variable (array type variables cannot be used). The expression or variable will be evaluated for each row displayed (if applied to the list box) or each cell displayed (if applied to a column). You can use the constants of the [Font Styles](https://doc.4d.com/4Dv17R6/4D/17-R6/Font-Styles.302-4310343.en.html) theme. -Example: +Exemplo: ```4d Choose([Companies]ID;Bold;Plain;Italic;Underline) ``` You can also set this property using the `LISTBOX SET PROPERTY` command with `lk font style expression` constant. - > This property can also be set using a [Meta Info Expression](properties_Text.md#meta-info-expression). -#### JSON Grammar -| Name | Data Type | Possible Values | -| -------------- | --------- | ----------------------------------------------- | -| rowStyleSource | string | Style expression to evaluate for each row/cell. | +#### JSON Grammar +| Nome | Tipo de dados | Possible Values | +| -------------- | ------------- | ----------------------------------------------- | +| rowStyleSource | string | Style expression to evaluate for each row/cell. | #### Objects Supported [List Box](listbox_overview.md) - [List Box Column](listbox_overview.md#list-box-columns) -* * * -## Horizontal Alignment + + + + +--- +## Alihamento horizontal Horizontal location of text within the area that contains it. #### JSON Grammar -| Name | Data Type | Possible Values | -| --------- | --------- | ------------------------------------------------- | -| textAlign | string | "automatic", "right", "center", "justify", "left" | - +| Nome | Tipo de dados | Possible Values | +| --------- | ------------- | ------------------------------------------------- | +| textAlign | string | "automatic", "right", "center", "justify", "left" | #### Objects Supported -[Group Box](groupBox.md) - [List Box](listbox_overview.md#overview) - [List Box Column](listbox_overview.md#list-box-columns) - [List Box Header](listbox_overview.md#list-box-headers) - [List Box Header](listbox_overview.md#list-box-footers) - [Text Area](text.md) +[Group Box](groupBox.md) - [List Box](listbox_overview.md#overview) - [List Box Column](listbox_overview.md#list-box-columns) - [List Box Header](listbox_overview.md#list-box-headers) - [List Box Footer](listbox_overview.md#list-box-footers) - [Text Area](text.md) -* * * -## Vertical Alignment +--- +## Alinhamento vertical Vertical location of text within the area that contains it. The **Default** option (`automatic` JSON value) sets the alignment according to the type of data found in each column: - - `bottom` for all data (except pictures) and - `top` for picture type data. This property can also be handled by the [OBJECT Get vertical alignment](https://doc.4d.com/4Dv18/4D/18/OBJECT-Get-vertical-alignment.301-4505442.en.html) and [OBJECT SET VERTICAL ALIGNMENT](https://doc.4d.com/4Dv18/4D/18/OBJECT-SET-VERTICAL-ALIGNMENT.301-4505430.en.html) commands. -#### JSON Grammar -| Name | Data Type | Possible Values | -| ------------- | --------- | -------------------------------------- | -| verticalAlign | string | "automatic", "top", "middle", "bottom" | +#### JSON Grammar +| Nome | Tipo de dados | Possible Values | +| ------------- | ------------- | -------------------------------------- | +| verticalAlign | string | "automatic", "top", "middle", "bottom" | #### Objects Supported [List Box](listbox_overview.md) - [List Box Column](listbox_overview.md#list-box-columns) - [List Box Footer](listbox_overview.md#list-box-footers) - [List Box Header](listbox_overview.md#list-box-headers) -* * * -## Meta Info Expression -`Collection or entity selection type list boxes` -Specifies an expression or a variable which will be evaluated for each row displayed. It allows defining a whole set of row text attributes. You must pass an **object variable** or an **expression that returns an object**. The following properties are supported: -| Property name | Type | Description | -| ------------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| stroke | string | Font color. Any CSS color (ex: "#FF00FF"), "automatic", "transparent" | -| fill | string | Background color. Any CSS color (ex: "#F00FFF"), "automatic", "transparent" | -| fontStyle | string | "normal","italic" | -| fontWeight | string | "normal","bold" | -| textDecoration | string | "normal","underline" | -| unselectable | boolean | Designates the corresponding row as not being selectable (*i.e.*, highlighting is not possible). Enterable areas are no longer enterable if this option is enabled unless the "Single-Click Edit" option is also enabled. Controls such as checkboxes and lists remain functional. This setting is ignored if the list box selection mode is "None". Default value: False. | -| disabled | boolean | Disables the corresponding row. Enterable areas are no longer enterable if this option is enabled. Text and controls (checkboxes, lists, etc.) appear dimmed or grayed out. Default value: False. | -| cell.\ | object | Allows applying the property to a single column. Pass in \ the object name of the list box column. **Note**: "unselectable" and "disabled" properties can only be defined at row level. They are ignored if passed in the "cell" object | -> Style settings made with this property are ignored if other style settings are already defined through expressions (*i.e.*, [Style Expression](#style-expression), [Font Color Expression](#font-color-expression), [Background Color Expression](#background-color-expression)). -The following example uses the *Color* project method. -In the form method, write the following code: +--- +## Meta Info Expression +`Collection or entity selection type list boxes` -```4d -//form method -Case of - :(Form event=On Load) - Form.meta:=New object -End case -``` +Specifies an expression or a variable which will be evaluated for each row displayed. It allows defining a whole set of row text attributes. You must pass an **object variable** or an **expression that returns an object**. The following properties are supported: + +| Property name | Type | Descrição | +| ------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| stroke | string | Background color. Any CSS color (ex: "#F00FFF"), "automatic", "transparent" | +| fill | string | Cor de fundo. Any CSS color (ex: "#FF00FF"), "automatic", "transparent" | +| fontStyle | string | "normal","italic" | +| fontWeight | string | "normal","bold" | +| textDecoration | string | "normal","underline" | +| unselectable | booleano | Designates the corresponding row as not being selectable (*i.e.*, highlighting is not possible). Enterable areas are no longer enterable if this option is enabled unless the "Single-Click Edit" option is also enabled. Controls such as checkboxes and lists remain functional. This setting is ignored if the list box selection mode is "None". This setting is ignored if the list box selection mode is "None". | +| disabled | booleano | Disables the corresponding row. Enterable areas are no longer enterable if this option is enabled. Text and controls (checkboxes, lists, etc.) appear dimmed or grayed out. This setting is ignored if the list box selection mode is "None". | +| cell.\ | object | Allows applying the property to a single column. Pass in \ the object name of the list box column. **Note**: "unselectable" and "disabled" properties can only be defined at row level. They are ignored if passed in the "cell" object | + +> Style settings made with this property are ignored if other style settings are already defined through expressions (*i.e.*, [Style Expression](#style-expression), [Font Color Expression](#font-color-expression), [Background Color Expression](#background-color-expression)). + +**Exemplo** -In the *Color* method, write the following code: +No método de projeto *Color*, entre o código abaixo: ```4d -//Color method -//Sets font color for certain rows and the background color for a specific column: -C_OBJECT($0) -If(This.ID>5) //ID is an attribute of collection objects/entities +//Método Cor +//Define a cor da fonte para certas linhas e a cor de fundo para uma coluna específica : C_OBJECT($0) +Form.meta:=New object If(This.ID>5) //ID é um atributo de objetos/entidades de uma coleção Form.meta.stroke:="purple" Form.meta.cell:=New object("Column2";New object("fill";"black")) Else - Form.meta.stroke:="orange" -End if + Form.meta.stroke:="orange" End if $0:=Form.meta ``` -> See also the [This](https://doc.4d.com/4Dv17R6/4D/17-R6/This.301-4310806.en.html) command. +**Melhores práticas:** Por razões de otimização, é recomendado nesse caso criar o objeto `meta.cell` uma vez no método formulário: -#### JSON Grammar +```4d + //método de formulário + Case of + :(Form event code=On Load) + Form.colStyle:=New object("Column2";New object("fill";"black")) + End case +``` + +O método *Color* iria conter : -| Name | Data Type | Possible Values | -| ---------- | --------- | ------------------------------------------------ | -| metaSource | string | Object expression to evaluate for each row/cell. | +```4d + //Método Color + ... + If(This.ID>5) + Form.meta.stroke:="purple" + Form.meta.cell:=Form.colStyle //reusa o mesmo objeto para melhor performance + ... +``` +> Veja também o comando [This](https://doc.4d.com/4Dv18/4D/18/This.301-4504875.en.html). + +#### JSON Grammar + +| Nome | Tipo de dados | Possible Values | +| ---------- | ------------- | ------------------------------------------------ | +| metaSource | string | Object expression to evaluate for each row/cell. | + #### Objects Supported [List Box](listbox_overview.md) -* * * - -## Multi-style - -This property enables the possibility of using specific styles in the selected area. When this option is checked, 4D interprets any \ HTML tags found in the area.

    - -

    - By default, this option is not enabled. -

    - -

    - JSON Grammar -

    - - - - - - - - - - - - - - - - - -
    - Name - - Data Type - - Possible Values -
    - styledText - - boolean - - true, false -
    - -

    - Objects Supported -

    - -

    - List Box Column - Input -

    - -
    - -

    - Orientation -

    - -

    - Modifies the orientation (rotation) of a text area. Text areas can be rotated by increments of 90°. Each orientation value is applied while keeping the same lower left starting point for the object: -

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - Orientation value - - Result -
    - 0 (default) - - -
    - 90 - - -
    - 180 - - -
    - 270 - - -
    - -

    - In addition to static text areas, input text objects can be rotated when they are non-enterable. When a rotation property is applied to an input object, the enterable property is removed (if any). This object is then excluded from the entry order. -

    - -

    - JSON Grammar -

    - - - - - - - - - - - - - - - - - -
    - Name - - Data Type - - Possible Values -
    - textAngle - - number - - 0, 90, 180, 270 -
    - -

    - Objects Supported -

    - -

    - Input (non-enterable) - Text Area -

    - -
    - -

    - Row Font Color Array -

    - -

    - Array type list boxes -

    - -

    - Allows setting a custom font color to each row of the list box or cell of the column. -

    - -

    - The name of a Longint array must be used. Each element of this array corresponds to a row of the list box (if applied to the list box) or to a cell of the column (if applied to a column), so the array must be the same size as the array associated with the column. You can use the constants of the SET RGB COLORS theme. If you want the cell to inherit the background color defined at the higher level, pass the value -255 to the corresponding array element. -

    - -

    - JSON Grammar -

    - - - - - - - - - - - - - - - - - -
    - Name - - Data Type - - Possible Values -
    - rowStrokeSource - - string - - The name of a longint array -
    - -

    - Objects Supported -

    - -

    - List Box - List Box Column -

    - -
    - -

    - Row Style Array -

    - -

    - Array type list boxes -

    - -

    - Allows setting a custom font style to each row of the list box or each cell of the column. -

    - -

    - The name of a Longint array must be used. Each element of this array corresponds to a row of the list box (if applied to the list box) or to a cell of the column (if applied to a column), so the array must be the same size as the array associated with the column. To fill the array (using a method), use the constants of the Font Styles theme. You can add constants together to combine styles. If you want the cell to inherit the style defined at the higher level, pass the value -255 to the corresponding array element. -

    - -

    - JSON Grammar -

    - - - - - - - - - - - - - - - - - -
    - Name - - Data Type - - Possible Values -
    - rowStyleSource - - string - - The name of a longint array. -
    - -

    - Objects Supported -

    - -

    - List Box - List Box Column -

    - -
    - -

    - Store with default style tags -

    - -

    - This property is only available for a Multi-style input area. When this property is enabled, the area will store the style tags with the text, even if no modification has been made. In this case, the tags correspond to the default style. When this property is disabled, only modified style tags are stored. -

    - -

    - For example, here is a text that includes a style modification: -

    - -

    - -

    - -

    - When the property is disabled, the area only stores the modification. The stored contents are therefore: -

    - -
    What a <SPAN STYLE="font-size:13.5pt">beautiful</SPAN> day!
    -
    - -

    - When the property is enabled, the area stores all the formatting information. The first generic tag describes the default style then each variation is the subject of a pair of nested tags. The contents stored in the area are therefore: -

    - -
    <SPAN STYLE="font-family:'Arial';font-size:9pt;text-align:left;font-weight:normal;font-style:normal;text-decoration:none;color:#000000;background-color:#FFFFFF">What a <SPAN STYLE="font-size:13.5pt">beautiful</SPAN> day!</SPAN>
    -
    - -

    - JSON Grammar -

    - - - - - - - - - - - - - - - - - -
    - Name - - Data Type - - Possible Values -
    - storeDefaultStyle - - boolean - - true, false (default). -
    - -

    - Objects Supported -

    - -

    - Input -

    \ No newline at end of file + + + + + + + +--- +## Multistyle + +Esta propriedade ativa a possibilidade de usar estilos específicos na área selecionada. When this option is checked, 4D interprets any ` HTML` tags found in the area. + +By default, this option is not enabled. + + + +#### JSON Grammar + +| Nome | Tipo de dados | Possible Values | +| ---------- | ------------- | --------------- | +| styledText | booleano | true, false | + +#### Objects Supported + + +[List Box Column](listbox_overview.md#list-box-columns) - [Input](input_overview.md) + + + + + + + + +--- +## Orientation + +Modifica a orientação (rotação) de uma área texto. Áreas texto pode ser rodadas por incrementos de 90°. Cada valor de orientação é aplicado enquanto mantém o mesmo ponto inferior esquerdo para o objeto: + +| Orientation value | Resultado | +| ----------------- | ------------------------------------------- | +| 0 (default) | ![](assets/en/FormObjects/orientation1.png) | +| 90 | ![](assets/en/FormObjects/orientation2.png) | +| 180 | ![](assets/en/FormObjects/orientation3.png) | +| 270 | ![](assets/en/FormObjects/orientation4.png) | + +Além de [áreas de texto estáticas](text.md), [input](input_overview.md) os objetos de texto podem ser girados quando forem não-[digitáveis](properties_Entry.md#enterable). Quando uma propriedade rotação for aplicada a um objeto input, a propriedade digitável é removida (se houver). Esse objeto é então excluído da ordem de entrada. + + + + +#### JSON Grammar + +| Nome | Tipo de dados | Possible Values | +| --------- | ------------- | --------------- | +| textAngle | number | 0, 90, 180, 270 | + +#### Objects Supported + +[Input](input_overview.md) (não-digitável) - [Área Texto](text.md) + + + + + +--- +## Array cores de fonte +`Array type list boxes` + +Permite estabelecer uma cor de fonte personalizada para cada linha do list box ou cada célula da coluna. + +O nome do array LongInt deve ser usado. Each element of this array corresponds to a row of the list box (if applied to the list box) or to a cell of the column (if applied to a column), so the array must be the same size as the array associated with the column. You can use the constants of the [SET RGB COLORS](https://doc.4d.com/4Dv17R6/4D/17-R6/SET-RGB-COLORS.302-4310385.en.html) theme. If you want the cell to inherit the background color defined at the higher level, pass the value -255 to the corresponding array element. + +#### JSON Grammar + +| Nome | Tipo de dados | Possible Values | +| --------------- | ------------- | --------------------------- | +| rowStrokeSource | string | The name of a longint array | + +#### Objects Supported + +[List Box](listbox_overview.md) - [List Box Column](listbox_overview.md#list-box-columns) + + + + + +--- +## Array estilo linha +`Array type list boxes` + +Permite estabelecer um estilo de fonte personalizado para cada linha do list box ou cada célula da coluna. + +O nome do array LongInt deve ser usado. Each element of this array corresponds to a row of the list box (if applied to the list box) or to a cell of the column (if applied to a column), so the array must be the same size as the array associated with the column. Para preencher esse array (usando um método) use as constantes do tema [Estillos de Fonte](https://doc.4d.com/4Dv17R6/4D/17-R6/Font-Styles.302-4310343.en.html). Pode acionar constantes juntas para combinar estilos. Se quiser que a célula herde o estilo definido no nível mais alto, passe o valor -255 para o elemento array correspondente. + + +#### JSON Grammar + +| Nome | Tipo de dados | Possible Values | +| -------------- | ------------- | ---------------------------- | +| rowStyleSource | string | The name of a longint array. | + +#### Objects Supported + +[List Box](listbox_overview.md#overview) - [List Box Column](listbox_overview.md#list-box-columns) + + + +--- +## Store with default style tags + +Essa propriedade só está disponível para a área input [Multiestilo](#multi-style). Quando essa propriedade for ativada, a área armazena as tags de estilo com o texto, mesmo se nenhuma modificação for feita. Nesse caso, as tags correspondem ao estilo padrão. Quando essa propriedade for desativada, só as tags de estilo modificadas são armazenadas. + +Por exemplo, aqui está um texto que inclui uma modificação de estilo: + +![](assets/en/FormObjects/tagStyle1.png) + +Quando a propriedade for desativada, a área só armazena a modificação. Os conteúdos armazenados são entretanto: + +``` +Que lindo dia! +``` + +Quando a propriedade for ativada, a área armazena todas as informações de formatação. A primeira tag genérica descreve o estilo padrão quando cada variação no sujeito for um par de tags aninhadas. Os conteúdos armazenados na área são portanto: + +``` +Que lindo dia! +``` + +#### JSON Grammar + +| Nome | Tipo de dados | Possible Values | +| ----------------- | ------------- | ---------------------- | +| storeDefaultStyle | booleano | true, false (default). | + +#### Objects Supported + +[Entrada](input_overview.md) diff --git a/website/translated_docs/pt/FormObjects/properties_TextAndPicture.md b/website/translated_docs/pt/FormObjects/properties_TextAndPicture.md index e02ae54e7246cf..6d7758af2535ab 100644 --- a/website/translated_docs/pt/FormObjects/properties_TextAndPicture.md +++ b/website/translated_docs/pt/FormObjects/properties_TextAndPicture.md @@ -3,9 +3,8 @@ id: propertiesTextAndPicture title: Text and Picture --- -* * * - -## Background pathname +--- +## Rota de acesso ao Fundo Sets the path of the picture that will be drawn in the background of the object. If the object uses an [icon](#picture-pathname) with [different states](#number-of-states), the background picture will automatically support the same number of states. @@ -13,60 +12,65 @@ The pathname to enter is similar as for the [Pathname property for static pictur #### JSON Grammar -| Name | Data Type | Possible Values | -| ----------------------- | --------- | ------------------------------------------------------------------------------------------------------------ | -| customBackgroundPicture | string | Relative path in POSIX syntax. Must be used in conjunction with the style property with the "custom" option. | +| Nome | Tipo de dados | Possible Values | +| ----------------------- | ------------- | ------------------------------------------------------------------------------------------------------------ | +| customBackgroundPicture | string | Relative path in POSIX syntax. Must be used in conjunction with the style property with the "custom" option. | #### Objects Supported [Custom Button](button_overview.md#custom) - [Custom Check Box](checkbox_overview.md#custom) - [Custom Radio Button](radio_overview.md#custom) -* * * + + +--- ## Button Style General appearance of the button. The button style also plays a part in the availability of certain options. + #### JSON Grammar -| Name | Data Type | Possible Values | -|:-----:|:---------:| ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| style | text | "regular", "flat", "toolbar", "bevel", "roundedBevel", "gradientBevel", "texturedBevel", "office", "help", "circular", "disclosure", "roundedDisclosure", "custom" | +| Nome | Tipo de dados | Possible Values | +|:-----:|:-------------:| ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| style | texto | "regular", "flat", "toolbar", "bevel", "roundedBevel", "gradientBevel", "texturedBevel", "office", "help", "circular", "disclosure", "roundedDisclosure", "custom" | #### Objects Supported [Button](button_overview.md) - [Radio Button](radio_overview.md) - [Check Box](checkbox_overview.md) - [Radio Button](radio_overview.md) -* * * + + +--- ## Horizontal Margin This property allows setting the size (in pixels) of the horizontal margins of the button. This margin delimits the area that the button icon and title must not surpass. This parameter is useful, for example, when the background picture contains borders: -| With / Without | Example | +| With / Without | Exemplo | | -------------------- | --------------------------------------------------------- | | Without margin | ![](assets/en/FormObjects/property_horizontalMargin1.png) | | With 13-pixel margin | ![](assets/en/FormObjects/property_horizontalMargin2.png) | - - > This property works in conjunction with the [Vertical Margin](#vertical-margin) property. #### JSON Grammar -| Name | Data Type | Possible Values | -| ------------- | --------- | --------------------------------------- | -| customBorderX | number | For use with "custom" style. Minimum: 0 | - +| Nome | Tipo de dados | Possible Values | +| ------------- | ------------- | --------------------------------------- | +| customBorderX | number | For use with "custom" style. Minimum: 0 | #### Objects Supported [Custom Button](button_overview.md#custom) - [Custom Check Box](checkbox_overview.md#custom) - [Custom Radio Button](radio_overview.md#custom) -* * * + + + +--- ## Icon Location @@ -74,18 +78,20 @@ Designates the placement of an icon in relation to the form object. #### JSON Grammar -| Name | Data Type | Possible Values | -| ------------- | --------- | ----------------------- | -| iconPlacement | string | "none", "left", "right" | - +| Nome | Tipo de dados | Possible Values | +| ------------- | ------------- | ----------------------- | +| iconPlacement | string | "none", "left", "right" | #### Objects Supported [List Box Header](listbox_overview.md#list-box-headers) -* * * -## Icon Offset + + + +--- +## Offset do ícone Sets a custom offset value in pixels, which will be used when the button is clicked @@ -93,17 +99,17 @@ The title of the button will be shifted to the right and toward the bottom for t #### JSON Grammar -| Name | Data Type | Possible Values | -| ------------ | --------- | --------------- | -| customOffset | number | minimum: 0 | - +| Nome | Tipo de dados | Possible Values | +| ------------ | ------------- | --------------- | +| customOffset | number | mínimo: 0 | #### Objects Supported [Custom Button](button_overview.md#custom) - [Custom Check Box](checkbox_overview.md#custom) - [Custom Radio Button](radio_overview.md#custom) -* * * + +--- ## Number of States This property sets the exact number of states present in the picture used as the icon for a [button with icon](button_overview.md), a [check box](checkbox_overview.md) or a custom [radio button](radio_overview.md). In general, a button icon includes four states: active, clicked, mouse over and inactive. @@ -113,25 +119,27 @@ Each state is represented by a different picture. In the source picture, the sta ![](assets/en/property_numberOfStates.png) The following states are represented: - 1. button not clicked / check box unchecked (variable value=0) 2. button clicked / check box checked (variable value=1) 3. roll over 4. disabled -#### JSON Grammar -| Name | Data Type | Possible Values | -| ---------- | --------- | --------------- | -| iconFrames | number | minimum: 1 | +#### JSON Grammar +| Nome | Tipo de dados | Possible Values | +| ---------- | ------------- | --------------- | +| iconFrames | number | mínimo: 1 | #### Objects Supported [Button](button_overview.md) (all styles except [Help](button_overview.md#help)) - [Check Box](checkbox_overview.md) - [Radio Button](radio_overview.md) -* * * + + + +--- ## Picture pathname Sets the path of the picture that will be used as icon for the object. @@ -142,45 +150,46 @@ The pathname to enter is similar as for the [Pathname property for static pictur #### JSON Grammar -| Name | Data Type | Possible Values | -| ---- | --------- | -------------------------------------------- | -| icon | picture | Relative or filesystem path in POSIX syntax. | - +| Nome | Tipo de dados | Possible Values | +| ---- | ------------- | -------------------------------------------- | +| icon | imagem | Relative or filesystem path in POSIX syntax. | #### Objects Supported [Button](button_overview.md) (all styles except [Help](button_overview.md#help)) - [Check Box](checkbox_overview.md) - [List Box Header](listbox_overview.md#list-box-headers) - [Radio Button](radio_overview.md) -* * * + + +--- ## Title/Picture Position This property allows modifying the relative location of the button title in relation to the associated icon. This property has no effect when the button contains only a title (no associated picture) or a picture (no title). By default, when a button contains a title and a picture, the text is placed below the picture. Here are the results using the various options for this property: -| Option | Description | Example | +| Option | Descrição | Exemplo | | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------- | -| **Left** | The text is placed to the left of the icon. The contents of the button are aligned to the right. | ![](assets/en/FormObjects/property_titlePosition_left.en.png) | -| **Top** | The text is placed above the icon. The contents of the button are centered. | ![](assets/en/FormObjects/property_titlePosition_top.png) | -| **Right** | The text is placed to the right of the icon. The contents of the button are aligned to the left. | ![](assets/en/FormObjects/property_titlePosition_right.png) | -| **Bottom** | The text is placed below the icon. The contents of the button are centered. | ![](assets/en/FormObjects/property_titlePosition_bottom.png) | -| **Centered** | The text of the icon is centered vertically and horizontally in the button. This parameter is useful, for example, for text included in an icon. | ![](assets/en/FormObjects/property_titlePosition_centered.png) | - +| **Esquerda** | The text is placed to the left of the icon. The contents of the button are aligned to the right. | ![](assets/en/FormObjects/property_titlePosition_left.en.png) | +| **Topo** | The text is placed above the icon. The contents of the button are centered. | ![](assets/en/FormObjects/property_titlePosition_top.png) | +| **Direita** | The text is placed to the right of the icon. The contents of the button are aligned to the left. | ![](assets/en/FormObjects/property_titlePosition_right.png) | +| **Fundo** | The text is placed below the icon. The contents of the button are centered. | ![](assets/en/FormObjects/property_titlePosition_bottom.png) | +| **Centrado** | The text of the icon is centered vertically and horizontally in the button. This parameter is useful, for example, for text included in an icon. | ![](assets/en/FormObjects/property_titlePosition_centered.png) | #### JSON Grammar -| Name | Data Type | Possible Values | -| ------------- | --------- | ------------------------------------------ | -| textPlacement | string | "left", "top", "right", "bottom", "center" | - +| Nome | Tipo de dados | Possible Values | +| ------------- | ------------- | ------------------------------------------ | +| textPlacement | string | "left", "top", "right", "bottom", "center" | #### Objects Supported [Button](button_overview.md) (all styles except [Help](button_overview.md#help)) - [Check Box](checkbox_overview.md) - [Radio Button](radio_overview.md) -* * * + + +--- ## Vertical Margin This property allows setting the size (in pixels) of the vertical margins of the button. This margin delimits the area that the button icon and title must not surpass. @@ -191,17 +200,18 @@ This parameter is useful, for example, when the background picture contains bord #### JSON Grammar -| Name | Data Type | Possible Values | -| ------------- | --------- | --------------------------------------- | -| customBorderY | number | For use with "custom" style. Minimum: 0 | - +| Nome | Tipo de dados | Possible Values | +| ------------- | ------------- | --------------------------------------- | +| customBorderY | number | For use with "custom" style. Minimum: 0 | #### Objects Supported [Custom Button](button_overview.md#custom) - [Custom Check Box](checkbox_overview.md#custom) - [Custom Radio Button](radio_overview.md#custom) -* * * + + +--- ## With pop-up menu This property allows displaying a symbol that appears as a triangle in the button to indicate the presence of an attached pop-up menu: @@ -210,6 +220,7 @@ This property allows displaying a symbol that appears as a triangle in the butto The appearance and location of this symbol depends on the button style and the current platform. + ### Linked and Separated To attach a pop-up menu symbol to a button, there are two display options available: @@ -217,54 +228,25 @@ To attach a pop-up menu symbol to a button, there are two display options availa | Linked | Separated | |:----------------------------------------------------:|:-------------------------------------------------------:| | ![](assets/en/FormObjects/property_popup_linked.png) | ![](assets/en/FormObjects/property_popup_separated.png) | - - > The actual availability of a "separated" mode depends on the style of the button and the platform. Each option specifies the relation between the button and the attached pop-up menu: -
  • - When the pop-up menu is separated, clicking on the left part of the button directly executes the current action of the button; this action can be modified using the pop-up menu accessible in the right part of the button.
  • - When the pop-up menu is linked, a simple click on the button only displays the pop-up menu. Only the selection of the action in the pop-up menu causes its execution.

    - Managing the pop-up menu -

    -

    - It is important to note that the "With Pop-up Menu" property only manages the graphic aspect of the button. The display of the pop-up menu and its values must be handled entirely by the developer, more particularly using form events and the Dynamic pop up menu and Pop up menu commands. -

    -

    - JSON Grammar -

    - - - - - - - - - - - - - - -
    - Name - - Data Type - - Possible Values -
    - popupPlacement - - string - -
  • - "none"
  • - "linked"
  • - "separated"
  • - Objects Supported -

    -

    - Toolbar Button - Bevel Button - Rounded Bevel Button - OS X Gradient Button - OS X Textured Button - Office XP Button - Circle Button - Custom -

    \ No newline at end of file +
  • When the pop-up menu is **separated**, clicking on the left part of the button directly executes the current action of the button; this action can be modified using the pop-up menu accessible in the right part of the button.
  • When the pop-up menu is **linked**, a simple click on the button only displays the pop-up menu. Only the selection of the action in the pop-up menu causes its execution. + + +### Managing the pop-up menu + +It is important to note that the "With Pop-up Menu" property only manages the graphic aspect of the button. The display of the pop-up menu and its values must be handled entirely by the developer, more particularly using `form events` and the **[Dynamic pop up menu](https://doc.4d.com/4Dv18/4D/18/Dynamic-pop-up-menu.301-4505524.en.html)** and **[Pop up menu](https://doc.4d.com/4Dv17R5/4D/17-R5/Pop-up-menu.301-4127438.en.html)** commands. + + +#### JSON Grammar + +| Nome | Tipo de dados | Possible Values | +|:-------------- | ------------- | ---------------------------------------------------------------------------------------------------- | +| popupPlacement | string |
  • "none"
  • "linked"
  • "separated" | + + +#### Objects Supported + +[Toolbar Button](button_overview.md#toolbar) - [Bevel Button](button_overview.md#bevel) - [Rounded Bevel Button](button_overview.md#Rounded-bevel) - [OS X Gradient Button](button_overview.md#os-x-gradient) - [OS X Textured Button](button_overview.md#os-x-textured) - [Office XP Button](button_overview.md#office-XP) - [Circle Button](button_overview.md#circle) - [Custom](button_overview.md#custom) diff --git a/website/translated_docs/pt/FormObjects/properties_WebArea.md b/website/translated_docs/pt/FormObjects/properties_WebArea.md index 8f42001da5981d..710779bfe88265 100644 --- a/website/translated_docs/pt/FormObjects/properties_WebArea.md +++ b/website/translated_docs/pt/FormObjects/properties_WebArea.md @@ -1,10 +1,9 @@ --- id: propertiesWebArea -title: Web Area +title: Área Web --- -* * * - +--- ## Access 4D methods You can call 4D methods from the JavaScript code executed in a Web area and get values in return. To be able to call 4D methods from a Web area, you must activate the 4D methods accessibility property ("all"). @@ -13,49 +12,50 @@ You can call 4D methods from the JavaScript code executed in a Web area and get When this property is on, a special JavaScript object named `$4d` is instantiated in the Web area, which you can [use to manage calls to 4D project methods](webArea_overview.md#4d-object). -#### JSON Grammar -| Name | Data Type | Possible Values | -| -------------------- | --------- | ----------------------- | -| methodsAccessibility | string | "none" (default), "all" | +#### JSON Grammar + +| Nome | Tipo de dados | Possible Values | +| -------------------- | ------------- | ----------------------- | +| methodsAccessibility | string | "none" (default), "all" | #### Objects Supported -[Web Area](webArea_overview.md) +[Área Web](webArea_overview.md) -* * * +--- ## Progression Name of a Longint type variable. This variable will receive a value between 0 and 100, representing the page load completion percentage in the Web area. Automatically updated by 4D, cannot be modified manually. #### JSON Grammar -| Name | Data Type | Possible Values | -| -------------- | --------- | -------------------------- | -| progressSource | string | Name of a Longint variable | - +| Nome | Tipo de dados | Possible Values | +| -------------- | ------------- | -------------------------- | +| progressSource | string | Name of a Longint variable | #### Objects Supported -[Web Area](webArea_overview.md) +[Área Web](webArea_overview.md) + -* * * + +--- ## URL A String type variable that designates the URL loaded or being loading by the associated Web area. The association between the variable and the Web area works in both directions: -* If the user assigns a new URL to the variable, this URL is automatically loaded by the Web area. -* Any browsing done within the Web area will automatically update the contents of the variable. +* If the user assigns a new URL to the variable, this URL is automatically loaded by the Web area. +* Any browsing done within the Web area will automatically update the contents of the variable. Schematically, this variable functions like the address area of a Web browser. You can represent it via a text area above the Web area. ### URL Variable and WA OPEN URL command The URL variable produces the same effects as the [WA OPEN URL](https://doc.4d.com/4Dv18/4D/18/WA-OPEN-URL.301-4504841.en.html) command. The following differences should nevertheless be noted: - - For access to documents, this variable only accepts URLs that are RFC-compliant ("file://c:/My%20Doc") and not system pathnames ("c:\MyDoc"). The [WA OPEN URL](https://doc.4d.com/4Dv18/4D/18/WA-OPEN-URL.301-4504841.en.html) command accepts both notations. - If the URL variable contains an empty string, the Web area does not attempt to load the URL. The [WA OPEN URL](https://doc.4d.com/4Dv18/4D/18/WA-OPEN-URL.301-4504841.en.html) command generates an error in this case. - If the URL variable does not contain a protocol (http, mailto, file, etc.), the Web area adds "http://", which is not the case for the [WA OPEN URL](https://doc.4d.com/4Dv18/4D/18/WA-OPEN-URL.301-4504841.en.html) command. @@ -63,40 +63,41 @@ The URL variable produces the same effects as the [WA OPEN URL](https://doc.4d.c #### JSON Grammar -| Name | Data Type | Possible Values | -| --------- | --------- | --------------- | -| urlSource | string | A URL. | - +| Nome | Tipo de dados | Possible Values | +| --------- | ------------- | --------------- | +| urlSource | string | A URL. | #### Objects Supported -[Web Area](webArea_overview.md) +[Área Web](webArea_overview.md) + + + -* * * + +--- ## Use embedded Web rendering engine This option allows choosing between two rendering engines for the Web area, depending on the specifics of your application: -* **unchecked** - `JSON value: system` (default): In this case, 4D uses the "best" engine corresponding to the system. On Windows, 4D automatically uses the most recent version of the browser found on the machine (IE11, MS Edge, etc.). On macOS, 4D uses the current version of WebKit (Safari). This means that you automatically benefit from the latest advances in Web rendering, through HTML5 or JavaScript. However, you may notice some rendering differences between Internet Explorer/Edge implementations and Web Kit ones. -* **checked** - `JSON value: embedded`: In this case, 4D uses Blink engine from Google. Using the embedded Web engine means that Web area rendering and their functioning in your application are identical regardless of the platform used to run 4D (slight variations of pixels or differences related to network implementation may nevertheless be observed). When this option is chosen, you no longer benefit from automatic updates of the Web engine performed by the operating system; however, new versions of the engines are provided through 4D. - - Note that the Blink engine has the following limitations: - - * [WA SET PAGE CONTENT](https://doc.4d.com/4Dv17R6/4D/17-R6/WA-SET-PAGE-CONTENT.301-4310783.en.html): using this command requires that at least one page is already loaded in the area (through a call to [WA OPEN URL](https://doc.4d.com/4Dv17R6/4D/17-R6/WA-OPEN-URL.301-4310772.en.html) or an assignment to the URL variable associated to the area). - * Execution of Java applets, JavaScripts and plug-ins is always enabled and cannot be disabled in Web areas in Blink. The following selectors of the [WA SET PREFERENCE](https://doc.4d.com/4Dv17R6/4D/17-R6/WA-SET-PREFERENCE.301-4310780.en.html) and [WA GET PREFERENCE](https://doc.4d.com/4Dv17R6/4D/17-R6/WA-GET-PREFERENCE.301-4310763.en.html) commands are ignored: - * `WA enable Java applets` - * `WA enable JavaScript` - * `WA enable plugins` - * When URL drops are enabled by the `WA enable URL drop` selector of the [WA SET PREFERENCE](https://doc.4d.com/4Dv17R6/4D/17-R6/WA-SET-PREFERENCE.301-4310780.en.html) command, the first drop must be preceded by at least one call to [WA OPEN URL](https://doc.4d.com/4Dv17R6/4D/17-R6/WA-OPEN-URL.301-4310772.en.html) or one assignment to the URL variable associated to the area. +* **unchecked** - `JSON value: system` (default): In this case, 4D uses the "best" engine corresponding to the system. On Windows, 4D automatically uses the most recent version of the browser found on the machine (IE11, MS Edge, etc.). On macOS, 4D uses the current version of WebKit (Safari). This means that you automatically benefit from the latest advances in Web rendering, through HTML5 or JavaScript. However, you may notice some rendering differences between Internet Explorer/Edge implementations and Web Kit ones. +* **checked** - `JSON value: embedded`: In this case, 4D uses Blink engine from Google. Using the embedded Web engine means that Web area rendering and their functioning in your application are identical regardless of the platform used to run 4D (slight variations of pixels or differences related to network implementation may nevertheless be observed). When this option is chosen, you no longer benefit from automatic updates of the Web engine performed by the operating system; however, new versions of the engines are provided through 4D. -#### JSON Grammar +Note que o motor Blink tem as limitações abaixo: + * [WA SET PAGE CONTENT](https://doc.4d.com/4Dv18/4D/18.4/WA-SET-PAGE-CONTENT.301-5232965.en.html): usar esse comando exige que pelo menos uma página já esteja carregado na área (através da chamada a [WA OPEN URL](https://doc.4d.com/4Dv18/4D/18.4/WA-OPEN-URL.301-5232954.en.html) ou uma atribuição à variável URL associada à área). + * A execução de JavaScript está sempre ativada; a execução de applets e plug-ins Java está sempre desativada. Estes parâmetros não podem ser modificados em Blink. Os seletores dos comandos [WA SET PREFERENCE](https://doc.4d.com/4Dv18/4D/18.4/WA-SET-PREFERENCE.301-5232962.en.html) y [WA GET PREFERENCE](https://doc.4d.com/4Dv18/4D/18.4/WA-GET-PREFERENCE.301-5232945.en.html) são ignorados: + * `WA enable Java applets` + * `WA enable JavaScript` + * `WA enable plugins` + * Quando se ativa soltar URLs mediante o seletor `WA enable URL drop` do comando [WA SET PREFERENCE](https://doc.4d.com/4Dv18/4D/18.4/WA-SET-PREFERENCE.301-5232962.en.html), a primeira soltada deve ir precedida de ao menos uma chamada a [WA OPEN URL](https://doc.4d.com/4Dv18/4D/18.4/WA-OPEN-URL.301-5232954.en.html) ou uma atribuição à variável URL associada à área. -| Name | Data Type | Possible Values | -| --------- | --------- | -------------------- | -| webEngine | string | "embedded", "system" | +#### JSON Grammar +| Nome | Tipo de dados | Possible Values | +| --------- | ------------- | -------------------- | +| webEngine | string | "embedded", "system" | #### Objects Supported -[Web Area](webArea_overview.md) \ No newline at end of file +[Área Web](webArea_overview.md) diff --git a/website/translated_docs/pt/FormObjects/radio_overview.md b/website/translated_docs/pt/FormObjects/radio_overview.md index 7ebc29cf21d58a..13abfa0182e3a5 100644 --- a/website/translated_docs/pt/FormObjects/radio_overview.md +++ b/website/translated_docs/pt/FormObjects/radio_overview.md @@ -3,7 +3,7 @@ id: radiobuttonOverview title: Radio Button --- -## Overview +## Visão Geral Radio buttons are objects that allow the user to select one of a group of buttons. @@ -12,11 +12,12 @@ Usually, a radio button shows a small bullseye with text. However, radio buttons ![](assets/en/FormObjects/radio1.png) A radio button is selected: - - when the user clicks on it - when it has the focus and the user presses the **Space bar** key. -## Configuring radio buttons + + +## Configuração de botões radio Radio buttons are used in coordinated sets: only one button at a time can be selected in the set. In order to operate in a coordinated manner, a set of radio buttons must share the same [Radio Group](properties_Object.md#radio-group) property. @@ -25,18 +26,21 @@ Radio buttons are controlled with methods. Like all buttons, a radio button is s ![](assets/en/FormObjects/radio2.png) Selecting one radio button in a group sets that button to 1 and all of the others in the group to 0. Only one radio button can be selected at a time. - > You can associate [Boolean type expressions](properties_Object.md#variable-or-expression) with radio buttons. In this case, when a radio button in a group is selected, its variable is True and the variables for the group's other radio buttons are False. The value contained in a radio button object is not saved automatically (except if it is the representation of a Boolean field); radio button values must be stored in their variables and managed with methods. + + + ## Button Styles Radio [button styles](properties_TextAndPicture.md#button-style) control radio button's general appearance as well as its available properties. It is possible to apply different predefined styles to radio buttons. However, the same button style must be applied to all radio buttons in a group so that they work as expected. 4D provides radio buttons in the following predefined styles: -### Regular + +### Clássico The Regular radio button style is a standard system button (*i.e.*, a small bullseye with text) which executes code when a user clicks on it. @@ -44,7 +48,8 @@ The Regular radio button style is a standard system button (*i.e.*, a small bull In addition to initiating code execution, the Regular radio button style changes bullsey color when being hovered. -### Flat + +### Plano The Flat radio button style is a standard system button (*i.e.*, a small bullseye with text) which executes code when a user clicks on it. @@ -52,43 +57,50 @@ The Flat radio button style is a standard system button (*i.e.*, a small bullsey By default, the Flat style has a minimalist appearance. The Flat button style's graphic nature is particularly useful for forms that will be printed. -### Toolbar + +### Barra de ferramentas The Toolbar radio button style is primarily intended for integration in a toolbar. By default, the Toolbar style has a transparent background with a label in the center. The appearance of the button can be different when the cursor hovers over it depending on the OS: -- *Windows* - the button is highlighted. + - *Windows* - the button is highlighted. ![](assets/en/FormObjects/radio_toolbar.png) -- *macOS* - the highlight of the button never appears. + - *macOS* - the highlight of the button never appears. + + ### Bevel The Bevel radio button style is similar to the [Toolbar](#toolbar) style's behavior, except that it has a light gray background and a gray outline. The appearance of the button can be different when the cursor hovers over it depending on the OS: -- *Windows* - the button is highlighted. - - ![](assets/en/FormObjects/radio_bevel.png) + - *Windows* - the button is highlighted. + + ![](assets/en/FormObjects/radio_bevel.png) + + - *macOS* - the highlight of the button never appears. -- *macOS* - the highlight of the button never appears. ### Rounded Bevel The Rounded Bevel button style is nearly identical to the [Bevel](#bevel) style except, depending on the OS, the corners of the button may be rounded. -- *Windows* - the button is identical to the [Bevel](#bevel) style. + - *Windows* - the button is identical to the [Bevel](#bevel) style. + + - *macOS* - the corners of the button are rounded. ![](assets/en/FormObjects/roundedBevel.png) -- *macOS* - the corners of the button are rounded. ![](assets/en/FormObjects/roundedBevel.png) ### OS X Gradient The OS X Gradient button style is nearly identical to the [Bevel](#bevel) style except, depending on the OS, it may have a two-toned appearance. -- *Windows* - the button is identical to the [Bevel](#bevel) style. + - *Windows* - the button is identical to the [Bevel](#bevel) style. + + - *macOS* - the button is displayed as a two-tone system button. + -- *macOS* - the button is displayed as a two-tone system button. ### OS X Textured @@ -96,47 +108,55 @@ The OS X Textured radio button style is nearly identical to the [Toolbar](#toolb By default, the OS X Textured style appears as: -- *Windows* - a toolbar-like button with a label in the center and the background is always displayed. + - *Windows* - a toolbar-like button with a label in the center and the background is always displayed. + + - *macOS* - a standard system button displaying a color change from light to dark gray. Its height is predefined: it is not possible to enlarge or reduce it. + + ![](assets/en/FormObjects/OSXTextured.png) + -- *macOS* - a standard system button displaying a color change from light to dark gray. Its height is predefined: it is not possible to enlarge or reduce it. - - ![](assets/en/FormObjects/OSXTextured.png) ### Office XP -The Office XP button style combines the appearance of the [Regular](#regular) style with the [Toolbar](#toolbar) style's behavior. +O estilo de botão Office XP combina a aparência de estilo [Clássico](#regular) com o comportamento de estilo [Barra de ferramentas](#toolbar). The colors (highlight and background) of a button with the Office XP style are based on the system colors. The appearance of the button can be different when the cursor hovers over it depending on the OS: -- *Windows* - its background only appears when the mouse rolls over it. - - ![](assets/en/FormObjects/radio_xp.png) + - *Windows* - its background only appears when the mouse rolls over it. + + ![](assets/en/FormObjects/radio_xp.png) -- *macOS* - its background is always displayed. + - *macOS* - its background is always displayed. -### Collapse / Expand -This button style can be used to add a standard collapse/expand icon. These buttons are used natively in hierarchical lists. In Windows, the button looks like a [+] or a [-]; in macOS, it looks like a triangle pointing right or down. + +### Contrair/expandir + +This button style can be used to add a standard collapse/expand icon. Esses botões são usados nativamente em listas hierárquicas. Esses botões são usados nativamente em listas hierárquicas. ![](assets/en/FormObjects/checkbox_collapse.png) -### Disclosure Button + + +### Botão disclosure The disclosure radio button style displays the radio button as a standard disclosure button, usually used to show/hide additional information. The button symbol points downwards with value 0 and upwards with value 1. ![](assets/en/FormObjects/checkbox_disclosure.png) -### Custom + +### Personalizado The Custom radio button style accepts a personalized background picture and allows managing additional parameters such as [icon offset](properties_TextAndPicture.md#icon-offset) and [margins](properties_TextAndPicture.md#horizontalMargin). -## Supported properties + +## Propriedades compatíveis All radio buttons share the same set of basic properties: -[Bold](properties_Text.md#bold) - [Bottom](properties_CoordinatesAndSizing.md#bottom) - [Button Style](properties_TextAndPicture.md#button-style) - [Class](properties_Object.md#css-class) - [Expression Type](properties_Object.md#expression-type) - [Focusable](properties_Entry.md#focusable) - [Font](properties_Text.md#font) - [Font Color](properties_Text.md#font-color) - [Height](properties_CoordinatesAndSizing.md#height) - [Help Tip](properties_Help.md#help-tip) - [Horizontal Sizing](properties_ResizingOptions.md#horizontal-sizing) - [Italic](properties_Text.md#italic) - [Left](properties_CoordinatesAndSizing.md#left) - [Method](properties_Action.md#method) - [Object Name](properties_Object.md#object-name) - [Radio Group](properties_Object.md#radio-group) - [Right](properties_CoordinatesAndSizing.md#right) - [Shortcut](properties_Entry.md#shortcut) - [Title](properties_Object.md#title) - [Top](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [Underline](properties_Text.md#underline) - [Variable or Expression](properties_Object.md#variable-or-expression) - [Vertical Sizing](properties_ResizingOptions.md#vertical-sizing) - [Visibility](properties_Display.md#visibility) - [Width](properties_CoordinatesAndSizing.md#width) +[Negrito](properties_Text.md#bold) - [Inferior](properties_CoordinatesAndSizing.md#bottom) - [Estilo do botão](properties_TextAndPicture.md#button-style) - \[Classe\](properties_Object. md#css-class) - [Tipo de expressão](properties_Object.md#expression-type) - [Focável](properties_Entry.md#focusable) - \[Fonte\](properties_Text. md#font) - [Cor da fonte](properties_Text.md#font-color) - [Altura](properties_CoordinatesAndSizing.md#height) - [Conselho de ajuda](properties_Help.md#help-tip) - \[Tamanho horizontal\](properties_ResizingOptions. md#horizontal-sizing) - [Itálica](properties_Text.md#italic) - [Esquerda](properties_CoordinatesAndSizing.md#left) - \[Método\](properties_Action. md#method) - [Nome de objeto](properties_Object.md#object-name) - [Grupo de radio](properties_Object.md#radio-group) - \[Direita\](properties_CoordinatesAndSizing. md#right) - [Corte](properties_Entry.md#shortcut) - [Título](properties_Object.md#title) - [Acima](properties_CoordinatesAndSizing.md#top) - \[Tipo\](properties_Object. md#type) - [Sulinhado](properties_Text.md#underline) - [Variável ou Expressão](properties_Object.md#variable-or-expression) - \[Tamanho vertical\](properties_ResizingOptions. md#vertical-sizing) - [Visibilidade](properties_Display.md#visibility) - [Largura](properties_CoordinatesAndSizing.md#width) Additional specific properties are available depending on the [button style](#button-styles): - [Background pathname](properties_TextAndPicture.md#backgroundPathname) - [Horizontal Margin](properties_TextAndPicture.md#horizontalMargin) - [Icon Offset](properties_TextAndPicture.md#icon-offset) - [Vertical Margin](properties_TextAndPicture.md#verticalMargin) (Custom) -- [Number of States](properties_TextAndPicture.md#number-of-states) - [Picture pathname](properties_TextAndPicture.md#picture-pathname) - [Title/Picture Position](properties_TextAndPicture.md#title-picture-position) (Toolbar button, Bevel, Rounded Bevel, OS X Gradient, OS X Textured, Office XP, Custom) \ No newline at end of file +- [Número de estados](properties_TextAndPicture.md#number-of-states) - [Rota de imagem](properties_TextAndPicture.md#picture-pathname) - [Titulo/posição imagem](properties_TextAndPicture.md#title-picture-position) (botão Toolbar, Bevel, Bevel arredondado, OS X Gradient, OS X Textured, Office XP, Custom) diff --git a/website/translated_docs/pt/FormObjects/ruler.md b/website/translated_docs/pt/FormObjects/ruler.md index 12912f07f41bac..7ce6e435950417 100644 --- a/website/translated_docs/pt/FormObjects/ruler.md +++ b/website/translated_docs/pt/FormObjects/ruler.md @@ -3,7 +3,7 @@ id: ruler title: Ruler --- -## Overview +## Visão Geral The ruler is a standard interface object used to set or get values using a cursor moved along its graduations. @@ -14,10 +14,8 @@ You can assign its [associated variable or expression](properties_Object.md#expr For more information, please refer to [Using indicators](progressIndicator.md#using-indicatire) in the "Progress Indicator" page. ### Supported Properties - [Bold](properties_Text.md#bold) - [Border Line Style](properties_BackgroundAndBorder.md#border-line-style) -[Bottom](properties_CoordinatesAndSizing.md#bottom) - [Class](properties_Object.md#css-class) - [Display graduation](properties_Scale.md#display-graduation) - [Enterable](properties_Entry.md#enterable) - [Execute object method](properties_Action.md#execute-object-method) - [Expression Type](properties_Object.md#expression-type) - [Height](properties_CoordinatesAndSizing.md#height) - [Graduation step](properties_Scale.md#graduation-step) -[Help Tip](properties_Help.md#help-tip) - [Horizontal Sizing](properties_ResizingOptions.md#horizontal-sizing) - [Label Location](properties_Scale.md#label-location) - [Left](properties_CoordinatesAndSizing.md#left) - [Maximum](properties_Scale.md#maximum) - [Minimum](properties_Scale.md#minimum) - [Number Format](properties_Display.md#number-format) - [Object Name](properties_Object.md#object-name) - [Right](properties_CoordinatesAndSizing.md#right) - [Step](properties_Scale.md#step) - [Top](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [Variable or Expression](properties_Object.md#variable-or-expression) - [Vertical Sizing](properties_ResizingOptions.md#vertical-sizing) - [Visibility](properties_Display.md#visibility) - [Width](properties_CoordinatesAndSizing.md#width) -## See also - +## Veja também - [progress indicators](progressIndicator.md) -- [steppers](stepper.md) \ No newline at end of file +- [steppers](stepper.md) diff --git a/website/translated_docs/pt/FormObjects/shapes_overview.md b/website/translated_docs/pt/FormObjects/shapes_overview.md index 24e9eb932b8426..cf07f691e9f41f 100644 --- a/website/translated_docs/pt/FormObjects/shapes_overview.md +++ b/website/translated_docs/pt/FormObjects/shapes_overview.md @@ -1,6 +1,6 @@ --- id: shapesOverview -title: Shapes +title: Formas --- Shapes are [static objects](formObjects_overview.md#active-and-static-objects) that can be added to 4D forms. @@ -11,7 +11,8 @@ Shapes are [static objects](formObjects_overview.md#active-and-static-objects) t - lines - ovals -## Rectangle + +## Retângulo A static rectangle is a decorative object for forms. Rectangles are constrained to squared shapes. @@ -32,52 +33,56 @@ The design of rectangles is controlled through many properties (color, line thic } ``` -#### Supported Properties +#### Supported Properties [Bottom](properties_CoordinatesAndSizing.md#bottom) - [Class](properties_Object.md#css-class) - [Corner radius](properties_CoordinatesAndSizing.md#corner-radius) - [Dotted Line Type](properties_BackgroundAndBorder.md#dotted-line-type) - [Fill Color](properties_BackgroundAndBorder.md#background-color-fill-color) - [Height](properties_CoordinatesAndSizing.md#height) - [Horizontal Sizing](properties_ResizingOptions.md#horizontal-sizing) - [Left](properties_CoordinatesAndSizing.md#left) - [Line Color](properties_BackgroundAndBorder.md#line-color) - [Line Width](properties_BackgroundAndBorder.md#line-width) - [Object Name](properties_Object.md#object-name) - [Right](properties_CoordinatesAndSizing.md#right) - [Top](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [Vertical Sizing](properties_ResizingOptions.md#vertical-sizing) - [Visibility](properties_Display.md#visibility) - [Width](properties_CoordinatesAndSizing.md#width) -## Line +## Linha A static line is a decorative object for forms, drawn between two plots. Lines can be horizontal, vertical, or of any angle shapes. The design of lines is controlled through many properties (color, line thickness, etc.). -### startPoint property +### startPoint property The `startPoint` JSON property defines from which coordinate to draw the line (see example). > the `startPoint` property is not exposed in the Property List, where the line drawing direction is visible. + + #### JSON Examples: - "myLine": { - "type": "line", - "left": 20, - "top": 40, - "width": 100, - "height": 80, - "startPoint": "topLeft", //first direction - "strokeDashArray": "6 2" //dashed - } - - -Result: ![](assets/en/FormObjects/shape_line1.png) - - "myLine": { - "type": "line", - "left": 20, - "top": 40, - "width": 100, - "height": 80, - "startPoint": "bottomLeft", //2nd direction - "strokeDashArray": "6 2" //dashed - } - - -Result: ![](assets/en/FormObjects/shape_line2.png) +``` + "myLine": { + "type": "line", + "left": 20, + "top": 40, + "width": 100, + "height": 80, + "startPoint": "topLeft", //first direction + "strokeDashArray": "6 2" //dashed + } +``` +Resultado: ![](assets/en/FormObjects/shape_line1.png) + + +``` + "myLine": { + "type": "line", + "left": 20, + "top": 40, + "width": 100, + "height": 80, + "startPoint": "bottomLeft", //2nd direction + "strokeDashArray": "6 2" //dashed + } +``` +Resultado: ![](assets/en/FormObjects/shape_line2.png) -#### Supported Properties + +#### Supported Properties [Bottom](properties_CoordinatesAndSizing.md#bottom) - [Class](properties_Object.md#css-class) - [Dotted Line Type](properties_BackgroundAndBorder.md#dotted-line-type) - [Height](properties_CoordinatesAndSizing.md#height) - [Horizontal Sizing](properties_ResizingOptions.md#horizontal-sizing) - [Left](properties_CoordinatesAndSizing.md#left) - [Line Color](properties_BackgroundAndBorder.md#line-color) - [Line Width](properties_BackgroundAndBorder.md#line-width) - [Object Name](properties_Object.md#object-name) - [Right](properties_CoordinatesAndSizing.md#right) - [startPoint](#startpoint-property) - [Top](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [Vertical Sizing](properties_ResizingOptions.md#vertical-sizing) - [Visibility](properties_Display.md#visibility) - [Width](properties_CoordinatesAndSizing.md#width) ## Oval @@ -99,6 +104,6 @@ A static oval is a decorative object for forms. Oval objects can be used to draw } ``` -#### Supported Properties -[Bottom](properties_CoordinatesAndSizing.md#bottom) - [Class](properties_Object.md#css-class) - [Dotted Line Type](properties_BackgroundAndBorder.md#dotted-line-type) - [Fill Color](properties_BackgroundAndBorder.md#background-color-fill-color) - [Height](properties_CoordinatesAndSizing.md#height) - [Horizontal Sizing](properties_ResizingOptions.md#horizontal-sizing) - [Left](properties_CoordinatesAndSizing.md#left) - [Line Color](properties_BackgroundAndBorder.md#line-color) - [Line Width](properties_BackgroundAndBorder.md#line-width) - [Object Name](properties_Object.md#object-name) - [Right](properties_CoordinatesAndSizing.md#right) - [Top](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [Vertical Sizing](properties_ResizingOptions.md#vertical-sizing) - [Visibility](properties_Display.md#visibility) - [Width](properties_CoordinatesAndSizing.md#width) \ No newline at end of file +#### Supported Properties +[Bottom](properties_CoordinatesAndSizing.md#bottom) - [Class](properties_Object.md#css-class) - [Dotted Line Type](properties_BackgroundAndBorder.md#dotted-line-type) - [Fill Color](properties_BackgroundAndBorder.md#background-color-fill-color) - [Height](properties_CoordinatesAndSizing.md#height) - [Horizontal Sizing](properties_ResizingOptions.md#horizontal-sizing) - [Left](properties_CoordinatesAndSizing.md#left) - [Line Color](properties_BackgroundAndBorder.md#line-color) - [Line Width](properties_BackgroundAndBorder.md#line-width) - [Object Name](properties_Object.md#object-name) - [Right](properties_CoordinatesAndSizing.md#right) - [Top](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [Vertical Sizing](properties_ResizingOptions.md#vertical-sizing) - [Visibility](properties_Display.md#visibility) - [Width](properties_CoordinatesAndSizing.md#width) \ No newline at end of file diff --git a/website/translated_docs/pt/FormObjects/spinner.md b/website/translated_docs/pt/FormObjects/spinner.md index 0728c30c807d47..2b524f5601d66f 100644 --- a/website/translated_docs/pt/FormObjects/spinner.md +++ b/website/translated_docs/pt/FormObjects/spinner.md @@ -3,7 +3,7 @@ id: spinner title: Spinner --- -## Overview +## Visão Geral The spinner is a circular indicator that displays a continuous animation, like the [Barber shop](progressIndicator.md#barber-shop). @@ -17,5 +17,5 @@ When the form is executed, the object is not animated. You manage the animation * 0 = Stop animation ### Supported Properties - -[Border Line Style](properties_BackgroundAndBorder.md#border-line-style) - [Bottom](properties_CoordinatesAndSizing.md#bottom) - [Class](properties_Object.md#css-class) - [Expression Type](properties_Object.md#expression-type) - [Height](properties_CoordinatesAndSizing.md#height) -[Help Tip](properties_Help.md#help-tip) - [Horizontal Sizing](properties_ResizingOptions.md#horizontal-sizing) - [Left](properties_CoordinatesAndSizing.md#left) - [Object Name](properties_Object.md#object-name) - [Right](properties_CoordinatesAndSizing.md#right) - [Top](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [Variable or Expression](properties_Object.md#variable-or-expression) - [Vertical Sizing](properties_ResizingOptions.md#vertical-sizing) - [Visibility](properties_Display.md#visibility) - [Width](properties_CoordinatesAndSizing.md#width) \ No newline at end of file +[Border Line Style](properties_BackgroundAndBorder.md#border-line-style) - [Bottom](properties_CoordinatesAndSizing.md#bottom) - [Class](properties_Object.md#css-class) - [Expression Type](properties_Object.md#expression-type) - [Height](properties_CoordinatesAndSizing.md#height) -[Help Tip](properties_Help.md#help-tip) - [Horizontal Sizing](properties_ResizingOptions.md#horizontal-sizing) - [Left](properties_CoordinatesAndSizing.md#left) - [Object Name](properties_Object.md#object-name) - [Right](properties_CoordinatesAndSizing.md#right) - [Top](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [Variable or Expression](properties_Object.md#variable-or-expression) - [Vertical Sizing](properties_ResizingOptions.md#vertical-sizing) - [Visibility](properties_Display.md#visibility) - [Width](properties_CoordinatesAndSizing.md#width) + \ No newline at end of file diff --git a/website/translated_docs/pt/FormObjects/splitters.md b/website/translated_docs/pt/FormObjects/splitters.md index 23576af6111939..6be8bb93cb62bf 100644 --- a/website/translated_docs/pt/FormObjects/splitters.md +++ b/website/translated_docs/pt/FormObjects/splitters.md @@ -1,22 +1,23 @@ --- id: splitters -title: Splitter +title: Separador --- -## Overview +## Visão Geral -A splitter divides a form into two areas, allowing the user to enlarge and reduce the areas by moving the splitter one way or the other. A splitter can be either horizontal or vertical. The splitter takes into account each object’s resizing properties, which means that you can completely customize your database’s interface. A splitter may or may not be a “pusher.” +A splitter divides a form into two areas, allowing the user to enlarge and reduce the areas by moving the splitter one way or the other. A splitter can be either horizontal or vertical. O divisor leva em consideração as propriedades de redimensionamento de cada objeto, o que significa que pode personalizar completamente a interface de seu banco de dados. A splitter may or may not be a “pusher.” Splitter are used for example in output forms so that columns can be resized: ![](assets/en/FormObjects/split1.png) + Some of the splitter’s general characteristics: -* You can place as many splitters as you want in any type of form and use a mixture of horizontal and vertical splitters in the same form. -* A splitter can cross (overlap) an object. This object will be resized when the splitter is moved. -* Splitter stops are calculated so that the objects moved remain entirely visible in the form or do not pass under/next to another splitter. When the [Pusher](properties_ResizingOptions.md#pusher) property is associated with a splitter, its movement to the right or downward does not encounter any stops. -* If you resize a form using a splitter, the new dimensions of the form are saved only while the form is being displayed. Once a form is closed, the initial dimensions are restored. +* You can place as many splitters as you want in any type of form and use a mixture of horizontal and vertical splitters in the same form. +* A splitter can cross (overlap) an object. This object will be resized when the splitter is moved. +* Splitter stops are calculated so that the objects moved remain entirely visible in the form or do not pass under/next to another splitter. When the [Pusher](properties_ResizingOptions.md#pusher) property is associated with a splitter, its movement to the right or downward does not encounter any stops. +* If you resize a form using a splitter, the new dimensions of the form are saved only while the form is being displayed. Once a form is closed, the initial dimensions are restored. Once it is inserted, the splitter appears as a line. You can modify its [border style](properties_BackgroundAndBorder.md#border-line-style-dotted-line-type) to obtain a thinner line or [change its color](properties_BackgroundAndBorder.md##font-color-line-color). @@ -33,33 +34,31 @@ Once it is inserted, the splitter appears as a line. You can modify its [border } ``` -### Supported Properties -[Border Line Style](properties_BackgroundAndBorder.md##border-line-style-dotted-line-type) - [Bold](properties_Text.md#bold) - [Bottom](properties_CoordinatesAndSizing.md#bottom) - [Class](properties_Object.md#css-class) - [Font](properties_Text.md#font) - [Font Color](properties_Text.md#font-color) - [Height](properties_CoordinatesAndSizing.md#height) - [Help Tip](properties_Help.md#help-tip) - [Horizontal Sizing](properties_ResizingOptions.md#horizontal-sizing) - [Italic](properties_Text.md#italic) - [Left](properties_CoordinatesAndSizing.md#left) - [Line Color](properties_BackgroundAndBorder.md##font-color-line-color) - [Object Name](properties_Object.md#object-name) - [Pusher](properties_ResizingOptions.md#pusher) - [Right](properties_CoordinatesAndSizing.md#right) - [Title](properties_Object.md#title) -[Top](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [Underline](properties_Text.md#underline) - [Vertical Sizing](properties_ResizingOptions.md#vertical-sizing) - [Variable or Expression](properties_Object.md#variable-or-expression) - [Visibility](properties_Display.md#visibility) - [Width](properties_CoordinatesAndSizing.md#width) +### Supported Properties +[Estilo del borde](properties_BackgroundAndBorder.md##border-line-style-dotted-line-type) - [Negrita](properties_Text.md#bold) - \[Abaixo\](properties_CoordinatesAndSizing. md#bottom) - [Classe](properties_Object.md#css-class) - [Fuente](properties_Text.md#font) - \[Cor da fonte\](properties_Text. md#font-color) - [Altura](properties_CoordinatesAndSizing.md#height) - [Conselho de ajuda](properties_Help.md#help-tip) - \[Tamaño horizontal\](properties_ResizingOptions. md#horizontal-sizing) - [Itálica](properties_Text.md#italic) - [Esquerda](properties_CoordinatesAndSizing.md#left) - \[Cor da linha\](properties_BackgroundAndBorder. md##font-color-line-color) - [Nome de objeto](properties_Object.md#object-name) - [Pusher](properties_ResizingOptions.md) - \[Direita\](properties_CoordinatesAndSizing. md#right) - [Título](properties_Object.md#title) -[Acima](properties_CoordinatesAndSizing.md#top) - \[Tipo\](properties_Object. md#type) - [Sublinhado](properties_Text.md#underline) - [Tamanho vertical](properties_ResizingOptions.md#vertical-sizing) - \[Variável ou expressão\](properties_Object. md#variable-or-expression) - [Visibilidade](properties_Display.md#visibility) - [Largura](properties_CoordinatesAndSizing.md#width) -## Interaction with the properties of neighboring objects +## Interação com as propriedades dos objetos vizinhos In a form, splitters interact with the objects that are around them according to these objects’ resizing options: | Resizing options for the object(s) | Object(s) above an horizontal splitter or to the left of a vertical splitter (1) | Object(s) below an horizontal *non-Pusher* splitter or to the right of a vertical *non-Pusher* splitter | Object(s) below an horizontal *Pusher* splitter or to the right of a vertical *Pusher* splitter | | ---------------------------------- | ----------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | -| None | Remain as is | Are moved with the splitter (position relative to the splitter is not modified) until the next stop. The stop when moving to the bottom or right is either the window’s border, or another splitter. | Are moved with the splitter (position relative to the splitter is not modified) indefinitely. No stop is applied (see the next paragraph) | +| Nenhum | Remain as is | Are moved with the splitter (position relative to the splitter is not modified) until the next stop. The stop when moving to the bottom or right is either the window’s border, or another splitter. | Are moved with the splitter (position relative to the splitter is not modified) indefinitely. No stop is applied (see the next paragraph) | | Resize | Keep original position(s), but are resized according to the splitter’s new position | | | -| Move | Are moved with the splitter | | | - +| Mover | Are moved with the splitter | | | *(1) You cannot drag the splitter past the right (horizontal) or bottom (vertical) side of an object located in this position.* - > An object completely contained in the rectangle that defines the splitter is moved at the same time as the splitter. -## Managing splitters programmatically +## Gestão programada dos separadores You can associate an object method with a splitter and it will be called with the `On Clicked` event throughout the entire movement. A [variable](properties_Object.md#variable-or-expression) of the *Longint* type is associated with each splitter. This variable can be used in your object and/or form methods. Its value indicates the splitter’s current position, in pixels, in relation to its initial position. -* If the value is negative: the splitter was moved toward the top or toward the left, -* If the value is positive: the splitter was moved toward the bottom or toward the right, -* If the value is 0: the splitter was moved to its original position. +* If the value is negative: the splitter was moved toward the top or toward the left, +* If the value is positive: the splitter was moved toward the bottom or toward the right, +* If the value is 0: the splitter was moved to its original position. -You can also move the splitter programmatically: you just have to set the value of the associated variable. For example, if a vertical splitter is associated with a variable named `split1`, and if you execute the following statement: `split1:=-10`, the splitter will be moved 10 pixels to the left — as if the user did it manually. The move is actually performed at the end of the execution of the form or object method containing the statement. \ No newline at end of file +You can also move the splitter programmatically: you just have to set the value of the associated variable. For example, if a vertical splitter is associated with a variable named `split1`, and if you execute the following statement: `split1:=-10`, the splitter will be moved 10 pixels to the left — as if the user did it manually. The move is actually performed at the end of the execution of the form or object method containing the statement. diff --git a/website/translated_docs/pt/FormObjects/staticPicture.md b/website/translated_docs/pt/FormObjects/staticPicture.md index 804a3ecb072846..adb64faf7bcdaa 100644 --- a/website/translated_docs/pt/FormObjects/staticPicture.md +++ b/website/translated_docs/pt/FormObjects/staticPicture.md @@ -3,25 +3,29 @@ id: staticPicture title: Static picture --- -## Overview +## Visão Geral Static pictures are [static objects](formObjects_overview.md#active-and-static-objects) that can be used for various purposes in 4D forms, including decoration, background, or user interface: ![](assets/en/FormObjects/StaticPict.png) + Static pictures are stored outside the forms and inserted by reference. In the form editor, static picture objects are created by copy/paste or drag and drop operations. -> If you place a static picture on page 0 of a multi-page form, it will appear automatically as a background element on all pages. You can also include it in an inherited form, applied in the background of other different forms. Either way, your database will run faster than if the picture was pasted into each page. +> If you place a static picture on page 0 of a multi-page form, it will appear automatically as a background element on all pages. You can also include it in an inherited form, applied in the background of other different forms. De qualquer maneira, seu banco de dados roda mais rápido se a imagem for colada em cada página. + -## Format and location + +## Formato e localização The original picture must be stored in a format managed natively by 4D (4D recognizes the main picture formats: JPEG, PNG, BMP, SVG, GIF, etc.). Two main locations can be used for static picture path: -- in the **Resources** folder of the project database. Appropriate when you want to share static pictures between several forms in the database. In this case, the Pathname is in the "/RESOURCES/\". +- na pasta **Resources** do banco de dados projeto. Apropriado quando quiser compartir imagens estáticas entre vários formulários do banco de dados. In this case, the Pathname is in the "/RESOURCES/\". - in an image folder (e.g. named **Images**) within the form folder. Appropriate when the static pictures are used only in the form and/or yon want to be able to move or duplicate the whole form within the project or different projects. In this case, the Pathname is "<\picture path\>" and is resolved from the root of the form folder. + ## Supported Properties -[Bottom](properties_CoordinatesAndSizing.md#bottom) - [CSS Class](properties_Object.md#css-class) - [Display](properties_Picture.md#display) - [Height](properties_CoordinatesAndSizing.md#height) - [Horizontal Sizing](properties_ResizingOptions.md#horizontal-sizing) - [Left](properties_CoordinatesAndSizing.md#left) - [Object Name](properties_Object.md#object-name) - [Pathname](properties_Picture.md#pathname) - [Right](properties_CoordinatesAndSizing.md#right) - [Top](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [Vertical Sizing](properties_ResizingOptions.md#vertical-sizing) - [Visibility](properties_Display.md#visibility) - [Width](properties_CoordinatesAndSizing.md#width) \ No newline at end of file +[Bottom](properties_CoordinatesAndSizing.md#bottom) - [CSS Class](properties_Object.md#css-class) - [Display](properties_Picture.md#display) - [Height](properties_CoordinatesAndSizing.md#height) - [Horizontal Sizing](properties_ResizingOptions.md#horizontal-sizing) - [Left](properties_CoordinatesAndSizing.md#left) - [Object Name](properties_Object.md#object-name) - [Pathname](properties_Picture.md#pathname) - [Right](properties_CoordinatesAndSizing.md#right) - [Top](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [Vertical Sizing](properties_ResizingOptions.md#vertical-sizing) - [Visibility](properties_Display.md#visibility) - [Width](properties_CoordinatesAndSizing.md#width) diff --git a/website/translated_docs/pt/FormObjects/stepper.md b/website/translated_docs/pt/FormObjects/stepper.md index 513b62ce72a9bc..578f7e7e08d347 100644 --- a/website/translated_docs/pt/FormObjects/stepper.md +++ b/website/translated_docs/pt/FormObjects/stepper.md @@ -3,33 +3,37 @@ id: stepper title: Stepper --- -## Overview +## Visão Geral A stepper lets the user scroll through numeric values, durations (times) or dates by predefined steps by clicking on the arrow buttons. ![](assets/en/FormObjects/indicator_numericStepper.png) -## Using steppers +## Usando os steppers You can assign the variable associated with the object to an enterable area (field or variable) to store or modify the current value of the object. A stepper can be associated directly with a number, time or date variable. -* For values of the time type, the Minimum, Maximum and Step properties represent seconds. For example, to set a stepper from 8:00 to 18:00 with 10-minute steps: - * [minimum](properties_Scale.md#minium) = 28 800 (8*60*60) - * [maximum](properties_Scale.md#maximum) = 64 800 (18*60*60) - * [step](properties_Scale.md#step) = 600 (10*60) +* For values of the time type, the Minimum, Maximum and Step properties represent seconds. For example, to set a stepper from 8:00 to 18:00 with 10-minute steps: + * [mínimo](properties_Scale.md#minium) = 28 800 (8*60*60) + * [máximo](properties_Scale.md#maximum) = 64 800 (18*60*60) + * [passo](properties_Scale.md#step) = 600 (10*60) * For values of the date type, the value entered in the [step](properties_Scale.md#step) property represents days. The Minimum and Maximum properties are ignored. - -> For the stepper to work with a time or date variable, it is imperative to set its type in the form AND to declare it explicitly via the [C_TIME](https://doc.4d.com/4Dv17R5/4D/17-R5/C-TIME.301-4128557.en.html) or [C_DATE](https://doc.4d.com/4Dv17R5/4D/17-R5/C-DATE.301-4128570.en.html) command. +> > > For the stepper to work with a time or date variable, it is imperative to set its type in the form AND to declare it explicitly via the [C_TIME](https://doc.4d.com/4Dv17R5/4D/17-R5/C-TIME.301-4128557.en.html) or [C_DATE](https://doc.4d.com/4Dv17R5/4D/17-R5/C-DATE.301-4128570.en.html) command. For more information, please refer to [Using indicators](progressIndicator.md#using-indicatire) in the "Progress Indicator" page. ## Supported Properties +[Negrita](properties_Text.md#bold) - [Estilo da borda](properties_BackgroundAndBorder.md#Border-line-style) - [Fundo](properties_CoordinatesAndSizing.md#bottom) - \[Classe\](properties_Object. md#css-class) - [Colunas](properties_Crop.md#columns) - [Executar método objeto](properties_Action.md#execute-object-method) - \[Tipo de expressão\](properties_Object. md#expression-type) (só "inteiro", "número", "data" ou "hora") - [Altura](properties_CoordinatesAndSizing.md#height) - \[Conselho de ajuda\](properties_Help. md#help-tip) - [Tamanho horizontal](properties_ResizingOptions.md#horizontal-sizing) - [Esquerda](properties_CoordinatesAndSizing.md#left) - \[Máximo\](properties_Scale. md#maximum) - [Mínimo](properties_Scale.md#minimum) - [Nome de objeto](properties_Object.md#object-name) - \[Nome de objeto\](properties_Picture. md#pathname) - [Direita](properties_CoordinatesAndSizing.md#right) - [Linhas](properties_Crop.md#rows) - [Passo](properties_Scale.md#step) - \[Ação padrão\](properties_Action. md#standard-action) - [Acima](properties_CoordinatesAndSizing.md#top) - [Tipo](properties_Object.md#type) - \[Variável ou expressão\](properties_Object. md#variable-or-expression) - [Tamanho vertical](properties_ResizingOptions.md#vertical-sizing) - [Visibilidade](properties_Display.md#visibility) - [Largura](properties_CoordinatesAndSizing.md#width) + + +## Veja também +- [progress indicators](progressIndicator.md) +- [regras](ruler.md) + + + -[Bold](properties_Text.md#bold) - [Border Line Style](properties_BackgroundAndBorder.md#border-line-style) - [Bottom](properties_CoordinatesAndSizing.md#bottom) - [Class](properties_Object.md#css-class) - [Columns](properties_Crop.md#columns) - [Execute object method](properties_Action.md#execute-object-method) - [Expression Type](properties_Object.md#expression-type) (only "integer", "number", "date", or "time") - [Height](properties_CoordinatesAndSizing.md#height) - [Help Tip](properties_Help.md#help-tip) - [Horizontal Sizing](properties_ResizingOptions.md#horizontal-sizing) - [Left](properties_CoordinatesAndSizing.md#left) - [Maximum](properties_Scale.md#maximum) - [Minimum](properties_Scale.md#minimum) - [Object Name](properties_Object.md#object-name) - [Pathname](properties_Picture.md#pathname) - [Right](properties_CoordinatesAndSizing.md#right) - [Rows](properties_Crop.md#rows) - [Step](properties_Scale.md#step) - [Standard action](properties_Action.md#standard-action) - [Top](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [Variable or Expression](properties_Object.md#variable-or-expression) - [Vertical Sizing](properties_ResizingOptions.md#vertical-sizing) - [Visibility](properties_Display.md#visibility) - [Width](properties_CoordinatesAndSizing.md#width) -## See also -- [progress indicators](progressIndicator.md) -- [rulers](ruler.md) \ No newline at end of file diff --git a/website/translated_docs/pt/FormObjects/subform_overview.md b/website/translated_docs/pt/FormObjects/subform_overview.md index cda348e632890a..43a0bd4752f9c7 100644 --- a/website/translated_docs/pt/FormObjects/subform_overview.md +++ b/website/translated_docs/pt/FormObjects/subform_overview.md @@ -3,20 +3,22 @@ id: subformOverview title: Subform --- -## Overview +## Visão Geral A subform is a form included in another form. -### Terminology + +### Terminologia In order to clearly define the concepts implemented with subforms, here are some definitions for certain terms used: -* **Subform**: a form intended for inclusion in another form, itself called the parent form. -* **Parent form**: a form containing one or more subform(s). -* **Subform container**: an object included in the parent form, displaying an instance of the subform. -* **Subform instance**: the representation of a subform in a parent form. This concept is important because it is possible to display several instances of the same subform in a parent form. -* **List form**: instance of subform displayed as a list. -* **Detail form**: page-type input form associated with a list-type subform that can be accessed by double-clicking in the list. +* **Subform**: a form intended for inclusion in another form, itself called the parent form. +* **Parent form**: a form containing one or more subform(s). +* **Subform container**: an object included in the parent form, displaying an instance of the subform. +* **Subform instance**: the representation of a subform in a parent form. This concept is important because it is possible to display several instances of the same subform in a parent form. +* **List form**: instance of subform displayed as a list. +* **Detail form**: page-type input form associated with a list-type subform that can be accessed by double-clicking in the list. + ## List subforms @@ -30,6 +32,7 @@ You can also allow the user to enter data in the List form. Depending on the con > 4D offers three standard actions to meet the basic needs for managing subrecords: `Edit Subrecord`, `Delete Subrecord`, and `Add Subrecord`. When the form includes several subform instances, the action will apply to the subform that has the focus. + ## Page subforms Page subforms can display the data of the current subrecord or any type of pertinent value depending on the context (variables, pictures, and so on). One of the main advantages of using page subforms is that they can include advanced functionalities and can interact directly with the parent form (widgets). Page subforms also have their own specific properties and events; you can manage them entirely by programming. @@ -38,7 +41,7 @@ The page subform uses the input form indicated by the [Detail Form](properties_S > 4D Widgets are predefined compound objects based upon page subforms. They are described in detail in a separate manual, [4D Widgets](https://doc.4d.com/4Dv17R6/4D/17-R6/4D-Widgets.100-4465257.en.html). -### Managing the bound variable +### Gestão da variável vinculada The [variable](properties_Object.md#variable-or-expression) bound to a page subform lets you link the parent form and subform contexts to put the finishing touches on sophisticated interfaces. For example, imagine a subform representing a dynamic clock, inserted into a parent form containing an enterable variable of the Time type: @@ -49,7 +52,6 @@ Both objects (time variable and subform container) *have the same variable name* When the parent form is executed, the developer must take care to synchronize the variables using appropriate form events. Two types of interactions can occur: form to subform and vice versa. #### Updating subform contents - Case 1: The value of the parent form variable is modified and this modification must be passed on to the subform. In our example, the time of ParisTime changes to 12:15:00, either because the user entered it, or because it was updated dynamically (via the `Current time` command for example). In this case, you must use the On Bound Variable Change form event. This event must be selected in the subform properties; it is generated in the form method of the subform. @@ -75,7 +77,7 @@ Assigning the value to the variable generates the `On Data Change` form event in > If you "manually" move the hands of the clock, this also generates the `On Data Change` form event in the object method of the *clockValue* variable in the subform. -### Using the subform bound object +### Usar o objeto associado ao subformulário 4D automatically binds an object (`C_OBJECT`) to each subform. The contents of this object can be read and/or modified from within the context of the subform, allowing you to share values in a local context. @@ -91,19 +93,18 @@ You can modify the labels from the subform by assigning values to the *InvoiceAd C_OBJECT($lang) $lang:=New object If(<>lang="fr") - $lang.CompanyName:="Société :" - $lang.LastName:="Nom :" + $lang. CompanyName:="Société :" + $lang. LastName:="Nom :" Else - $lang.CompanyName:="Company:" - $lang.LastName:="Name:" + $lang. CompanyName:="Company:" + $lang. LastName:="Name:" End if - InvoiceAddress.Label:=$lang + InvoiceAddress. Label:=$lang ``` ![](assets/en/FormObjects/subforms5.png) -### Advanced inter-form programming - +### Programação entre formulários avançada Communication between the parent form and the instances of the subform may require going beyond the exchange of a value through the bound variable. In fact, you may want to update variables in subforms according to the actions carried out in the parent form and vice versa. If we use the previous example of the "dynamic clock" type subform, we may want to set one or more alarm times for each clock. 4D has implemented the following mechanisms to meet these needs: @@ -112,8 +113,8 @@ Communication between the parent form and the instances of the subform may requi - Calling of a container object from the subform using the `CALL SUBFORM CONTAINER` command, - Execution of a method in the context of the subform via the `EXECUTE METHOD IN SUBFORM` command. -#### Object get pointer and Object get name commands +#### Object get pointer and Object get name commands In addition to the `Object subform container` selector, the `OBJECT Get pointer` command accepts a parameter that indicates in which subform to search for the object whose name is specified in the second parameter. This syntax can only be used when the Object named selector is passed. For example, the following statement: @@ -133,8 +134,7 @@ The code of the event is unrestricted (for example, 20000 or -100). You can use For more information, refer to the description of the `CALL SUBFORM CONTAINER` command. #### EXECUTE METHOD IN SUBFORM command - -The `EXECUTE METHOD IN SUBFORM` command lets a form or one of its objects request the execution of a method in the context of the subform instance, which gives it access to the subform variables, objects, etc. This method can also receive parameters. +The `EXECUTE METHOD IN SUBFORM` command lets a form or one of its objects request the execution of a method in the context of the subform instance, which gives it access to the subform variables, objects, etc. This method can also receive parameters. This method can also receive parameters. This mechanism is illustrated in the following diagram: @@ -143,9 +143,10 @@ This mechanism is illustrated in the following diagram: For more information, refer to the description of the `EXECUTE METHOD IN SUBFORM` command. #### GOTO OBJECT command - The `GOTO OBJECT` command looks for the destination object in the parent form even if it is executed from a subform. + + ## Supported Properties -[Border Line Style](properties_BackgroundAndBorder.md#border-line-style) - [Bottom](properties_CoordinatesAndSizing.md#bottom) - [Class](properties_Object.md#css-class) - [Detail Form](properties_Subform.md#detail-form) - [Double click on empty row](properties_Subform.md#double-click-on-empty-row) - [Double click on row](properties_Subform.md#double-click-on-row) - [Enterable in list](properties_Subform.md#enterable-in-list) - [Expression Type](properties_Object.md#expression-type) - [Focusable](properties_Entry.md#focusable) - [Height](properties_CoordinatesAndSizing.md#height) - [Hide focus rectangle](properties_Appearance.md#hide-focus-rectangle) - [Horizontal Scroll Bar](properties_Appearance.md#horizontal-scroll-bar) - [Horizontal Sizing](properties_ResizingOptions.md#horizontal-sizing) - [Left](properties_CoordinatesAndSizing.md#left) - [List Form](properties_Subform.md#list-form) - [Method](properties_Action.md#method) - [Object Name](properties_Object.md#object-name) - [Print Frame](properties_Print.md#print-frame) - [Right](properties_CoordinatesAndSizing.md#right) - [Selection mode](properties_Subform.md#selection-mode) - [Source](properties_Subform.md#source) - [Top](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [Variable or Expression](properties_Object.md#variable-or-expression) - [Vertical Scroll Bar](properties_Appearance.md#vertical-scroll-bar) - [Vertical Sizing](properties_ResizingOptions.md#vertical-sizing) - [Visibility](properties_Display.md#visibility) - [Width](properties_CoordinatesAndSizing.md#width) \ No newline at end of file +[Border Line Style](properties_BackgroundAndBorder.md#border-line-style) - [Bottom](properties_CoordinatesAndSizing.md#bottom) - [Class](properties_Object.md#css-class) - [Detail Form](properties_Subform.md#detail-form) - [Double click on empty row](properties_Subform.md#double-click-on-empty-row) - [Double click on row](properties_Subform.md#double-click-on-row) - [Enterable in list](properties_Subform.md#enterable-in-list) - [Expression Type](properties_Object.md#expression-type) - [Focusable](properties_Entry.md#focusable) - [Height](properties_CoordinatesAndSizing.md#height) - [Hide focus rectangle](properties_Appearance.md#hide-focus-rectangle) - [Horizontal Scroll Bar](properties_Appearance.md#horizontal-scroll-bar) - [Horizontal Sizing](properties_ResizingOptions.md#horizontal-sizing) - [Left](properties_CoordinatesAndSizing.md#left) - [List Form](properties_Subform.md#list-form) - [Method](properties_Action.md#method) - [Object Name](properties_Object.md#object-name) - [Print Frame](properties_Print.md#print-frame) - [Right](properties_CoordinatesAndSizing.md#right) - [Selection mode](properties_Subform.md#selection-mode) - [Source](properties_Subform.md#source) - [Top](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [Variable or Expression](properties_Object.md#variable-or-expression) - [Vertical Scroll Bar](properties_Appearance.md#vertical-scroll-bar) - [Vertical Sizing](properties_ResizingOptions.md#vertical-sizing) - [Visibility](properties_Display.md#visibility) - [Width](properties_CoordinatesAndSizing.md#width) diff --git a/website/translated_docs/pt/FormObjects/tabControl.md b/website/translated_docs/pt/FormObjects/tabControl.md index d2689964072789..d01a2ee265ca82 100644 --- a/website/translated_docs/pt/FormObjects/tabControl.md +++ b/website/translated_docs/pt/FormObjects/tabControl.md @@ -25,6 +25,7 @@ If the tab control is wide enough to display all the tabs with both the labels a Under macOS, in addition to the standard position (top), the tab controls can also be aligned to the bottom. + ### JSON Example: ```4d @@ -38,12 +39,14 @@ Under macOS, in addition to the standard position (top), the tab controls can al } ``` + + ## Adding labels to a tab control There are several ways to supply the labels for a tab control: -* You can assign a [choice list](properties_DataSource.md#choice-list-static-list) to the tab control, either through a collection (static list) or a JSON pointer ("$ref") to a json list. Icons associated with list items in the Lists editor will be displayed in the tob control. -* You can create a Text array that contains the names of each page of the form. This code must be executed before the form is presented to the user. For example, you could place the code in the object method of the tab control and execute it when the `On Load` event occurs. +* You can assign a [choice list](properties_DataSource.md#choice-list-static-list) to the tab control, either through a collection (static list) or a JSON pointer ("$ref") to a json list. Icons associated with list items in the Lists editor will be displayed in the tob control. +* You can create a Text array that contains the names of each page of the form. This code must be executed before the form is presented to the user. For example, you could place the code in the object method of the tab control and execute it when the `On Load` event occurs. ```4d ARRAY TEXT(arrPages;3) @@ -51,9 +54,9 @@ There are several ways to supply the labels for a tab control: arrPages{2}:="Address" arrPages{3}:="Notes" ``` - > You can also store the names of the pages in a hierarchical list and use the `Load list` command to load the values into the array. + ## Managing tabs programmatically ### FORM GOTO PAGE command @@ -85,6 +88,6 @@ When you assign the `gotoPage` [standard action](properties_Action.md#standard-a For example, if the user selects the 3rd tab, 4D will display the third page of the current form (if it exists). -## Supported Properties -[Bold](properties_Text.md#bold) - [Bottom](properties_CoordinatesAndSizing.md#bottom) - [Choice List](properties_DataSource.md#choice-list-static-list) - [Class](properties_Object.md#css-class) - [Expression Type](properties_Object.md#expression-type) - [Font](properties_Text.md#font) - [Height](properties_CoordinatesAndSizing.md#height) - [Help Tip](properties_Help.md#help-tip) - [Horizontal Sizing](properties_ResizingOptions.md#horizontal-sizing) - [Italic](properties_Text.md#italic) - [Left](properties_CoordinatesAndSizing.md#left) - [Object Name](properties_Object.md#object-name) - [Pusher](properties_ResizingOptions.md#pusher) - [Right](properties_CoordinatesAndSizing.md#right) - [Standard action](properties_Action.md#standard-action) - [Tab Control Direction](properties_Appearance.md#tab-control-direction) - [Top](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [Underline](properties_Text.md#underline) - [Vertical Sizing](properties_ResizingOptions.md#vertical-sizing) - [Variable or Expression](properties_Object.md#variable-or-expression) - [Visibility](properties_Display.md#visibility) - [Width](properties_CoordinatesAndSizing.md#width) \ No newline at end of file +## Supported Properties +[Negrita](properties_Text.md#bold) - [Inferior](properties_CoordinatesAndSizing.md#bottom) - [Lista de opções](properties_DataSource.md#choice-list-static-list) - [Classe](properties_Object.md#css-class) - [Tipo de expressão](properties_Object.md#expression-type) - [Fonte](properties_Text.md#font) - [Tamanho de fonte](properties_Text.md#font-size) - [Altura](properties_CoordinatesAndSizing.md#height) - [Mensagem de ajuda](properties_Help.md#help-tip) - [Tamanho horizontal](properties_ResizingOptions.md#horizontal-sizing) - [Itálico](properties_Text.md#italic) - [Esquerda](properties_CoordinatesAndSizing.md#left) - [Nome de objeto](properties_Object.md#object-name) - [Direita](properties_CoordinatesAndSizing.md#right) - [Ação padrão](properties_Action.md#standard-action) - [Direção de controle aba](properties_Appearance.md#tab-control-direction) - [Superior](properties_CoordinatesAndSizing.md#top) - [Tipo](properties_Object.md#type) - [Sublinhado](properties_Text.md#underline) - [Tamanho vertical](properties_ResizingOptions.md#vertical-sizing) - [Variável ou expressão](properties_Object.md#variable-or-expression) - [Visibilidade](properties_Display.md#visibility) - [Largura](properties_CoordinatesAndSizing.md#width) diff --git a/website/translated_docs/pt/FormObjects/text.md b/website/translated_docs/pt/FormObjects/text.md index e9c3948f217aeb..f5d2faf2bfd7ce 100644 --- a/website/translated_docs/pt/FormObjects/text.md +++ b/website/translated_docs/pt/FormObjects/text.md @@ -1,9 +1,9 @@ --- -id: text -title: Text +id: texto +title: Texto --- -## Overview +## Visão Geral A text object allows you to display static written content (*e.g.*, instructions, titles, labels, etc.) on a form. These static text areas can become dynamic when they include dynamic references. For more information, refer to [Using references in static text](https://doc.4d.com/4Dv17R5/4D/17-R5/Using-references-in-static-text.300-4163725.en.html). @@ -23,7 +23,8 @@ A text object allows you to display static written content (*e.g.*, instructions } ``` -## Rotation + +## Rotação 4D lets you rotate text areas in your forms using the [Orientation](properties_Text.md#orientation) property. @@ -39,6 +40,6 @@ Once a text is rotated, you can still change its size or position, as well as al - If the object is resized in direction C, its [height](properties_CoordinatesAndSizing.md#height) is modified; - If the object is resized in direction B, both its [width](properties_CoordinatesAndSizing.md#width) and [height](properties_CoordinatesAndSizing.md#height) are modified. -## Supported Properties -[Bold](properties_Text.md#bold) - [Border Line Style](properties_BackgroundAndBorder.md#border-line-style) - [Bottom](properties_CoordinatesAndSizing.md#bottom) - [Class](properties_Object.md#css-class) - [Fill Color](properties_BackgroundAndBorder.md#fill-color) - [Font](properties_Text.md#font) - [Font Color](properties_Text.md#font-color) - [Height](properties_CoordinatesAndSizing.md#height) - [Horizontal Alignment](properties_Text.md#horizontal-alignment) - [Horizontal Sizing](properties_ResizingOptions.md#horizontal-sizing) - [Italic](properties_Text.md#italic) - [Left](properties_CoordinatesAndSizing.md#left) - [Line Color](properties_BackgroundAndBorder.md#line-color) - [Line Width](properties_BackgroundAndBorder.md#line-width) - [Object Name](properties_Object.md#object-name) - [Orientation](properties_Text.md#orientation) - [Right](properties_CoordinatesAndSizing.md#right) - [Title](properties_Object.md#title) - [Top](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [Underline](properties_Text.md#underline) - [Vertical Sizing](properties_ResizingOptions.md#vertical-sizing) - [Visibility](properties_Display.md#visibility) - [Width](properties_CoordinatesAndSizing.md#width) \ No newline at end of file +## Supported Properties +[Estilo daborde](properties_BackgroundAndBorder.md##border-line-style-dotted-line-type) - [Negrita](properties_Text.md#bold) - \[Abaixo\](properties_CoordinatesAndSizing. md#bottom) - [Classe](properties_Object.md#css-class) - [Fuente](properties_Text.md#font) - \[Cor da fonte\](properties_Text. md#font-color) - [Altura](properties_CoordinatesAndSizing.md#height) - [Conselho de ajuda](properties_Help.md#help-tip) - \[Tamaño horizontal\](properties_ResizingOptions. md#horizontal-sizing) - [Itálica](properties_Text.md#italic) - [Esquerda](properties_CoordinatesAndSizing.md#left) - \[Cor da linha\](properties_BackgroundAndBorder. md##font-color-line-color) - [Nome de objeto](properties_Object.md#object-name) - [Pusher](properties_ResizingOptions.md) - \[Direita\](properties_CoordinatesAndSizing. md#right) - [Título](properties_Object.md#title) -[Acima](properties_CoordinatesAndSizing.md#top) - \[Tipo\](properties_Object. md#type) - [Sublinhado](properties_Text.md#underline) - [Tamanho vertical](properties_ResizingOptions.md#vertical-sizing) - \[Variável ou expressão\](properties_Object. md#variable-or-expression) - [Visibilidade](properties_Display.md#visibility) - [Largura](properties_CoordinatesAndSizing.md#width) diff --git a/website/translated_docs/pt/FormObjects/viewProArea_overview.md b/website/translated_docs/pt/FormObjects/viewProArea_overview.md index 187a82350f9e7f..01b10740b37e74 100644 --- a/website/translated_docs/pt/FormObjects/viewProArea_overview.md +++ b/website/translated_docs/pt/FormObjects/viewProArea_overview.md @@ -1,6 +1,6 @@ --- id: viewProAreaOverview -title: 4D View Pro area +title: Área 4D View Pro --- 4D View Pro allows you to insert and display a spreadsheet area in your 4D forms. A spreadsheet is an application containing a grid of cells into which you can enter information, execute calculations, or display pictures. @@ -9,10 +9,12 @@ title: 4D View Pro area Once you use 4D View Pro areas in your forms, you can import and export spreadsheets documents. + ## Using 4D View Pro areas 4D View Pro areas are documented in the [4D View Pro Reference](https://doc.4d.com/4Dv17R6/4D/17-R6/4D-View-Pro-Reference.100-4351323.en.html) manual. + ## Supported Properties -[Border Line Style](properties_BackgroundAndBorder.md#border-line-style) - [Bottom](properties_CoordinatesAndSizing.md#bottom) - [Class](properties_Object.md#css-class) - [Height](properties_CoordinatesAndSizing.md#height) - [Horizontal Sizing](properties_ResizingOptions.md#horizontal-sizing) - [Left](properties_CoordinatesAndSizing.md#left) - [Method](properties_Action.md#method) - [Object Name](properties_Object.md#object-name) - [Right](properties_CoordinatesAndSizing.md#right) - [Show Formula Bar](properties_Appearance.md#show-formula-bar) - [Type](properties_Object.md#type) - [User Interface](properties_Appearance.md#user-interface) - [Vertical Sizing](properties_ResizingOptions.md#vertical-sizing) - [Visibility](properties_Display.md#visibility) - [Width](properties_CoordinatesAndSizing.md#width) \ No newline at end of file +[Border Line Style](properties_BackgroundAndBorder.md#border-line-style) - [Bottom](properties_CoordinatesAndSizing.md#bottom) - [Class](properties_Object.md#css-class) - [Height](properties_CoordinatesAndSizing.md#height) - [Horizontal Sizing](properties_ResizingOptions.md#horizontal-sizing) - [Left](properties_CoordinatesAndSizing.md#left) - [Method](properties_Action.md#method) - [Object Name](properties_Object.md#object-name) - [Right](properties_CoordinatesAndSizing.md#right) - [Show Formula Bar](properties_Appearance.md#show-formula-bar) - [Type](properties_Object.md#type) - [User Interface](properties_Appearance.md#user-interface) - [Vertical Sizing](properties_ResizingOptions.md#vertical-sizing) - [Visibility](properties_Display.md#visibility) - [Width](properties_CoordinatesAndSizing.md#width) diff --git a/website/translated_docs/pt/FormObjects/webArea_overview.md b/website/translated_docs/pt/FormObjects/webArea_overview.md index d1f9cd0bf735ba..bd7a094bdd3b3f 100644 --- a/website/translated_docs/pt/FormObjects/webArea_overview.md +++ b/website/translated_docs/pt/FormObjects/webArea_overview.md @@ -1,49 +1,46 @@ --- id: webAreaOverview -title: Web Area +title: Área Web --- -## Overview +## Visão Geral -The Web areas can display various types of Web content within your forms: HTML pages with static or dynamic contents, files, pictures, Javascript, etc. The rendering engine of the Web area depends on the execution platform of the application and the selected [rendering engine option](properties_WebArea.md#use-embedded-web-rendering-engine). +As áreas web podem mostrar vários tipos de conteúdo web dentro de seus formulários: Páginas HTML com conteúdos estáticos ou dinâmicos, arquivos, imagens, Javascript, etc. As áreas web podem mostrar vários tipos de conteúdo web dentro de seus formulários: Páginas HTML com conteúdos estáticos ou dinâmicos, arquivos, imagens, Javascript, etc. O motor de renderizado da área web depende da plataforma de execução da aplicação e de [a opção motor de renderizado](properties_WebArea.md#use-embedded-web-rendering-engine) selecionada. As áreas web podem mostrar vários tipos de conteúdo web dentro de seus formulários: Páginas HTML com conteúdos estáticos ou dinâmicos, arquivos, imagens, Javascript, etc. O motor de renderizado da área web depende da plataforma de execução da aplicação e de [a opção motor de renderizado](properties_WebArea.md#use-embedded-web-rendering-engine) selecionada. -It is possible to create several Web areas in the same form. Note, however, that the use of Web areas must follow [several rules](#web-areas-rules). +É possível criar várias áreas web no mesmo formulário. Lembre que o uso das áreas web deve seguir [várias regras](#web-areas-rules). -Several dedicated [standard actions](#standard-actions), numerous [language commands](https://doc.4d.com/4Dv18/4D/18/Web-Area.201-4504309.en.html) as well as generic and specific [form events](#form-events) allow the developer to control the functioning of Web areas. Specific variables can be used to exchange information between the area and the 4D environment. +Várias [ações padrão](#standard-actions) dedicadas, numerosos [comandos de linguagem](https://doc.4d.com/4Dv18/4D/18/Web-Area.201-4504309.en.html) assim como também [eventos formulário](#form-events) genéricos e específicos, permitem ao desenvolvedor controlar o funcionamento das áreas web. Specific variables can be used to exchange information between the area and the 4D environment. +> Não é recomendado nem o uso de plugins web nem de applets de Java nas áreas web porque podem provocar instabilidade no funcionamento de 4D, especialmente a nível de gestão de eventos. -> The use of Web plugins and Java applets is not recommended in Web areas because they may lead to instability in the operation of 4D, particularly at the event management level. -## Specific properties +## Propriedades específicas ### Associated variables -Two specific variables can be associated with each Web area: - -- [`URL`](properties_WebArea.md#url) --to control the URL displayed by the Web area -- [`Progression`](properties_WebArea.md#progression) -- to control the loading percentage of the page displayed in the Web area. +Duas variáveis específicas podem ser associadas a cada área web: +- [`URL`](properties_WebArea.md#url) --para controlar a URL que mostra a área web +- [`Progresión`](properties_WebArea.md#progression) -- para controlar a porcentagem de carga da página mostrada na área web. ### Web rendering engine -You can choose between [two rendering engines](properties_WebArea.md#use-embedded-web-rendering-engine) for the Web area, depending on the specifics of your application. +Pode escolher entre [dois motores de renderização](properties_WebArea.md#use-embedded-web-rendering-engine) para a área web, dependendo das particularidades de sua aplicação. -Selecting the embedded web rendering engine allows you to call 4D methods from the Web area. +A seleção do motor de renderização web aninhado permite chamar aos métodos 4D desde a área web. ### Access 4D methods - -When the [Access 4D methods](properties_WebArea.md#access-4d-methods) property is selected, you can call 4D methods from a Web area. +Quando selecionar a propriedade [Acessar aos métodos 4D](properties_WebArea.md#access-4d-methods), pode chamar aos métodos 4D desde uma área Web. > This property is only available if the Web area [uses the embedded Web rendering engine](#use-embedded-web-rendering-engine). ### $4d object -The [4D embedded Web rendering engine](#use-embedded-web-rendering-engine) supplies the area with a JavaScript object named $4d that you can associate with any 4D project method using the "." object notation. +O [motor de renderização web embebido de 4D](#use-embedded-web-rendering-engine) fornece à área um objeto JavaScript chamado $4d que pode ser associado a qualquer método projeto 4D utilizando a notação objeto ".". For example, to call the `HelloWorld` 4D method, you just execute the following statement: ```codeJS -$4d.HelloWorld(); +$4d. HelloWorld(); ``` - > JavaScript is case sensitive so it is important to note that the object is named $4d (with a lowercase "d"). The syntax of calls to 4D methods is as follows: @@ -51,7 +48,6 @@ The syntax of calls to 4D methods is as follows: ```codeJS $4d.4DMethodName(param1,paramN,function(result){}) ``` - - `param1...paramN`: You can pass as many parameters as you need to the 4D method. These parameters can be of any type supported by JavaScript (string, number, array, object). - `function(result)`: Function to pass as last argument. This "callback" function is called synchronously once the 4D method finishes executing. It receives the `result` parameter. @@ -60,8 +56,7 @@ $4d.4DMethodName(param1,paramN,function(result){}) > By default, 4D works in UTF-8. When you return text containing extended characters, for example characters with accents, make sure the encoding of the page displayed in the Web area is declared as UTF-8, otherwise the characters may be rendered incorrectly. In this case, add the following line in the HTML page to declare the encoding: `` -#### Example 1 - +#### Exemplo 1 Given a 4D project method named `today` that does not receive parameters and returns the current date as a string. 4D code of `today` method: @@ -71,13 +66,13 @@ Given a 4D project method named `today` that does not receive parameters and ret $0:=String(Current date;System date long) ``` -In the Web area, the 4D method can be called with the following syntax: +Na área web, o método 4D pode ser chamado com a sintaxe abaixo: ```js $4d.today() ``` -The 4D method does not receive any parameters but it does return the value of $0 to the callback function called by 4D after the execution of the method. We want to display the date in the HTML page that is loaded by the Web area. +The 4D method does not receive any parameters but it does return the value of $0 to the callback function called by 4D after the execution of the method. Queremos mostrar a data na página HTML que é carrega pela área Web. Here is the code of the HTML page: @@ -98,7 +93,7 @@ $4d.today(function(dollarZero) ``` -#### Example 2 +#### Exemplo 2 The 4D project method `calcSum` receives parameters (`$1...$n`) and returns their sum in `$0`: @@ -114,7 +109,7 @@ The 4D project method `calcSum` receives parameters (`$1...$n`) and returns thei End for ``` -The JavaScript code run in the Web area is: +O código JavaScript que roda na área web é: ```js $4d.calcSum(33, 45, 75, 102.5, 7, function(dollarZero) @@ -123,13 +118,15 @@ $4d.calcSum(33, 45, 75, 102.5, 7, function(dollarZero) }); ``` -## Standard actions -Four specific standard actions are available for managing Web areas automatically: `Open Back URL`, `Open Next URL`, `Refresh Current URL` and `Stop Loading URL`. These actions can be associated with buttons or menu commands and allow quick implementation of basic Web interfaces. These actions are described in [Standard actions](https://doc.4d.com/4Dv17R6/4D/17-R6/Standard-actions.300-4354791.en.html). +## Ações padrão + +Há quatro ações padrão específicas para gerenciar as áreas web de forma automática: `Open Back URL`, `Open Next URL`, `Refresh Current URL` e `Stop Loading URL`. Essas ações podem ser associadas com botões ou comandos de menu e permite implementação rápida de interfaces web básicas. These actions are described in [Standard actions](https://doc.4d.com/4Dv17R6/4D/17-R6/Standard-actions.300-4354791.en.html). -## Form events -Specific form events are intended for programmed management of Web areas, more particularly concerning the activation of links: +## Eventos formulário + +Os eventos formulários específicos estão destinados à gestão programadas das áreas web, mais concretamente à ativação de links: - `On Begin URL Loading` - `On URL Resource Loading` @@ -139,66 +136,70 @@ Specific form events are intended for programmed management of Web areas, more p - `On Open External Link` - `On Window Opening Denied` -In addition, Web areas support the following generic form events: +Além disso, áreas web são compatíveis com os eventos de formulário genéricos abaixo: - `On Load` - `On Unload` - `On Getting Focus` - `On Losing Focus` -## Web area rules -### User interface +## Regras das áreas web -When the form is executed, standard browser interface functions are available to the user in the Web area, which permit interaction with other form areas: +### User interface -- **Edit menu commands**: When the Web area has the focus, the **Edit** menu commands can be used to carry out actions such as copy, paste, select all, etc., according to the selection. -- **Context menu**: It is possible to use the standard [context menu](properties_Entry.md#context-menu) of the system with the Web area. Display of the context menu can be controlled using the `WA SET PREFERENCE` command. -- **Drag and drop**: The user can drag and drop text, pictures and documents within the Web area or between a Web area and the 4D form objects, according to the 4D object properties. For security reasons, changing the contents of a Web area by means of dragging and dropping a file or URL is not allowed by default. In this case, the mouse cursor displays a "forbidden" icon ![](assets/en/FormObjects/forbidden.png). You have to use the `WA SET PREFERENCE` command to explicitly allow the dropping of URLs or files in the area. +Quando o formulário for executado, as funções da interface de navegador padrão estão disponíveis para o usuário na área web, o que permite a interação com outras áreas do formulário: -### Subforms +- **Comandos menu Edição**: quando a área web tiver o foco, os comandos do menu **Edição** podem ser utilizadas para realizar ações como copiar, colar, selecionar tudo, etc., segundo a seleção. +- **O menu contextual**: é possível utilizar o [menu contextual](properties_Entry.md#context-menu) padrão do sistema com a área web. Display of the context menu can be controlled using the `WA SET PREFERENCE` command. +- **Arrastar e soltar**: o usuário pode arrastar e soltar texto, imagens e documentos dentro da área web ou entre uma área web e os objetos dos formulários 4D, segundo as propriedades dos objetos 4D. Por razões de segurança, não é permitido mudar os conteúdos da área Web arrastando e soltando seja um arquivo ou URL. Nesse caso, o cursor do mouse mostra um ícone "proibido" ![ mark=](assets/es/FormObjects/forbidden.png). Precisa utilizar o comando `WA SET PREFERENCE` para permitir explicitamente soltar URLs ou arquivos na área. -For reasons related to window redrawing mechanisms, the insertion of a Web area into a subform is subject to the following constraints: +### Subformulários +Por razões relacionadas com os mecanismos de redesenho de janelas, a inserção de uma área web em um subformulário está sujeita às restrições abaixo: - The subform must not be able to scroll -- The limits of the Web area must not exceed the size of the subform +- Os limites da área Web não devem ultrapassar o tamanho do subformulário -> Superimposing a Web area on top of or beneath other form objects is not supported. +> Não é compatível sobrepor uma área Web no topo ou debaixo dos outros objetos formulário. -### Web Area and Web server conflict (Windows) -Under Windows, it is not recommended to access, via a Web area, the Web server of the 4D application containing the area because this configuration could lead to a conflict that freezes the application. Of course, a remote 4D can access the Web server of 4D Server, but not its own Web server. +### Web Area and Web server conflict (Windows) +Em Windows, não é recomendado acessar, através de uma área web, o servidor web da aplicação 4D que contenha a área, já que esta configuração poderia provocar um conflito que paralise a aplicação. Com certeza um 4D remoto pode acessar ao servidor web de 4D Server, mas não ao seu próprio servidor web. ### Web plugins and Java applets - -The use of Web plugins and Java applets is not recommended in Web areas because they may lead to instability in the operation of 4D, particularly at the event management level. +Não é recomendado nem o uso de plugins web nem de applets de Java nas áreas web porque podem provocar instabilidade no funcionamento de 4D, especialmente a nível de gestão de eventos. ### Insertion of protocol (macOS) +As URLs manejadas por programação em áreas web em macOS devem começar com o protocolo. For example, you need to pass the string "http://www.mysite.com" and not just "www.mysite.com". -The URLs handled by programming in Web areas under macOS must begin with the protocol. For example, you need to pass the string "http://www.mysite.com" and not just "www.mysite.com". - -## Access to Web inspector - -You can view and use a Web inspector within Web areas of your forms. The Web inspector is a debugger which is provided by the embedded Web engine. It allows to parse the code and the flow of information of the Web pages. -### Displaying the Web inspector +## Acesso ao inspetor Web +Pode ver e usar um inspetor web dentro das áreas web de seus formulários. O inspetor web é um depurador que oferece o motor integrado web. Permite analisar o código e o fluxo de informação das páginas web. -The following conditions must be met in order to view the Web inspector in a Web area: +### Exibir o inspetor Web +Para poder visualizar o inspetor web em uma área web devem ser cumprirdas as condições abaixo: -- You must [select the embedded Web rendering engine](properties_WebArea.md#use-embedded-web-rendering-engine) for the area (the Web inspector is only available with this configuration). -- You must enable the [context menu](properties_Entry.md#context-menu) for the area (this menu is used to call the inspector) -- You must expressly enable the use of the inspector in the area by means of the following statement: +- O motor de renderização web integrado [ deve ser selecionado](properties_WebArea.md#use-embedded-web-rendering-engine) para a área (o inspetor web só está disponível com esta configuração). +- Deve ativar o [menu contextual](properties_Entry.md#context-menu) da área (este menu se utiliza para chamar ao inspetor) +- Deve habilitar expressamente ao uso do inspetor na área mediante a instrução abaixo: ```4d WA SET PREFERENCE(*;"WA";WA enable Web inspector;True) ``` -### Using the Web inspector +### Usando o inspetor web +When you have done the settings as described above, you then have new options such as **Inspect Element** in the context menu of the area. Quando selecionar essa opção, a janela do inspetor Web é exibida. + +> O inspetor Web é incluído no motor de renderização web integrado. Para uma descrição detalhada nas funcionalidades do depurador, veja a documentação fornecida pelo motor de renderização web. + -When you have done the settings as described above, you then have new options such as **Inspect Element** in the context menu of the area. When you select this option, the Web inspector window is displayed. -> The Web inspector is included in the embedded Web rendering engine. For a detailed description of the features of this debugger, refer to the documentation provided by the Web rendering engine. ## Supported Properties -[Border Line Style](properties_BackgroundAndBorder.md#border-line-style) - [Bottom](properties_CoordinatesAndSizing.md#bottom) - [Class](properties_Object.md#css-class) - [Context Menu](properties_Entry.md#context-menu) - [Height](properties_CoordinatesAndSizing.md#height) - [Horizontal Sizing](properties_ResizingOptions.md#horizontal-sizing) - [Left](properties_CoordinatesAndSizing.md#left) - [Method](properties_Action.md#method) - [Object Name](properties_Object.md#object-name) - [Progression](properties_WebArea.md#progression) - [Right](properties_CoordinatesAndSizing.md#right) - [Top](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [URL](properties_WebArea.md#url) - [Use embedded Web rendering engine](properties_WebArea.md#use-embedded-web-rendering-engine) - [Variable or Expression](properties_Object.md#variable-or-expression) - [Vertical Sizing](properties_ResizingOptions.md#vertical-sizing) - [Visibilty](properties_Display.md#visibility) - [Width](properties_CoordinatesAndSizing.md#width) \ No newline at end of file +[Border Line Style](properties_BackgroundAndBorder.md#border-line-style) - [Bottom](properties_CoordinatesAndSizing.md#bottom) - [Class](properties_Object.md#css-class) - [Context Menu](properties_Entry.md#context-menu) - [Height](properties_CoordinatesAndSizing.md#height) - [Horizontal Sizing](properties_ResizingOptions.md#horizontal-sizing) - [Left](properties_CoordinatesAndSizing.md#left) - [Method](properties_Action.md#method) - [Object Name](properties_Object.md#object-name) - [Progression](properties_WebArea.md#progression) - [Right](properties_CoordinatesAndSizing.md#right) - [Top](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [URL](properties_WebArea.md#url) - [Use embedded Web rendering engine](properties_WebArea.md#use-embedded-web-rendering-engine) - [Variable or Expression](properties_Object.md#variable-or-expression) - [Vertical Sizing](properties_ResizingOptions.md#vertical-sizing) - [Visibilty](properties_Display.md#visibility) - [Width](properties_CoordinatesAndSizing.md#width) + + + + + diff --git a/website/translated_docs/pt/FormObjects/writeProArea_overview.md b/website/translated_docs/pt/FormObjects/writeProArea_overview.md index 3438484a3ff6a2..e129cfd965a825 100644 --- a/website/translated_docs/pt/FormObjects/writeProArea_overview.md +++ b/website/translated_docs/pt/FormObjects/writeProArea_overview.md @@ -3,14 +3,17 @@ id: writeProAreaOverview title: 4D Write Pro area --- -4D Write Pro offers 4D users an advanced word-processing tool, fully integrated with your 4D database. Using 4D Write Pro, you can write pre-formatted emails and/or letters containing images, a scanned signature, formatted text and placeholders for dynamic variables. You can also create invoices or reports dynamically, including formatted text and images. +4D Write Pro oferece aos usuários de 4D uma ferramenta avançada de processamento de textos, totalmente integrada ao seu banco de dados 4D. Using 4D Write Pro, you can write pre-formatted emails and/or letters containing images, a scanned signature, formatted text and placeholders for dynamic variables. You can also create invoices or reports dynamically, including formatted text and images. + ![](assets/en/FormObjects/writePro2.png) + ## Using 4D Write Pro areas 4D Write Pro areas are documented in the [4D Write Pro Reference](https://doc.4d.com/4Dv17R6/4D/17-R6/4D-Write-Pro.100-4433851.fe.html) manual. ## Supported Properties -[Auto Spellcheck](properties_Entry.md#auto-spellcheck) - [Border Line Style](properties_BackgroundAndBorder.md#border-line-style) - [Bottom](properties_CoordinatesAndSizing.md#bottom) - [Class](properties_Object.md#css-class) - [Context Menu](properties_Entry.md#context-menu) - [Enterable](properties_Entry.md#enterable) - [Focusable](properties_Entry.md#focusable) - [Height](properties_CoordinatesAndSizing.md#height) - [Hide focus rectangle](properties_Appearance.md#hide-focus-rectangle) - [Horizontal Scroll Bar](properties_Appearance.md#horizontal-scroll-bar) - [Horizontal Sizing](properties_ResizingOptions.md#horizontal-sizing) - [Keyboard Layout](properties_Entry.md#keyboard-layout) - [Left](properties_CoordinatesAndSizing.md#left) - [Method](properties_Action.md#method) - [Object Name](properties_Object.md#object-name) - [Print Variable Frame](properties_Print.md#print-frame) - [Resolution](properties_Appearance.md#resolution) - [Right](properties_CoordinatesAndSizing.md#right) - [Selection always visible](properties_Entry.md#selection-always-visible) - [Show background](properties_Appearance.md#show-background) - [Show footers](properties_Appearance.md#show-footers) - [Show Formula Bar](properties_Appearance.md#show-formula-bar) - [Show headers](properties_Appearance.md#show-headers) - [Show hidden characters](properties_Appearance.md#show-hidden-characters) - [Show horizontal ruler](properties_Appearance.md#show-horizontal-ruler) - [Show HTML WYSIWYG](properties_Appearance.md#show-html-wysiwyg) - [Show page frame](properties_Appearance.md#show-page-frame) - [Show references](properties_Appearance.md#show-references) - [Show vertical ruler](properties_Appearance.md#show-vertical-ruler) - [Type](properties_Object.md#type) - [User Interface](properties_Appearance.md#user-interface) - [Vertical Sizing](properties_ResizingOptions.md#vertical-sizing) - [Vertical Scroll Bar](properties_Appearance.md#vertical-scroll-bar) - [View mode](properties_Appearance.md#view-mode) - [Visibility](properties_Display.md#visibility) - [Width](properties_CoordinatesAndSizing.md#width) - [Zoom](properties_Appearance.md#zoom) \ No newline at end of file +[Revisão ortográfica automática](properties_Entry.md#auto-spellcheck) - \[Estilo da borda\](properties_BackgroundAndBorder. md#border-line-style) - [Bottom](properties_CoordinatesAndSizing.md#bottom) - [Classe](properties_Object.md#css-class) - \[Menu contextual\](properties_Entry. md#context-menu) - [Editável](properties_Entry.md#enterable) - [Focável](properties_Entry.md#focusable) - \[Altura\](properties_CoordinatesAndSizing. md#height) - [Ocultar retângulo de enfoque](properties_Appearance.md#hide-focus-rectangle) - \[Barra de deslizamento horizontal\](properties_Appearance. md#horizontal-scroll-bar) - [Tamanho horizontal](properties_ResizingOptions.md#horizontal-sizing) - \[Disposição do teclado\](properties_Entry. md#keyboard-layout) - [Esquerda](properties_CoordinatesAndSizing.md#left) - [Método](properties_Action.md#method) - \[Nome de objeto\](properties_Object. md#object-name) - [Imprimir marco variável](properties_Print.md#print-frame) - [Resolução](properties_Appearance.md#resolution) - \[Direita\](properties_CoordinatesAndSizing. md#right) - [Seleciona sempre visível](properties_Entry.md#selection-always-visible) - \[Mostrar fundo\](properties_Appearance. md#show-background) - [Mostrar rodapés](properties_Appearance.md#Show-footers) - [Mostrar barra de fórmulas](properties_Appearance.md#Show-formula-bar) - [Mostrar cabeçalhos](properties_Appearance.md#show-headers) - \[Mostrar caracteres ocultos\](properties_Appearance. md#show-hidden-characters) - [Mostrar régua horizontal](properties_Appearance.md#show-horizontal-ruler) - \[Mostrar HTML WYSIWYG\](properties_Appearance. md#show-html-wysiwyg) - [Mostrar marco de página](properties_Appearance.md#show-page-frame) - \[Mostrar referências\](properties_Appearance. md#show-references) - [Mostrar régua vertical](properties_Appearance.md#show-vertical-ruler) - \[Tipo\](properties_Object. md#type) - [Interface de usuário](properties_Appearance.md#user-interface) - [Tamanho vertical](properties_ResizingOptions.md#vertical-sizing) - \[Barra de deslizamento vertical\](properties_Appearance. md#vertical-scroll-bar) - [Modo de visualização](properties_Appearance.md#view-mode) - \[Visibilidade\](properties_Display. md#visibility) - AnLargra, - [Zoom](properties_Appearance.md#zoom) + diff --git a/website/translated_docs/pt/GettingStarted/Installation.md b/website/translated_docs/pt/GettingStarted/Installation.md new file mode 100644 index 00000000000000..53dbf2790e7035 --- /dev/null +++ b/website/translated_docs/pt/GettingStarted/Installation.md @@ -0,0 +1,182 @@ +--- +id: installation +title: Instalação e ativação +--- + +Welcome to 4D! Vai encontrar abaixo toda informação necessário para instalar e registrar sua aplicação 4D. + + +## Required configuration + +Consulte a [página de descarga de produto](https://us.4d.com/product-download) no web site de 4D para conhecer a configuração mínima de Mac / Windows para sua serie 4D. + +Todos os detalhes estão disponíveis na [página Recursos](https://us.4d.com/resources/feature-release) do website de 4D. + + +## Installation on disk + +Os produtos 4D são instalados desde o website de 4D: + +1. Utilizando seu navegador, conecte-se ao website de 4D e vá à página de [Descargas/downloads](https://us.4d.com/product-download/Feature-Release). +2. Clique no link de download do seu produto e siga as instruções exibidas na tela. + + +## Ativação de um produto + +Once installed on your disk, you must activate your 4D products in order to be able to use them. Também é preciso ativar qualquer licença adicional que obter. + +No activation is required for the following uses: + +- 4D used in remote mode (connection to a 4D Server) +- 4D usado em modo local com um banco de dados interpretado, sem acesso ao modo Desenho. + +**Importante:** deve ter uma conexão a Internet e uma conta de correio eletrônico para ativar seus produtos. + +### Ativação de 4D + +1. Lançar a aplicação 4D. +2. Selecione o comando **Gestão de licenças...** de menu **Ajuda**. + +![](assets/en/getStart/helpMenu.png) + +Se mostra a caixa de diálogo **Gestão de licenças** (a página de Ativação Instantânea está selecionada por padrão). Ver a próxima seção. + +> Quando abrir/criar uma aplicação local interpretada com 4D Developer Edition, um mecanismo de autoativação é implementado. Nesse caso, uma caixa de diálogo informa que vai ser conectado a nosso banco de dados de cliente e que suas licenças serão ativadas (deverá introduzir a senha de sua conta 4D). + +### Activação de 4D Server + +1. Lançar a aplicação 4D Server. The dialog box for choosing the [activation mode](#activation-mode) appears. + +![](assets/en/getStart/helpMenu.png) + + +## Modo de ativação de 4D + +4D offers three activation modes. We recommend **Instant Activation**. + +### Instant Activation + +Enter your user ID (email or 4D account) as well as your password. If you do not have an existing user account, you will need to create it at the following address: + +[https://account.4d.com/us/login.shtml](https://account.4d.com/us/login.shtml) + +![](assets/en/getStart/activ1.png) + +Then enter the license number of the product you want to activate. This number is provided by email or by mail after a product is purchased. + +![](assets/en/getStart/activ2.png) + + +### Deferred Activation + +If you are unable to use [instant activation](#instant-activation) because your computer does not have internet access, please proceed to deferred activation using the following steps. + +1. In the License Manager window, select the **Deferred Activation** tab. +2. Enter the License Number and your e-mail address, then click **Generate file** to create the ID file (*reg.txt*). + +![](assets/en/getStart/activ3.png) + +3. Save the *reg.txt* file to a USB drive and take it to a computer that has internet access. +4. On the machine with internet access, login to [https://activation.4d.com](https://activation.4d.com). +5. On the Web page, click on the **Choose File...** button and select the *reg.txt* file from steps 3 and 4; then click on the **Activate** button. +6. Download the serial file(s). + +![](assets/en/getStart/activ4.png) + +7. Save the *license4d* file(s) on a shared media and transfer them back to the 4D machine from step 1. +8. Now back on the machine with 4D, still on the **Deferred Activation** page, click **Next**; then click the **Load...** button and select a *license4d* file from the shared media from step 7. + +![](assets/en/getStart/activ5.png) + +With the license file loaded, click on **Next**. + +![](assets/en/getStart/activ6.png) + +9. Click on the **Add N°** button to add another license. Repeat these steps until all licenses from step 6 have been integrated. + +Your 4D application is now activated. + +### Emergency Activation + +This mode can be used for a special temporary activation of 4D (5 days maximum) without connecting to the 4D Web site. This activation can only be used one time. + + +## Adding licenses + +You can add new licenses, for example to extend the capacities of your application, at any time. + +Choose the **License Manager...** command from the **Help** menu of the 4D or 4D Server application, then click on the **Refresh** button: + +![](assets/en/getStart/licens1.png) + +This button connects you to our customer database and automatically activates any new or updated licenses related to the current license (the current license is displayed in **bold** in the "Active Licenses" list). You will just be prompted for your user account and password. + +- If you purchased additional expansions for a 4D Server, you do not need to enter any license number -- just click **Refresh**. +- At the first activation of a 4D Server, you just need to enter the server number and all the purchased expansions are automatically assigned. + +You can use the **Refresh** button in the following contexts: + +- When you have purchased an additional expansion and want to activate it, +- When you need to update an expired temporary number (Partners or evolutions). + + + +## 4D Online Store + +In 4D Store, you can order, upgrade, extend, and/or manage 4D products. You can reach the store at the following address: [https://store.4d.com/us/](https://store.4d.com/us/) (you will need to select your country). + +Click **Login** to sign in using your existing account or **New Account** to create a new one, then follow the on-screen instructions. + +### License Management + +After you log in, you can click on **License list** at the top right of the page: + +![](assets/en/getStart/licens2.png) + +Here you can manage your licenses by assigning them to projects. + +Select the appropriate license from the list then click **Link to a project... >**: + +![](assets/en/getStart/licens3.png) + +You can either select an existing project or create a new one: + +![](assets/en/getStart/licens4.png) + +![](assets/en/getStart/licens5.png) + +You can use projects to organize your licenses according to your needs: + +![](assets/en/getStart/licens6.png) + + +## Troubleshooting + +If the installation or activation process fails, please check the following table, which gives the most common causes of malfunctioning: + +| Sintomas | Possible causes | Solution(s) | +| ------------------------------------------------------------- | ---------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | +| Impossible to download product from 4D Internet site | Internet site unavailable, antivirus application, firewall | 1- Try again later OR 2- Temporarily disable your antivirus application or your firewall. | +| Impossible to install product on disk (installation refused). | Insufficient user access rights | Open a session with access rights allowing you to install applications (administrator access) | +| Failure of on-line activation | Antivirus application, firewall, proxy | 1- Temporarily disable your antivirus application or your firewall OR 2- Use deferred activation (not available with licenses for "R" versions) | + +If this information does not help you resolve your problem, please contact 4D or your local distributor. + + +## Contactos + +For any questions about the installation or activation of your product, please contact 4D, Inc. or your local distributor. + +For the US: + +- Web: [https://us.4d.com/4d-technical-support](https://us.4d.com/4d-technical-support) +- Telephone: 1-408-557-4600 + +For the UK: + +- Web: [https://uk.4d.com/4d-technical-support](https://uk.4d.com/4d-technical-support) +- Telephone: 01625 536178 + + +Encontre a comunidade de desenvolvedores de 4D online aqui: [https://discuss.4d.com](https://discuss.4d.com). + diff --git a/website/translated_docs/pt/MSC/analysis.md b/website/translated_docs/pt/MSC/analysis.md index 1eb448b41b4981..7c7df78b1fd4ce 100644 --- a/website/translated_docs/pt/MSC/analysis.md +++ b/website/translated_docs/pt/MSC/analysis.md @@ -4,8 +4,7 @@ title: Activity analysis Page sidebar_label: Activity analysis Page --- -The Activity analysis page allows viewing the contents of the current log file. This function is useful for parsing the use of a database or detecting the operation(s) that caused errors or malfunctions. In the case of a database in client-server mode, it allows verifying operations performed by each client machine. - +The Activity analysis page allows viewing the contents of the current log file. Esta função é útil para analisar o uso de um banco de dados ou detectar as operações que causaram erros ou mal funcionamento. No caso de um banco de dados em modo cliente-servidor, permite verificar as operações realizadas por cada máquina cliente. > It is also possible to rollback the operations carried out on the data of the database. For more information, refer to [Rollback page](rollback.md). ![](assets/en/MSC/MSC_analysis.png) @@ -16,7 +15,6 @@ This information allows you to identify the source and context of each operation - **Operation**: Sequence number of operation in the log file. - **Action**: Type of operation performed on the data. This column can contain one of the following operations: - - Opening of Data File: Opening of a data file. - Closing of Data File: Closing of an open data file. - Creation of a Context: Creation of a process that specifies an execution context. @@ -28,15 +26,15 @@ This information allows you to identify the source and context of each operation - Start of Transaction: Transaction started. - Validation of Transaction: Transaction validated. - Cancellation of Transaction: Transaction cancelled. -- **Table**: Table to which the added/deleted/modified record or BLOB belongs. +- **Table**: Table to which the added/deleted/modified record or BLOB belongs. - **Primary Key/BLOB**: contents of the primary key for each record (when the primary key consists of several fields, the values are separated by semi-colons) or sequence number of the BLOB involved in the operation. - **Process**: Internal number of process in which the operation was carried out. This internal number corresponds to the context of the operation. - **Size**: Size (in bytes) of data processed by the operation. - **Date and Hour**: Date and hour when the operation was performed. -- **User**: Name of the user that performed the operation. In client-server mode, the name of the client-side machine is displayed; in single-user mode, the ID of the user is displayed. If the 4D passwords are not enabled, this column is blank. +- **Usuario**: nome de usuário que realizou a operação. Em modo cliente-servidor, o nome da máquina do lado do cliente é exibido; em modo monousuário, a ID do usuário é exibida. Se as senhas 4D não foram ativadas, esta coluna fica em branco. - **Values**: Values of fields for the record in the case of addition or modification. The values are separated by “;”. Only values represented in alphanumeric form are displayed. - ***Note:** If the database is encrypted and no valid data key corresponding to the open log file has been provided, encrypted values are not displayed in this column.* + ***Note:** If the database is encrypted and no valid data key corresponding to the open log file has been provided, encrypted values are not displayed in this column.* - **Records**: Record number. -Click on **Analyze** to update the contents of the current log file of the selected database (named by default dataname.journal). The Browse button can be used to select and open another log file for the database. The **Export...** button can be used to export the contents of the file as text. \ No newline at end of file +Clique em **Analisar** para atualizar o conteúdo do arquivo de histórico atual do banco selecionada (chamado como padrão dataname.journal). O botão Navegar pode ser usado para selecionar e abrir outro arquivo de histórico para o banco de dados. The **Export...** button can be used to export the contents of the file as text. diff --git a/website/translated_docs/pt/MSC/backup.md b/website/translated_docs/pt/MSC/backup.md index 908bbd3f3460c6..b16605c9028fce 100644 --- a/website/translated_docs/pt/MSC/backup.md +++ b/website/translated_docs/pt/MSC/backup.md @@ -10,10 +10,10 @@ You can use the Backup page to view some backup parameters of the database and t This page consists of the following three areas: -- **Backup File Destination**: displays information about the location of the database backup file. It also indicates the free/used space on the backup disk. -- **Last Backup Information**: provides the date and time of the last backup (automatic or manual) carried out on the database. +- **Destino do arquivo de cópia de segurança**: mostra informação sobre a localização do arquivo de cópia de segurança do banco de dados. It also indicates the free/used space on the backup disk. +- **Informação da última copia de segurança**: oferece a data e a hora da última cópia de segurança (automática ou manual) realizada no banco de dados. - **Contents of the backup file**: lists the files and folders included in the backup file. The **Backup** button is used to launch a manual backup. -This page cannot be used to modify the backup parameters. To do this, you must click on the **Database properties...** button. \ No newline at end of file +This page cannot be used to modify the backup parameters. To do this, you must click on the **Database properties...** button. diff --git a/website/translated_docs/pt/MSC/compact.md b/website/translated_docs/pt/MSC/compact.md index 890fa636d3671e..81acb75abeb628 100644 --- a/website/translated_docs/pt/MSC/compact.md +++ b/website/translated_docs/pt/MSC/compact.md @@ -10,38 +10,36 @@ You use this page to access the data file compacting functions. Compacting files meets two types of needs: -- **Reducing size and optimization of files**: Files may contain unused spaces (“holes”). In fact, when you delete records, the space that they occupied previously in the file becomes empty. 4D reuses these empty spaces whenever possible, but since data size is variable, successive deletions or modifications will inevitably generate unusable space for the program. The same goes when a large quantity of data has just been deleted: the empty spaces remain unassigned in the file. The ratio between the size of the data file and the space actually used for the data is the occupation rate of the data. A rate that is too low can lead, in addition to a waste of space, to the deterioration of database performance. Compacting can be used to reorganize and optimize storage of the data in order to remove the “holes”. The “Information” area summarizes the data concerning the fragmentation of the file and suggests operations to be carried out. The [Data](information.md#data) tab on the “Information” page of the MSC indicates the fragmentation of the current data file. +- **Redução do tamanho e otimização dos arquivos**: os arquivos podem conter espaços não utilizados ("ocos"). In fact, when you delete records, the space that they occupied previously in the file becomes empty. 4D reuses these empty spaces whenever possible, but since data size is variable, successive deletions or modifications will inevitably generate unusable space for the program. The same goes when a large quantity of data has just been deleted: the empty spaces remain unassigned in the file. The ratio between the size of the data file and the space actually used for the data is the occupation rate of the data. A rate that is too low can lead, in addition to a waste of space, to the deterioration of database performance. Compacting can be used to reorganize and optimize storage of the data in order to remove the “holes”. The “Information” area summarizes the data concerning the fragmentation of the file and suggests operations to be carried out. The [Data](information.md#data) tab on the “Information” page of the MSC indicates the fragmentation of the current data file. - **Complete updating of data** by applying the current formatting set in the structure file. This is useful when data from the same table were stored in different formats, for example after a change in the database structure. - -> Compacting is only available in maintenance mode. If you attempt to carry out this operation in standard mode, a warning dialog box will inform you that the database will be closed and restarted in maintenance mode. You can compact a data file that is not opened by the database (see [Compact records and indexes](#compact-records-and-indexes) below). +> Compacting is only available in maintenance mode. Se tentar realizar essa operação em modo padrão, uma caixa de diálogo de aviso informará que o banco de dados será fechado e reiniciado em modo manutenção. Pode compactar um arquivo de dados que não esteja aberto pelo banco de dados (ver [Compactar os registros e os índices](#compact-records-and-indexes) abaixo). ## Standard compacting To directly begin the compacting of the data file, click on the compacting button in the MSC window. ![](assets/en/MSC/MSC_compact.png) - > Since compacting involves the duplication of the original file, the button is disabled when there is not adequate space available on the disk containing the file. This operation compacts the main file as well as any index files. 4D copies the original files and puts them in a folder named **Replaced Files (Compacting)**, which is created next to the original file. If you have carried out several compacting operations, a new folder is created each time. It will be named “Replaced Files (Compacting)_1”, “Replaced Files (Compacting)_2”, and so on. You can modify the folder where the original files are saved using the advanced mode. -When the operation is completed, the compacted files automatically replace the original files. The database is immediately operational without any further manipulation. - +When the operation is completed, the compacted files automatically replace the original files. O banco de dados fica operacional imediatamente sem outras manipulações. > When the database is encrypted, compacting includes decryption and encryption steps and thus, requires the current data encryption key. If no valid data key has already been provided, a dialog box requesting the passphrase or the data key is displayed. **Warning:** Each compacting operation involves the duplication of the original file which increases the size of the application folder. It is important to take this into account (especially under macOS where 4D applications appear as packages) so that the size of the application does not increase excessively. Manually removing the copies of the original file inside the package can be useful in order to keep the package size down. ## Open log file -After compacting is completed, 4D generates a log file in the Logs folder of the database. This file allows you to view all the operations carried out. It is created in XML format and named: *DatabaseName**_Compact_Log_yyyy-mm-dd hh-mm-ss.xml*" where: +Depois que a compactação termina, 4D gera um arquivo de histórico na pasta Logs do banco de dados. This file allows you to view all the operations carried out. É criada no formato XML e se chama *DatabaseName**_Compact_Log_yyyy-mm-dd hh-mm-ss.xml*" onde: -- *DatabaseName* is the name of the project file without any extension, for example "Invoices", +- *NomBase* é o nome do arquivo de estrutura sem extensão, por exemplo "Faturas", - *yyyy-mm-dd hh-mm-ss* is the timestamp of the file, based upon the local system time when the maintenance operation was started, for example "2019-02-11 15-20-45". When you click on the **Open log file** button, 4D displays the most recent log file in the default browser of the machine. -## Advanced mode + +## Modo avançado The Compact page contains an **Advanced>** button, which can be used to access an options page for compacting data file. @@ -60,17 +58,14 @@ When this option is checked, 4D rewrites every record for each table during the - When an external storage option for Text, Picture or BLOB data has been changed after data were entered. This can happen when databases are converted from a version prior to v13. As is the case with the retyping described above, 4D does not convert data already entered retroactively. To do this, you can force records to be updated in order to apply the new storage mode to records that have already been entered. - When tables or fields were deleted. In this case, compacting with updating of records recovers the space of these removed data and thus reduces file size. - > All the indexes are updated when this option is selected. ### Compact address table - (option only active when preceding option is checked) This option completely rebuilds the address table for the records during compacting. This optimizes the size of the address table and is mainly used for databases where large volumes of data were created and then deleted. In other cases, optimization is not a decisive factor. Note that this option substantially slows compacting and invalidates any sets saved using the `SAVE SET` command. Moreover, we strongly recommend deleting saved sets in this case because their use can lead to selections of incorrect data. - > - Compacting takes records of tables that have been put into the Trash into account. If there are a large number of records in the Trash, this can be an additional factor that may slow down the operation. -> - Using this option makes the address table, and thus the database, incompatible with the current journal file (if there is one). It will be saved automatically and a new journal file will have to be created the next time the database is launched. -> - You can decide if the address table needs to be compacted by comparing the total number of records and the address table size in the [Information](information.md) page of the MSC. \ No newline at end of file +> - Using this option makes the address table, and thus the database, incompatible with the current journal file (if there is one). Será salvado automaticamente e um novo arquivo de histórico será criado na próxima vez que o banco for lançado. +> - You can decide if the address table needs to be compacted by comparing the total number of records and the address table size in the [Information](information.md) page of the MSC. diff --git a/website/translated_docs/pt/MSC/encrypt.md b/website/translated_docs/pt/MSC/encrypt.md index 4d4f5e2ee0e98c..c513e1a8349f6b 100644 --- a/website/translated_docs/pt/MSC/encrypt.md +++ b/website/translated_docs/pt/MSC/encrypt.md @@ -4,53 +4,48 @@ title: Encrypt Page sidebar_label: Encrypt Page --- -You can use this page to encrypt or *decrypt* (i.e. remove encryption from) the data file, according to the **Encryptable** attribute status defined for each table in the database. For detailed information about data encryption in 4D, please refer to the "Encrypting data" section. +You can use this page to encrypt or *decrypt* (i.e. remove encryption from) the data file, according to the **Encryptable** attribute status defined for each table in the database. Para informação detalhada sobre criptografia em 4D, veja a seção "Criptografia de dados". A new folder is created each time you perform an encryption/decryption operation. It is named "Replaced Files (Encrypting) *yyyy-mm-dd hh-mm-ss*> or "Replaced Files (Decrypting) *yyyy-mm-dd hh-mm-ss*". +> Encryption is only available in [maintenance mode](overview.md#display-in-maintenance-mode). Se tentar realizar essa operação no modo padrão, um diálogo de aviso informará que o banco será fechado e se reiniciará no modo de manutenção -> Encryption is only available in [maintenance mode](overview.md#display-in-maintenance-mode). If you attempt to carry out this operation in standard mode, a warning dialog will inform you that the database will be closed and restarted in maintenance mode - -**Warning:** - -- Encrypting a database is a lengthy operation. It displays a progress indicator (which could be interrupted by the user). Note also that a database encryption operation always includes a compacting step. +**Aviso:** +- A criptografia de um banco de dados é uma operação demorada. It displays a progress indicator (which could be interrupted by the user). Note também que a operação de criptografia de um banco de dados sempre inclui um passo de compactação. - Each encryption operation produces a copy of the data file, which increases the size of the application folder. It is important to take this into account (especially in macOS where 4D applications appear as packages) so that the size of the application does not increase excessively. Manually moving or removing the copies of the original file inside the package can be useful in order to minimize the package size. ## Encrypting data for the first time - Encrypting your data for the first time using the MSC requires the following steps: 1. In the Structure editor, check the **Encryptable** attribute for each table whose data you want to encrypt. See the "Table properties" section. -2. Open the Encrypt page of the MSC. If you open the page without setting any tables as **Encryptable**, the following message is displayed in the page: ![](assets/en/MSC/MSC_encrypt1.png) Otherwise, the following message is displayed: ![](assets/en/MSC/MSC_encrypt2.png) This means that the **Encryptable** status for at least one table has been modified and the data file still has not been encrypted. **Note: **The same message is displayed when the **Encryptable** status has been modified in an already encrypted data file or after the data file has been decrypted (see below). +2. Open the Encrypt page of the MSC. Open the Encrypt page of the MSC. **Note: **The same message is displayed when the **Encryptable** status has been modified in an already encrypted data file or after the data file has been decrypted (see below). 3. Click on the Encrypt picture button. - ![](assets/en/MSC/MSC_encrypt3.png) - You will be prompted to enter a passphrase for your data file: ![](assets/en/MSC/MSC_encrypt4.png) The passphrase is used to generate the data encryption key. A passphrase is a more secure version of a password and can contain a large number of characters. For example, you could enter a passphrases such as "We all came out to Montreux" or "My 1st Great Passphrase!!" The security level indicator can help you evaluate the strength of your passphrase: ![](assets/en/MSC/MSC_encrypt5.png) (deep green is the highest level) + ![](assets/en/MSC/MSC_encrypt3.png) + You will be prompted to enter a passphrase for your data file: ![](assets/en/MSC/MSC_encrypt4.png) The passphrase is used to generate the data encryption key. A passphrase is a more secure version of a password and can contain a large number of characters. For example, you could enter a passphrases such as "We all came out to Montreux" or "My 1st Great Passphrase!!" The security level indicator can help you evaluate the strength of your passphrase: ![](assets/en/MSC/MSC_encrypt5.png) (deep green is the highest level) 4. Enter to confirm your secured passphrase. -The encrypting process is then launched. If the MSC was opened in standard mode, the database is reopened in maintenance mode. +The encrypting process is then launched. Se o MSC foi aberto em modo padrão, o banco de dados é reaberto em modo manutenção. 4D offers to save the encryption key (see [Saving the encryption key](#saving-the-encryption-key) below). You can do it at this moment or later. You can also open the encryption log file. If the encryption process is successful, the Encrypt page displays Encryption maintenance operations buttons. -**Warning:** During the encryption operation, 4D creates a new, empty data file and fills it with data from the original data file. Records belonging to "encryptable" tables are encrypted then copied, other records are only copied (a compacting operation is also executed). If the operation is successful, the original data file is moved to a "Replaced Files (Encrypting)" folder. If you intend to deliver an encrypted data file, make sure to move/remove any unencrypted data file from the database folder beforehand. +**Warning:** During the encryption operation, 4D creates a new, empty data file and fills it with data from the original data file. Records belonging to "encryptable" tables are encrypted then copied, other records are only copied (a compacting operation is also executed). If the operation is successful, the original data file is moved to a "Replaced Files (Encrypting)" folder. Se tentar entregar um arquivo de dados criptografado, tenha certeza de antes mover/remover qualquer arquivo de dados não criptografado na pasta de banco de dados. ## Encryption maintenance operations +Quando um banco de dados for criptografado (ver abaixo), a página de Criptografia oferece operações de manutenção de criptografia, correspondentes aos cenários padrão. ![](assets/en/MSC/MSC_encrypt6.png) -When a database is encrypted (see above), the Encrypt page provides several encryption maintenance operations, corresponding to standard scenarios. ![](assets/en/MSC/MSC_encrypt6.png) ### Providing the current data encryption key - For security reasons, all encryption maintenance operations require that the current data encryption key be provided. - If the data encryption key is already loaded in the 4D keychain(1), it is automatically reused by 4D. - If the data encryption key is not found, you must provide it. The following dialog is displayed: ![](assets/en/MSC/MSC_encrypt7.png) At this step, you have two options: +- enter the current passphrase(2) and click **OK**. OU +- connect a device such as a USB key and click the **Scan devices** button. -- enter the current passphrase(2) and click **OK**. OR -- connect a device such as a USB key and click the **Scan devices** button. - -(1) The 4D keychain stores all valid data encrpytion keys entered during the application session. +(1) The 4D keychain stores all valid data encrpytion keys entered during the application session. (2) The current passphrase is the passphrase used to generate the current encryption key. In all cases, if valid information is provided, 4D restarts in maintenance mode (if not already the case) and executes the operation. @@ -65,7 +60,6 @@ This operation is useful when the **Encryptable** attribute has been modified fo The data file is properly re-encrypted with the current key and a confirmation message is displayed: ![](assets/en/MSC/MSC_encrypt8.png) ### Change your passphrase and re-encrypt data - This operation is useful when you need to change the current encryption data key. For example, you may need to do so to comply with security rules (such as requiring changing the passphrase every three months). 1. Click on **Change your passphrase and re-encrypt data**. @@ -73,31 +67,28 @@ This operation is useful when you need to change the current encryption data key 3. Enter the new passphrase (for added security, you are prompted to enter it twice): ![](assets/en/MSC/MSC_encrypt9.png) The data file is encrypted with the new key and the confirmation message is displayed. ![](assets/en/MSC/MSC_encrypt8.png) ### Decrypt all data - This operation removes all encryption from the data file. If you no longer want to have your data encrypted: 1. Click on **Decrypt all data**. 2. Enter the current data encryption key (see Providing the current data encryption key). The data file is fully decrypted and a confirmation message is displayed: ![](assets/en/MSC/MSC_encrypt10.png) - > Once the data file is decrypted, the encryption status of tables do not match their Encryptable attributes. To restore a matching status, you must deselect all **Encryptable** attributes at the database structure level. ## Saving the encryption key -4D allows you to save the data encryption key in a dedicated file. Storing this file on an external device such a USB key will facilitate the use of an encrypted database, since the user would only need to connect the device to provide the key before opening the database in order to access encrypted data. +4D allows you to save the data encryption key in a dedicated file. Armazenar esse arquivo em um aparelho externo, como um pendrive USB, facilita o uso de um banco de ados criptografado, já que o usuário só precisa conectar o aparelho para fornecer a chave de criptografia antes de abrir o banco de dados para poder acessar os dados criptografados. You can save the encryption key each time a new passphrase has been provided: -- when the database is encrypted for the first time, -- when the database is re-encrypted with a new passphrase. +- quando o banco de dados for criptografado pela primeira vez, +- quando o banco de dados for re-criptografado com uma nova frase secreta. Successive encryption keys can be stored on the same device. ## Log file - -After an encryption operation has been completed, 4D generates a file in the Logs folder of the database. It is created in XML format and named "*DatabaseName_Encrypt_Log_yyyy-mm-dd hh-mm-ss.xml*" or "*DatabaseName_Decrypt_Log_yyyy-mm-dd hh-mm-ss.xml*". +Depois que a operação de criptografia tiver sido completada, 4D gera um arquivo na pasta Logs do banco de dados. É criado no formato XML e se chama "*DatabaseName_Encrypt_Log_yyyy-mm-dd hh-mm-ss.xml*" ou "*DatabaseName_Decrypt_Log_yyyy-mm-dd hh-mm-ss.xml*". An Open log file button is displayed on the MSC page each time a new log file has been generated. -The log file lists all internal operations executed pertaining to the encryption/decryption process, as well as errors (if any). \ No newline at end of file +The log file lists all internal operations executed pertaining to the encryption/decryption process, as well as errors (if any). diff --git a/website/translated_docs/pt/MSC/information.md b/website/translated_docs/pt/MSC/information.md index 33e8fd3ba0db72..b8e7c1681ba8c9 100644 --- a/website/translated_docs/pt/MSC/information.md +++ b/website/translated_docs/pt/MSC/information.md @@ -8,21 +8,20 @@ The Information page provides information about the 4D and system environments, ## Program -This page indicates the name, version and location of the application as well as the active 4D folder (for more information about the active 4D folder, refer to the description of the ```Get 4D folder``` command in the *4D Language Reference* manual). +This page indicates the name, version and location of the application as well as the active 4D folder (for more information about the active 4D folder, refer to the description of the `Get 4D folder` command in the *4D Language Reference* manual). -The central part of the window indicates the name and location of the database project and data files as well as the log file (if any). The lower part of the window indicates the name of the 4D license holder, the type of license, and the name of the database user when passwords have been activated (or Designer if this is not the case). +A parte central da janela indica o nome e local do projeto de bancos de dados e arquivos de dados assim como o arquivo de histórico (se houver). A parte inferior da janela indica o nome do titular da licença 4D, o tipo de licença e o nome de usuário do banco de dados quando ativar as senhas (ou o Designer se não for o caso). - **Display and selection of pathnames**: On the **Program** tab, pathnames are displayed in pop-up menus containing the folder sequence as found on the disk: - ![](assets/en/MSC/MSC_popup.png) If you select a menu item (disk or folder), it is displayed in a new system window. The **Copy the path** command copies the complete pathname as text to the clipboard, using the separators of the current platform. + ![](assets/en/MSC/MSC_popup.png) If you select a menu item (disk or folder), it is displayed in a new system window. The **Copy the path** command copies the complete pathname as text to the clipboard, using the separators of the current platform. -- **"Licenses" Folder** The **"Licenses" Folder** button displays the contents of the active Licenses folder in a new system window. All the license files installed in your 4D environment are grouped together in this folder, on your hard disk. When they are opened with a Web browser, these files display information concerning the licenses they contain and their characteristics. The location of the "Licenses" folder can vary depending on the version of your operating system. For more information about the location of this folder, refer to the ```Get 4D folder``` command. ***Note:** You can also access this folder from the “Update License” dialog box (available in the Help menu).* +- **"Licenses" Folder** The **"Licenses" Folder** button displays the contents of the active Licenses folder in a new system window. All the license files installed in your 4D environment are grouped together in this folder, on your hard disk. When they are opened with a Web browser, these files display information concerning the licenses they contain and their characteristics. The location of the "Licenses" folder can vary depending on the version of your operating system. For more information about the location of this folder, refer to the `Get 4D folder` command. ***Note:** You can also access this folder from the “Update License” dialog box (available in the Help menu).* -## Tables +## Tabelas This page provides an overview of the tables in your database: ![](assets/en/MSC/MSC_Tables.png) - > Information on this page is available in both standard and maintenance modes. The page lists all the tables of the database (including invisible tables) as well as their characteristics: @@ -32,22 +31,22 @@ The page lists all the tables of the database (including invisible tables) as we - **Records**: Total number of records in the table. If a record is damaged or cannot be read, *Error* is displayed instead of the number. In this case, you can consider using the verify and repair tools. - **Fields**: Number of fields in the table. Invisible fields are counted, however, deleted fields are not counted. - **Indexes**: Number of indexes of any kind in the table -- **Encryptable**: If checked, the **Encryptable** attribute is selected for the table at the structure level (see Encryptable paragraph in the Design Reference Manual). -- **Encrypted**: If checked, the records of the table are encrypted in the data file. ***Note:** Any inconstency between Encryptable and Encrypted options requires that you check the encryption status of the data file in the **Encrypt page** of the database. * +- **Criptografável**: se marcado, é selecionado o atributo **Encriptable** para a tabela ao nível da estrutura (ver o parágrafo Encriptable no Manual de Design). +- **Encrypted**: If checked, the records of the table are encrypted in the data file. ***Nota:** toda incoerência entre as opciones Criptografável e Criptografado requer que se comprove o estado de cifrado do arquivo de dados na **página Criptografar** do banco de dados. * - **Address Table Size**: Size of the address table for each table. The address table is an internal table which stores one element per record created in the table. It actually links records to their physical address. For performance reasons, it is not resized when records are deleted, thus its size can be different from the current number of records in the table. If this difference is significant, a data compacting operation with the "Compact address table" option checked can be executed to optimize the address table size (see [Compact](compact.md) page). ***Note:** Differences between address table size and record number can also result from an incident during the cache flush.* -## Data -The **Data** page provides information about the available and used storage space in the data file. +## Dados + +The **Data** page provides information about the available and used storage space in the data file. > This page cannot be accessed in maintenance mode The information is provided in graph form: ![](assets/en/MSC/MSC_Data.png) - > This page does not take into account any data that may be stored outside of the data file (see "External storage"). Files that are too fragmented reduce disk, and thus, database performance. If the occupation rate is too low, 4D will indicate this by a warning icon (which is displayed on the Information button and on the tab of the corresponding file type) and specify that compacting is necessary:![](assets/en/MSC/MSC_infowarn.png) -A warning icon is also displayed on the button of the [Compact](compact.md) page: ![](assets/en/MSC/MSC_compactwarn.png) \ No newline at end of file +A warning icon is also displayed on the button of the [Compact](compact.md) page: ![](assets/en/MSC/MSC_compactwarn.png) diff --git a/website/translated_docs/pt/MSC/overview.md b/website/translated_docs/pt/MSC/overview.md index ba94365a594638..25294401da0d5e 100644 --- a/website/translated_docs/pt/MSC/overview.md +++ b/website/translated_docs/pt/MSC/overview.md @@ -1,40 +1,41 @@ --- -id: overview -title: Overview -sidebar_label: Overview +id: visão Geral +title: Visão Geral +sidebar_label: Visão Geral --- The Maintenance and Security Center (MSC) window contains all the tools needed for verification, analysis, maintenance, backup, compacting, and encrypting of data files. The MSC window is available in all 4D applications: 4D single user, 4D Server or 4D Desktop. **Note:** The MSC window is not available from a 4D remote connection. -There are several ways to open the MSC window. The way it is accessed also determines the way the database is opened: in “maintenance” mode or “standard” mode. In maintenance mode, the database is not opened by 4D, only its reference is provided to the MSC. In standard mode, the database is opened by 4D. +There are several ways to open the MSC window. O modo de acesso também determina o modo de abertura do banco de dados: em modo "manutenção" ou em modo "padrão". Em modo manutenção, o banco não é aberto por 4D, só se oferecida sua referencia al CSM. Em modo padrão, o banco de dados é aberto por 4D. + ## Display in maintenance mode -In maintenance mode, only the MSC window is displayed (the database is not opened by the 4D application). This means that databases that are too damaged to be opened in standard mode by 4D can nevertheless be accessed. Moreover, certain operations (compacting, repair, and so on) require the database to be opened in maintenance mode (see [Feature availability](#feature-availability)). +Em modo manutenção, só se mostra a janela de CSM (o banco de dados não é aberto pela aplicação 4D). Isso significa que bancos de dados que estão muito danificados para serem abertos em modo padrão por 4D podem, mesmo assim, ser acessados. Além disso, algumas operações (compactação, reparação, etc). exigem que o banco de dados se abra em modo manutenção (ver [Disponibilidade das funcionalidades](#feature-availability)). You can open the MSC in maintenance mode from two locations: -- **From the standard database opening dialog box** The standard Open database dialog includes the **Maintenance Security Center** option from the menu associated with the **Open** button: ![](assets/en/MSC/MSC_standardOpen.png) -- **Help/Maintenance Security Center** menu or **MSC** button in the tool bar (database not open) - ![](assets/en/MSC/mscicon.png) - When you call this function, a standard Open file dialog appears so that you can indicate the database to be examined. The database will not be opened by 4D. +- **A caixa de diálogo padrão de abertura**. A caixa de diálogo padrão de abertura de bancos de dados inclui a opção **Centro de segurança de manutenção** do menu associado ao botão **Abrir**: ![](assets/en/MSC/MSC_standardOpen.png) +- Menu **Ajuda/Centro de segurança e de manutenção** ou botão **CSM** na barra de ferramentas (banco de dados não aberto) + ![](assets/en/MSC/mscicon.png) + Quando se chama a esta função, aparece um diálogo padrão de abertura de arquivos para poder indicar o banco a examinar. O banco de dados não será aberto por 4D. ## Display in standard mode -In standard mode, a database is open. In this mode, certain maintenance functions are not available. You have several possibilities for accessing the MSC window: +Em modo padrão, um banco de dados é aberto. In this mode, certain maintenance functions are not available. You have several possibilities for accessing the MSC window: - Use the **Help/Maintenance Security Center** menu or the **MSC** button in the 4D toolbar: - ![](assets/en/MSC/mscicon.png) -- Use the “msc” standard action that it is possible to associated with a menu command or a form object (see "Standard actions" section). + ![](assets/en/MSC/mscicon.png) +- Use a ação padrão Csm que é possível associar a um comando de menu ou a um objeto de formulário (ver seção "ações padrão"). -- Use the ```OPEN SECURITY CENTER``` language command. +- Use the `OPEN SECURITY CENTER` language command. ## Feature availability Certain MSC functions are not available depending on the MSC opening mode: -- Backup function is only available when the database is open (the MSC must have been opened in standard mode). -- Data compacting, rollback, restore, repair, and encryption functions can only be used with data files that are not open (the MSC must have been opened in maintenance mode). If these functions are tried while the database is open in standard mode, a dialog warns you that it implies that the application be closed and restarted in maintenance mode. -- In encrypted databases, access to encrypted data or to the .journal file requires that a valid encryption data key be provided (see [Encrypt page](encrypt.md)). Otherwise, encrypted data is not visible. \ No newline at end of file +- A função de backup - cópia de segurança - só está disponível quando o banco de dados estiver aberto (o CSM deve ter sido aberto em modo padrão). +- Data compacting, rollback, restore, repair, and encryption functions can only be used with data files that are not open (the MSC must have been opened in maintenance mode). Se essas funções forem tentadas enquanto o banco estiver aberto em modo padrão, um diálogo avisa que a aplicação será fechada e reiniciada em modo manutenção. +- In encrypted databases, access to encrypted data or to the .journal file requires that a valid encryption data key be provided (see [Encrypt page](encrypt.md)). Otherwise, encrypted data is not visible. diff --git a/website/translated_docs/pt/MSC/repair.md b/website/translated_docs/pt/MSC/repair.md index 93479e5fd89eb5..9ea741599d3a92 100644 --- a/website/translated_docs/pt/MSC/repair.md +++ b/website/translated_docs/pt/MSC/repair.md @@ -4,71 +4,66 @@ title: Repair Page sidebar_label: Repair Page --- -This page is used to repair the data file when it has been damaged. Generally, you will only use these functions at the request of 4D, when anomalies have been detected while opening the database or following a [verification](verify.md). +This page is used to repair the data file when it has been damaged. Geralmente só se usa essas funções sob a supervisão de times técnicos 4D, quando anomalias forem detectadas quando abrir a aplicação ou após uma [verificação](verify.md). **Warning:** Each repair operation involves the duplication of the original file, which increases the size of the application folder. It is important to take this into account (especially in macOS where 4D applications appear as packages) so that the size of the application does not increase excessively. Manually removing the copies of the original file inside the package can be useful to minimize the package size. - -> Repairing is only available in maintenance mode. If you attempt to carry out this operation in standard mode, a warning dialog will inform you that the database will be closed and restarted in maintenance mode. -> +> Repairing is only available in maintenance mode. Se tentar fazer essa operação em modo padrão, um aviso informará que o banco de dados será fechado e reiniciado em modo manutenção. > When the database is encrypted, repairing data includes decryption and encryption steps and thus, requires the current data encryption key. If no valid encryption key has already been provided, a dialog requesting the passphrase or the encryption key is displayed (see Encrypt page). ## File overview ### Data file to be repaired - -Pathname of the current data file. The **[...]** button can be used to specify another data file. When you click on this button, a standard Open document dialog is displayed so that you can designate the data file to be repaired. If you perform a [standard repair](#standard_repair), you must select a data file that is compatible with the open project file. If you perform a [recover by record headers](#recover-by-record-headers) repair, you can select any data file. Once this dialog has been validated, the pathname of the file to be repaired is indicated in the window. +Pathname of the current data file. The **[...]** button can be used to specify another data file. When you click on this button, a standard Open document dialog is displayed so that you can designate the data file to be repaired. Pathname of the current data file. If you perform a [recover by record headers](#recover-by-record-headers) repair, you can select any data file. Once this dialog has been validated, the pathname of the file to be repaired is indicated in the window. ### Original files backup folder - -By default, the original data file will be duplicated before the repair operation. It will be placed in a subfolder named “Replaced files (repairing)” in the database folder. The second **[...]** button can be used to specify another location for the original files to be saved before repairing begins. This option can be used more particularly when repairing voluminous files while using different disks. +By default, the original data file will be duplicated before the repair operation. By default, the original data file will be duplicated before the repair operation. The second **[...]** button can be used to specify another location for the original files to be saved before repairing begins. This option can be used more particularly when repairing voluminous files while using different disks. ### Repaired files +4D creates a new blank data file at the location of the original file. 4D creates a new blank data file at the location of the original file. The blank file is filled with the recovered data. -4D creates a new blank data file at the location of the original file. The original file is moved into the folder named "\Replaced Files (Repairing) date time" whose location is set in the "Original files backup folder" area (database folder by default). The blank file is filled with the recovered data. ## Standard repair Standard repair should be chosen when only a few records or indexes are damaged (address tables are intact). The data is compacted and repaired. This type of repair can only be performed when the data and structure file match. -When the repair procedure is finished, the "Repair" page of the MSC is displayed. A message indicates if the repair was successful. If so, you can open the database immediately. ![](assets/en/MSC/MSC_RepairOK.png) +When the repair procedure is finished, the "Repair" page of the MSC is displayed. A message indicates if the repair was successful. Se for assim, pode abrir o banco de dados imediatamente. ![](assets/en/MSC/MSC_RepairOK.png) ## Recover by record headers - Use this low-level repair option only when the data file is severely damaged and after all other solutions (restoring from a backup, standard repair) have proven to be ineffective. 4D records vary in size, so it is necessary to keep the location where they are stored on disk in a specific table, named address table, in order to find them again. The program therefore accesses the address of the record via an index and the address table. If only records or indexes are damaged, the standard repair option is usually sufficient to resolve the problem. However, when the address table itself is affected, it requires a more sophisticated recovery since it will be necessary to reconstitute it. To do this, the MSC uses the marker located in the header of each record. The markers are compared to a summary of the record, including the bulk of their information, and from which it is possible to reconstruct the address table. -> If you have deselected the **Records definitively deleted** option in the properties of a table in the database structure, performing a recovery by header markers may cause records that were previously deleted to reappear. Recovery by headers does not take integrity constraints into account. More specifically, after this operation you may get duplicated values with unique fields or NULL values with fields declared **Never Null**. +> Se desmarcou a opção **Registros eliminados definitivamente** nas propriedades de uma tabela na estrutura do banco de dados, a reparação por marcadores de cabeçalhos pode fazer que reapareçam os registros eliminados anteriormente. Recovery by headers does not take integrity constraints into account. More specifically, after this operation you may get duplicated values with unique fields or NULL values with fields declared **Never Null**. When you click on **Scan and repair...**, 4D performs a complete scan of the data file. When the scan is complete, the results appear in the following window: ![](assets/en/MSC/mscrepair2.png) - > If all the records and all the tables have been assigned, only the main area is displayed. The "Records found in the data file" area includes two tables summarizing the information from the scan of the data file. - The first table lists the information from the data file scan. Each row shows a group of recoverable records in the data file: - - - The **Order** column indicates the recovery order for the group of records. + - The **Order** column indicates the recovery order for the group of records. - The **Count** column indicates the number of the records in the table. - The **Destination table** column indicates the names of tables that were automatically assigned to the groups of identified records. The names of tables assigned automatically appear in green. Groups that were not assigned, i.e. tables that could not be associated with any records appear in red. - The **Recover** column lets you indicate, for each group, whether you want to recover the records. By default, this option is checked for every group with records that can be associated with a table. + - The second table lists the tables of the project file. -### Manual assigning +### Manual assigning If several groups of records could not be assigned to tables due to a damaged address table, you can assign them manually. To do this, first select an unassigned group of records in the first table. The "Content of the records" area then displays a preview of the contents of the first records of the group to make it easier to assign them: ![](assets/en/MSC/mscrepair3.png) Next select the table you want to assign to the group in the "Unassigned tables" table and click on the **Identify table** button. You can also assign a table using drag and drop. The group of records is then associated with the table and it will be recovered in this table. The names of tables that are assigned manually appear in black. Use the **Ignore records** button to remove the association made manually between the table and the group of records. + ## Open log file -After repair is completed, 4D generates a log file in the Logs folder of the database. This file allows you to view all the operations carried out. It is created in XML format and named: *DatabaseName**_Repair_Log_yyyy-mm-dd hh-mm-ss.xml*" where: +Depois que a reparação terminar, 4D gera um arquivo de histórico na pasta Logs do banco de dados. This file allows you to view all the operations carried out. É criado no formato XML e chamado: *DatabaseName**_Repair_Log_yyyy-mm-dd hh-mm-ss.xml*" onde: -- *DatabaseName* is the name of the project file without any extension, for example "Invoices", +- *NomBase* é o nome do arquivo de estrutura sem extensão, por exemplo "Faturas", - *yyyy-mm-dd hh-mm-ss* is the timestamp of the file, based upon the local system time when the maintenance operation was started, for example "2019-02-11 15-20-45". -When you click on the **Open log file** button, 4D displays the most recent log file in the default browser of the machine. \ No newline at end of file +When you click on the **Open log file** button, 4D displays the most recent log file in the default browser of the machine. diff --git a/website/translated_docs/pt/MSC/restore.md b/website/translated_docs/pt/MSC/restore.md index 6d2b902a3ab0cc..e84cb506d648bd 100644 --- a/website/translated_docs/pt/MSC/restore.md +++ b/website/translated_docs/pt/MSC/restore.md @@ -1,37 +1,37 @@ --- -id: restore +id: restaurar title: Restore Page sidebar_label: Restore Page --- -## Restoring a backup +## Restaurar um backup -You can manually restore an archive of the current database using the **Restore** page. This page provides several options that can be used to control the database restoration: +É possível restaurar manualmente um arquivo do banco de dados atual utilizando a página **Restaurar**. Essa página oferece várias opções que podem ser utilizadas para controlar a restauração do banco de dados: ![](assets/en/MSC/MSC_restore.png) -> 4D automatic recovery systems restore databases and include data log file when necessary. +> Os sistemas de recuperação automática de 4D restauram os bancos de dados e incluem o arquivo de histórico de dados quando for necessário. -The list found in the left part of the window displays any existing backups of the database. You can also click on the Browse... button found just under the area in order to open any other archive file from a different location. It is then added to the list of archives. +A lista que se encontra na parte esquerda da janela mostra as cópias de segurança existentes do banco de dados. Também pode clicar no botão Browse/ Examinar... que se encontra logo abaixo da área para abrir qualquer outro arquivo de um local diferente. It is then added to the list of archives. When you select a backup in this list, the right part of the window displays the information concerning this particular backup: - **Path**: Complete pathname of the selected backup file. Clicking the Show button opens the backup file in a system window. - **Date and Time**: Date and time of backup. - **Content**: Contents of the backup file. Each item in the list has a check box next to it which can be used to indicate whether or not you want to restore it. You can also use the **Check All** or **Uncheck All** buttons to set the list of items to be restored. -- **Destination folder of the restored files**: Folder where the restored files will be placed. By default, 4D restores the files in a folder named “Archivename” (no extension) that is placed next to the database structure file. To change this location, click on **[...]** and specify the folder where you want the restored files to be placed. +- **Destination folder of the restored files**: Folder where the restored files will be placed. **Destination folder of the restored files**: Folder where the restored files will be placed. To change this location, click on **[...]** and specify the folder where you want the restored files to be placed. The **Restore** button launches the manual restoration of the selected element(s). -## Successive integration of several data log files +## Integração sucessiva de vários arquivos de histórico de dados -The **Integrate one or more log file(s) after restore** option allows you to integrate several data log files successively into a database. If, for example, you have 4 journal file archives (.4BL) corresponding to 4 database backups, you can restore the first backup then integrate the journal (data log) archives one by one. This means that you can, for example, recover a data file even when the last backup files are missing. +A opção **Integrar um ou mais arquivos depois da restauração** permite integrar sucessivamente vários arquivos de registro de dados em um banco de dados. Se, por exemplo, tiver 4 arquivos de histórico (.4BL) correspondentes à 4 cópias de segurança do banco de dados, você pode restaurar o primeiro backup quando integrar os arquivos de histórico (data log) um por um. This means that you can, for example, recover a data file even when the last backup files are missing. When this option is checked, 4D displays the standard Open file dialog box after the restore, which can be used to select journal file to be integrated. The Open file dialog box is displayed again after each integration until it is cancelled. -## Restoring an encrypted database +## Restauração de um banco de dados criptografado -Keep in mind that the data encryption key (passphrase) may have been changed through several versions of backup files (.4BK), .journal files (.4BL) and the current database. Matching encryption keys must always be provided. +Lembre que a chave de criptografia de dados (frase secreta) pode ter mudado entre as várias versões dos arquivos de backup (.4BK), arquivos .journal (.4BL) e a versão atual do banco de dados. Matching encryption keys must always be provided. When restoring a backup and integrating the current log file in a encrypted database: @@ -40,9 +40,10 @@ When restoring a backup and integrating the current log file in a encrypted data The following sequence illustrates the principles of a multi-key backup/restore operation: -| Operation | Generated files | Comment | + +| Operação | Generated files | Comentário | | --------------------------- | ------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| New database | | | +| Novo banco de dados | | | | Add data (record # 1) | | | | Backup database | 0000.4BL and 0001.4BK | | | Add data (record # 2) | | | @@ -59,8 +60,6 @@ The following sequence illustrates the principles of a multi-key backup/restore | Backup database | 0006.4BL and 0007.4BK files (encrypted with key2) | We can restore 0006.4BK and integrate 0006.4BL | | Add data (record # 8) | | | | Backup database | 0007.4BL and 0008.4BK files (encrypted with key2) | We can restore 0006.4BK and integrate 0006.4BL + 0007.4BL. We can restore 0007.4BK and integrate 0007.4BL | - - > When restoring a backup and integrating one or several .4BL files, the restored .4BK and .4BL files must have the same encryption key. During the integration process, if no valid encryption key is found in the 4D keychain when the .4BL file is integrated, an error is generated. > -> If you have stored successive data keys on the same external device, restoring a backup and integrating log files will automatically find the matching key if the device is connected. \ No newline at end of file +> If you have stored successive data keys on the same external device, restoring a backup and integrating log files will automatically find the matching key if the device is connected. diff --git a/website/translated_docs/pt/MSC/rollback.md b/website/translated_docs/pt/MSC/rollback.md index 96bbadc248d2b9..b295d2d4d3c536 100644 --- a/website/translated_docs/pt/MSC/rollback.md +++ b/website/translated_docs/pt/MSC/rollback.md @@ -6,7 +6,7 @@ sidebar_label: Rollback Page You use the Rollback page to access the rollback function among the operations carried out on the data file. It resembles an undo function applied over several levels. It is particularly useful when a record has been deleted by mistake in a database. -This function is only available when the database functions with a data log file. +Esta função só está disponível quando o banco de dados funciona com um arquivo de histórico de dados. ![](assets/en/MSC/MSC_rollback1.png) @@ -22,4 +22,4 @@ Next click on the **Rollback** button. 4D asks you to confirm the operation. If You use the menu found at the bottom of the window to select a data log file to be used when you apply the rollback function to a database restored from an archive file. In this case, you must specify the data log file corresponding to the archive. -Here is how the rollback function works: when the user clicks the **Rollback** button, 4D shuts the current database and restores the last backup of the database data. The restored database is then opened and 4D integrates the operations of the data log file up through to the selected operation. If the database has not yet been saved, 4D starts with a blank data file. \ No newline at end of file +Here is how the rollback function works: when the user clicks the **Rollback** button, 4D shuts the current database and restores the last backup of the database data. The restored database is then opened and 4D integrates the operations of the data log file up through to the selected operation. If the database has not yet been saved, 4D starts with a blank data file. diff --git a/website/translated_docs/pt/MSC/verify.md b/website/translated_docs/pt/MSC/verify.md index e3601bcc1c9912..ce8aced77cc7be 100644 --- a/website/translated_docs/pt/MSC/verify.md +++ b/website/translated_docs/pt/MSC/verify.md @@ -6,33 +6,36 @@ sidebar_label: Verify Page You use this page to verify data integrity. The verification can be carried out on records and/or indexes. This page only checks the data integrity. If errors are found and repairs are needed, you will be advised to use the [Repair page](repair.md). + ## Actions The page contains action buttons that provide direct access to the verification functions. - > When the database is encrypted, verification includes validation of encrypted data consistency. If no valid data key has already been provided, a dialog requesting the passphrase or the data key is displayed. + - **Verify the records and the indexes:** Starts the total data verification procedure. - **Verify the records only**: Starts the verification procedure for records only (indexes are not verified). - **Verify the indexes only**: Starts the verification procedure for indexes only (records are not verified). +> > > Verification of records and indexes can also be carried out in detail mode, table by table (see the Details section below). -> Verification of records and indexes can also be carried out in detail mode, table by table (see the Details section below). ## Open log file -Regardless of the verification requested, 4D generates a log file in the `Logs` folder of the database. This file lists all the verifications carried out and indicates any errors encountered, when applicable ([OK] is displayed when the verification is correct). It is created in XML format and is named: *DatabaseName**Verify_Log**yyyy-mm-dd hh-mm-ss*.xml where: +Independente da verificação solicitada, 4D gera um arquivo de histórico na pasta `Logs` do banco de dados. This file lists all the verifications carried out and indicates any errors encountered, when applicable ([OK] is displayed when the verification is correct). É criada no formato XML e se chama: *NomeBanco*_Verify_Log_*yyyy-mm-dd hh-mm-ss*.xml onde: -- *DatabaseName* is the name of the project file without any extension, for example "Invoices", +- *NomBase* é o nome do arquivo de estrutura sem extensão, por exemplo "Faturas", - *yyyy-mm-dd hh-mm-ss* is the timestamp of the file, based upon the local system time when the maintenance operation was started, for example "2019-02-11 15-20-45". When you click on the **Open log file** button, 4D displays the most recent log file in the default browser of the machine. + ## Details The **Table list** button displays a detailed page that can be used to view and select the actual records and indexes to be checked: ![](assets/en/MSC/MSC_Verify.png) + Specifying the items to be verified lets you save time during the verification procedure. The main list displays all the tables of the database. For each table, you can limit the verification to the records and/or indexes. Expand the contents of a table or the indexed fields and select/deselect the checkboxes as desired. By default, everything is selected. You can also use the **Select all**, **Deselect all**, **All records** and **All indexes** shortcut buttons. @@ -47,9 +50,7 @@ The "Status" column displays the verification status of each item using symbols: | ![](assets/en/MSC/MSC_KO3.png) | Verification partially carried out | | ![](assets/en/MSC/MSC_KO.png) | Verification not carried out | - Click on **Verify** to begin the verification or on **Standard** to go back to the standard page. The **Open log file** button can be used to display the log file in the default browser of the machine (see [Open log file](#open-log-file) above). - -> The standard page will not take any modifications made on the detailed page into account: when you click on a verification button on the standard page, all the items are verified. On the other hand, the settings made on the detailed page are kept from one session to another. \ No newline at end of file +> The standard page will not take any modifications made on the detailed page into account: when you click on a verification button on the standard page, all the items are verified. On the other hand, the settings made on the detailed page are kept from one session to another. diff --git a/website/translated_docs/pt/Menus/bars.md b/website/translated_docs/pt/Menus/bars.md index 0246d7034d7153..b6aa51006fdac1 100644 --- a/website/translated_docs/pt/Menus/bars.md +++ b/website/translated_docs/pt/Menus/bars.md @@ -7,8 +7,10 @@ Menu bars provide the major interface for custom applications. For each custom a 4D lets you associate a custom splash screen picture with each menu bar and to preview this menu bar at any time. + ## Splash screen + You can enhance the appearance of each menu bar by associating a custom splash screen with it. The window containing the splash screen is displayed below the menu bar when it appears. It can contain a logo or any type of picture. By default, 4D displays the 4D logo in the splash screen: ![](assets/en/Menus/splash1.png) @@ -16,7 +18,6 @@ You can enhance the appearance of each menu bar by associating a custom splash s A custom splash screen picture can come from any graphic application. 4D lets you paste a clipboard picture or use any picture present on your hard disk. Any standard picture format supported by 4D can be used. The splash screen picture can be set only in the Menu editor: select the menu bar with which you want to associate the custom splash screen. Note the "Background Image" area in the right-hand part of the window. To open a picture stored on your disk directly, click on the **Open** button or click in the "Background Image" area. A pop-up menu appears: - - To paste a picture from the clipboard, choose **Paste**. - To open a picture stored in a disk file, choose **Open**. If you choose Open, a standard Open file dialog box will appear so that you can select the picture file to be used. Once set, the picture is displayed in miniature in the area. It is then associated with the menu bar. @@ -24,10 +25,11 @@ The splash screen picture can be set only in the Menu editor: select the menu ba You can view the final result by testing the menu bar (see the following section). In Application mode, the picture is displayed in the splash screen with the "Truncated (Centered)" type format. -> You can choose whether to display or hide this window using the **Display toolbar** option in the Database Settings. +> Pode escolher se quer exibir ou esconder a janela usando a opção **Mostrar a barra de ferramentas** nas Propriedades do Banco de Dados. To remove the custom picture and display the default one instead, click on the **Clear** button or select **Clear** in the area pop-up menu. + ## Previewing menu bars The Menu Bar editor lets you view the custom menus and splash screen at any time, without closing the toolbox window. @@ -36,4 +38,4 @@ To do so, simply select the menu bar and choose **Test the menu bar "Menu Bar #X ![](assets/en/Menus/splash3.png) -4D displays a preview of the menu bar as well as the splash screen. You can scroll down the menus and sub-menus to preview their contents. However, these menus are not active. To test the functioning of menus and the toolbar, you must use the **Test Application** command from the **Run** menu. \ No newline at end of file +4D displays a preview of the menu bar as well as the splash screen. You can scroll down the menus and sub-menus to preview their contents. However, these menus are not active. To test the functioning of menus and the toolbar, you must use the **Test Application** command from the **Run** menu. diff --git a/website/translated_docs/pt/Menus/creating.md b/website/translated_docs/pt/Menus/creating.md index fba82317ea9a60..5546940a6904ad 100644 --- a/website/translated_docs/pt/Menus/creating.md +++ b/website/translated_docs/pt/Menus/creating.md @@ -10,22 +10,23 @@ You can create menus and menu bars: You can combine both features and use menus created in structure as templates to define menus in memory. + ## Default menu bar -A custom application must contain at least one menu bar with one menu. By default, when you create a new database, 4D automatically creates a default menu bar (Menu Bar #1) so that you can access the Application environment. The default menu bar includes standard menus and a command for returning to the Design mode. +A custom application must contain at least one menu bar with one menu. A custom application must contain at least one menu bar with one menu. The default menu bar includes standard menus and a command for returning to the Design mode. -This allows the user to access the Application environment as soon as the database is created. Menu Bar #1 is called automatically when the **Test Application** command is chosen in the **Run** menu. +Isso permite ao usuário acessar o modo Aplicação logo que se crie o banco de dados. Menu Bar #1 is called automatically when the **Test Application** command is chosen in the **Run** menu. The default menu bar includes three menus: - **File**: only includes the **Quit** command. The *Quit* standard action is associated with the command, which causes the application to quit. - **Edit**: standard and completely modifiable. Editing functions such as copy, paste, etc. are defined using standard actions. - **Mode**: contains, by default, the **Return to Design mode** command, which is used to exit the Application mode. - -> Menu items appear *in italics* because they consist of references and not hard-coded text. Refer to [Title property](properties.md#title). +> > > Menu items appear *in italics* because they consist of references and not hard-coded text. Refer to [Title property](properties.md#title). You can modify this menu bar as desired or create additional ones. + ## Creating menus ### Using the Menu editor @@ -34,7 +35,6 @@ You can modify this menu bar as desired or create additional ones. 2. (optional) Double-click on the name of the menu bar/menu to switch it to editing mode and enter a custom name. OR Enter the custom name in the "Title" area. Menu bar names must be unique. They may contain up to 31 characters. You can enter the name as "hard coded" or enter a reference (see [information about the Title property](properties.md#title)). ### Using the 4D language - Use the `Create menu` command to create a new menu bar or menu reference (*MenuRef*) in memory. When menus are handled by means of *MenuRef* references, there is no difference per se between a menu and a menu bar. In both cases, it consists of a list of items. Only their use differs. In the case of a menu bar, each item corresponds to a menu which is itself composed of items. @@ -42,38 +42,39 @@ When menus are handled by means of *MenuRef* references, there is no difference `Create menu` can create empty menus (to fill using `APPEND MENU ITEM` or `INSERT MENU ITEM`) or by menus built upon menus designed in the Menu editor. ## Adding items - For each of the menus, you must add the commands that appear when the menu drops down. You can insert items that will be associated with methods or standard actions, or attach other menus (submenus). ### Using the Menu editor - To add a menu item: 1. In the list of source menus, select the menu to which you want to add a command. If the menu already has commands, they will be displayed in the central list. If you want to insert the new command, select the command that you want it to appear above. It is still be possible to reorder the menu subsequently using drag and drop. 2. Choose **Add an item to menu “MenuName”** in the options menu of the editor or from the context menu (right click in the central list). OR Click on the add ![](assets/en/Menus/PlussNew.png) button located below the central list. 4D adds a new item with the default name “Item X” where X is the number of items already created. 3. Double-click on the name of the command in order to switch it to editing mode and enter a custom name. OR Enter the custom name in the "Title" area. It may contain up to 31 characters. You can enter the name as "hard coded" or enter a reference (see below). + ### Using the 4D language Use `INSERT MENU ITEM` or `APPEND MENU ITEM` to insert or to add menu items in existing menu references. + ## Deleting menus and items ### Using the Menu editor - You can delete a menu bar, a menu or a menu item in the Menu editor at any time. Note that each menu or menu bar has only one reference. When a menu is attached to different bars or different menus, any modification or deletion made to the menu is immediately carried out in all other occurrences of this menu. Deleting a menu will only delete a reference. When you delete the last reference of a menu, 4D displays an alert. To delete a menu bar, menu or menu item: - Select the item to be deleted and click on the delete ![](assets/en/Menus/MinussNew.png) button located beneath the list. -- or, use the appropriate **Delete...** command from the context menu or the options menu of the editor. +- or, use the appropriate **Delete...** command from the context menu or the options menu of the editor. > It is not possible to delete Menu Bar #1. + ### Using the 4D language Use `DELETE MENU ITEM` to remove an item from a menu reference. Use `RELEASE MENU` to unload the menu reference from the memory. + ## Attaching menus Once you have created a menu, you can attach it to one or several other menus (sub-menu) or menu bar(s). @@ -84,13 +85,14 @@ You can create sub-menus of sub-menus to a virtually unlimited depth. Note, howe At runtime, if an attached menu is modified by programming, every other instance of the menu will reflect these changes. + ### Using the Menu editor A menu can be attached to a menu bar or to another menu. - To attach a menu to a menu bar: right-click on the menu bar and select **Attach a menu to the menu bar "bar name" >**, then choose the menu to be attached to the menu bar: ![](assets/en/Menus/attach.png) You can also select a menu bar then click on the options button found below the list. - To attach a menu to another menu: select the menu in the left-hand area, then right-click on the menu item and select **Attach a sub-menu to the item "item name">**, then choose the menu you want to use as sub-menu: - ![](assets/en/Menus/attach2.png) You can also select a menu item then click on the options button found below the list. The menu being attached thus becomes a sub-menu. The title of the item is kept (the original sub-menu name is ignored), but this title can be modified. + ![](assets/en/Menus/attach2.png) You can also select a menu item then click on the options button found below the list. The menu being attached thus becomes a sub-menu. The title of the item is kept (the original sub-menu name is ignored), but this title can be modified. #### Detaching menus @@ -100,4 +102,4 @@ To detach a menu, right-click with the right button on the menu or sub-menu that ### Using the 4D language -Since there is no difference between menus and menu bars in the 4D language, attaching menus or sub-menus is done in the same manner: use the *subMenu* parameter of the `APPEND MENU ITEM` command to attach a menu to a menu bar or an menu. \ No newline at end of file +Since there is no difference between menus and menu bars in the 4D language, attaching menus or sub-menus is done in the same manner: use the *subMenu* parameter of the `APPEND MENU ITEM` command to attach a menu to a menu bar or an menu. diff --git a/website/translated_docs/pt/Menus/overview.md b/website/translated_docs/pt/Menus/overview.md index 012f35cbb12d0c..4c9c1697201417 100644 --- a/website/translated_docs/pt/Menus/overview.md +++ b/website/translated_docs/pt/Menus/overview.md @@ -1,20 +1,19 @@ --- -id: overview -title: Overview +id: visão Geral +title: Visão Geral --- -You can create menu bars and menus for your 4D databases and custom applications. Because pull-down menus are a standard feature of any desktop application, their addition will make your databases easier to use and will make them feel familiar to users. +Pode criar menus ou barras de menu para seu banco de dados e para aplicações personalizadas. Como menus pull-down/suspenso são uma propriedade padrão de qualquer aplicação de desktop, sua adição faz com que seus bancos de dados sejam mais fáceis de usar e mais familiares aos usuários. ![](assets/en/Menus/menubar.png) A **menu bar** is a group of menus that can be displayed on a screen together. Each **menu** on a menu bar can have numerous menu commands in it, including some that call cascading submenus (or hierarchical submenus). When the user chooses a menu or submenu command, it calls a project method or a standard action that performs an operation. -You can have many separate menu bars for each database. For example, you can use one menu bar that contains menus for standard database operations and another that becomes active only for reporting. One menu bar may contain a menu with menu commands for entering records. The menu bar appearing with the input form may contain the same menu, but the menu commands are disabled because the user doesn’t need them during data entry. +Pode ter muitas barras de menu separadas para cada banco de dados. Por exemplo, pode usar uma barra de menu que contenha menus para operações de bancos de dados padrão e outra que fica ativa apenas para relatórios. One menu bar may contain a menu with menu commands for entering records. The menu bar appearing with the input form may contain the same menu, but the menu commands are disabled because the user doesn’t need them during data entry. You can use the same menu in several menu bars or other menus, or you can leave it unattached and manage it only by programming (in this case, it is known as an independent menu). When you design menus, keep the following two rules in mind: - - Use menus for functions that are suited to menus: Menu commands should perform tasks such as adding a record, searching for records, or printing a report. - Group menu commands by function: For example, all menu commands that print reports should be in the same menu. For another example, you might have all the operations for a certain table in one menu. @@ -24,12 +23,12 @@ To create menus and menu bars, you can use either: - language commands for the "Menus" theme, - a combination of both. -## Menu editor +## Menu editor The Menu editor is accessed using the **Menus** button of the Toolbox. ![](assets/en/Menus/editor1.png) Menus and menu bars are displayed as two items of the same hierarchical list, on the left side of the dialog box. Each menu can be attached to a menu bar or to another menu. In the second case, the menu becomes a sub-menu. -4D assigns menu bar numbers sequentially — Menu Bar #1 appears first. You can rename menu bars but you cannot change their numbers. These numbers are used by the language commands. \ No newline at end of file +4D assigns menu bar numbers sequentially — Menu Bar #1 appears first. You can rename menu bars but you cannot change their numbers. These numbers are used by the language commands. diff --git a/website/translated_docs/pt/Menus/properties.md b/website/translated_docs/pt/Menus/properties.md index 0952503f0ed52b..6891cf87b2eaf6 100644 --- a/website/translated_docs/pt/Menus/properties.md +++ b/website/translated_docs/pt/Menus/properties.md @@ -5,7 +5,8 @@ title: Menu item properties You can set various properties for menu items such as action, font style, separator lines, keyboard shortcuts or icons. -## Title + +## Título The **Title** property contains the label of a menu or menu item as it will be displayed on the application interface. @@ -22,7 +23,7 @@ You can set some properties of the menu commands by using control characters (me Control characters do not appear in the menu command labels. You should therefore avoid using them so as not to have any undesirable effects. The control characters are the following: -| Character | Description | Usage | +| Character | Descrição | Usage | | ----------- | --------------------------- | ------------------------------------------------------------- | | ( | open parenthese | Disable item | | An active object can also have a keyboard shortcut. If the **Ctrl/Command** key assignments conflict, the active object takes precedence. + ### Enabled item In the Menu editor, you can specify whether a menu item will appear enabled or disabled. An enabled menu command can be chosen by the user; a disabled menu command is dimmed and cannot be chosen. When the **Enabled Item** check box is unchecked, the menu command appears dimmed, indicating that it cannot be chosen. Unless you specify otherwise, 4D automatically enables each menu item you add to a custom menu. You can disable an item in order, for example, to enable it only using programming with `ENABLE MENU ITEM` and `DISABLE MENU ITEM` commands. + ### Check mark This Menu editor option can be used to associate a system check mark with a menu item. You can then manage the display of the check mark using language commands (`SET MENU ITEM MARK` and `Get menu item mark`). @@ -157,19 +158,19 @@ Check marks are generally used for continuous action menu items and indicate tha 4D lets you customize menus by applying different font styles to the menu commands. You can customize your menus with the Bold, Italic or Underline styles through options in the Menu editor, or using the `SET MENU ITEM STYLE` language command. As a general rule, apply font styles sparingly to your menus — too many styles will be distracting to the user and give a cluttered look to your application. - > You can also apply styles by inserting special characters in the menu title (see [Using control characters](properties.md#using-control-characters) above). + ### Item icon You can associate an icon with a menu item. It will displayed directly in the menu, next to the item: ![](assets/en/Menus/iconMenu.png) -To define the icon in the Menu editor, click on the "Item icon" area and select **Open** to open a picture from the disk. If you select a picture file that is not already stored in the database resources folder, it is automatically copied in that folder. Once set, the item icon appears in the preview area: +To define the icon in the Menu editor, click on the "Item icon" area and select **Open** to open a picture from the disk. Se selecionar um arquivo de imagem que não esteja já armazenado na pasta de recursos do banco de dados, é copiado automaticamente nessa pasta. Once set, the item icon appears in the preview area: ![](assets/en/Menus/iconpreview.png) To remove the icon from the item, choose the **No Icon** option from the "Item Icon" area. -To define item icons using the 4D language, call the `SET MENU ITEM ICON` command. \ No newline at end of file +To define item icons using the 4D language, call the `SET MENU ITEM ICON` command. diff --git a/website/translated_docs/pt/Menus/sdi.md b/website/translated_docs/pt/Menus/sdi.md index 238ed0d429775c..b67fe4341c7006 100644 --- a/website/translated_docs/pt/Menus/sdi.md +++ b/website/translated_docs/pt/Menus/sdi.md @@ -3,14 +3,13 @@ id: sdi title: SDI mode on Windows --- -## Overview +## Visão Geral On Windows, 4D developers can configure their 4D merged applications to work as SDI (Single-Document Interface) applications. In SDI applications, each window is independant from others and can have its own menu bar. SDI applications are opposed to MDI (Multiple Documents Interface) applications, where all windows are contained in and depend on the main window. > The concept of SDI/MDI does not exist on macOS. This feature concerns Windows applications only and related options are ignored on macOS. -### SDI mode availabilty - +### Disponibilidade do modo SDI The SDI mode is available in the following execution environment only: - Windows @@ -20,7 +19,7 @@ The SDI mode is available in the following execution environment only: Enabling and using the SDI mode in your application require the following steps: -1. Check the **Use SDI mode on Windows** option in the "Interface" page of the Database Settings dialog box. +1. Selecione a opção **Utilizar o modo SDI en Windows** na página "Interface" da caixa de diálogo das Propriedades de banco de dados. 2. Build a merged application (standalone and/or client application). Then, when executed it in a supported context (see above), the merged application will work automatically in SDI mode. @@ -29,7 +28,7 @@ Then, when executed it in a supported context (see above), the merged applicatio Executing a 4D application in SDI mode does not require any specific implementation: existing menu bars are automatically moved in SDI windows themselves. However, you need to pay attention to specific principles that are listed below. -### Menus in Windows +### Menus em janelas In SDI mode, the process menu bar is automatically displayed in every document type window opened during the process life (this excludes, for example, floating palettes). When the process menu bar is not visible, menu item shortcuts remain active however. @@ -41,10 +40,10 @@ Windows can therefore be used in MDI or SDI modes without having to recalculate #### About the splash screen -- If the **Splash screen** interface option was selected in the Database Settings, the splash window will contain any menus that would have been displayed in the MDI window. Note also that closing the splash screen window will result in exiting the application, just like in MDI mode. +- Se selecionar a opção de interface **Tela de boas vindas** em Configuração do banco de dados, a janela de boas vindas conterá os menus que seriam mostrados na janela MDI. Note also that closing the splash screen window will result in exiting the application, just like in MDI mode. - If the Splash screen option was not selected, menus will be displayed in opened windows only, depending on the programmer's choices. -### Automatic quit +### Saída automática When executed in MDI mode, a 4D application simply quits when the user closes the application window (MDI window). However, when executed in SDI mode, 4D applications do not have an application window and, on the other hand, closing the last opened window does not necessarily mean that the user wants the application to quit (faceless processes can be running, for example) -- although it could be what they want. @@ -70,4 +69,4 @@ Although it is transparently handled by 4D, the SDI mode introduces small variat | `CONVERT COORDINATES` | `XY Screen` is the global coordinate system where the main screen is positioned at (0,0). Screens on its left side or on top of it can have negative coordinates and any screens on its right side or underneath it can have coordinates greater than the values returned by `Screen height` or `Screen width`. | | `GET MOUSE` | Global coordinates are relative to the screen | | `GET WINDOW RECT` | When -1 is passed in window parameter, the command returns 0;0;0;0 | -| `On Drop database method` | Not supported | \ No newline at end of file +| `On Drop database method` | Not supported | diff --git a/website/translated_docs/pt/Project/architecture.md b/website/translated_docs/pt/Project/architecture.md index fc0e8396da4687..a68fe6018ef3ec 100644 --- a/website/translated_docs/pt/Project/architecture.md +++ b/website/translated_docs/pt/Project/architecture.md @@ -1,172 +1,173 @@ --- id: architecture -title: Architecture of a 4D project +title: Arquitetura de um projeto 4D --- -A 4D project is made of several folders and files, stored within a single parent database folder (package folder). For example: +Um projeto 4D é feito de várias pastas e arquivos, armazenados dentro de uma única pasta pai do banco de dados (pasta pacote). Por exemplo: -- MyProject - - Components - - Data +- MyProject + - Componentes + - Dados - Logs - Settings - Documentation - Plugins - - Project + - Project - DerivedData - Sources - Trash - Resources - Settings - - userPreference.username + - userPreferences.username - WebFolder > If your project has been converted from a binary database, additional folders may be present. See "Converting databases to projects" on [doc.4d.com](https://doc.4d.com). + ## Project folder The Project folder typically contains the following hierarchy: -- *databaseName*.4DProject file -- Sources +- Arquivo *nomBase*.4DProject +- Sources + Classes + DatabaseMethods - + Methods - + Forms + + Métodos + + Formulários + TableForms + Triggers -+ DerivedData -+ Trash (if any) +- DerivedData +- Trash (if any) + -### *databaseName*.4DProject file +### Arquivo *nomBase*.4DProject Project development file, used to designate and launch the project. This file can be opened by: - 4D Developer -- 4D Server (read-only, see [Developing a project](developing.md)) +- 4D Server (apenas leitura, ver [Desenvolver um projeto](developing.md)) + +**Nota:** nos projetos 4D, o desenvolvimento se realiza com 4D Developer e o desenvolvimento multiusuários se gerencia através das ferramentas de controle de versão. 4D Server can open .4DProject files for testing purposes. -**Note:** In 4D projects, development is done with 4D Developer and multi-user development is managed through source control tools. 4D Server can open .4DProject files for testing purposes. ### Sources folder -| Contents | Description | Format | -| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | -| catalog.4DCatalog | Table and field definitions | XML | -| folders.json | Explorer folder definitions | JSON | -| menus.json | Menu definitions | JSON | -| settings.4DSettings | *Structure* database settings. If *user settings* are defined, they take priority over these settings. If *user settings for data* are defined, they take priority over user settings | XML | -| tips.json | Defined tips | JSON | -| lists.json | Defined lists | JSON | -| filters.json | Defined filters | JSON | -| styleSheets.css | CSS style sheets | CSS | -| styleSheets_mac.css | Mac css style sheets (from converted binary database) | CSS | -| styleSheets_windows.css | Windows css style sheets (from converted binary database) | CSS | +| Conteúdos | Descrição | Formato | +| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | +| catalog.4DCatalog | Table and field definitions | XML | +| folders.json | Explorer folder definitions | JSON | +| menus.json | Menu definitions | JSON | +| settings.4DSettings | *Structure* database settings. They are not taken into account if *[user settings](#settings-folder-1)* or *[user settings for data](#settings-folder)* are defined.

    **Warning**: In compiled applications, structure settings are stored in the .4dz file (read-only). For deployment needs, it is necessary to use *user settings* or *user settings for data* to define custom settings. | XML | +| tips.json | Defined tips | JSON | +| lists.json | Defined lists | JSON | +| filters.json | Defined filters | JSON | +| styleSheets.css | CSS style sheets | CSS | +| styleSheets_mac.css | Mac css style sheets (from converted binary database) | CSS | +| styleSheets_windows.css | Windows css style sheets (from converted binary database) | CSS | #### DatabaseMethods folder -| Contents | Description | Format | -| ------------------------ | ---------------------------------------------------------------------- | ------ | -| *databaseMethodName*.4dm | Database methods defined in the database. One file per database method | text | - +| Conteúdos | Descrição | Formato | +| ------------------------ | -------------------------------------------------------------------- | ------- | +| *databaseMethodName*.4dm | Métodos de banco definidos na database. One file per database method | texto | #### Methods folder -| Contents | Description | Format | -| ---------------- | ------------------------------------------------------------ | ------ | -| *methodName*.4dm | Project methods defined in the database. One file per method | text | - +| Conteúdos | Descrição | Formato | +| ---------------- | ------------------------------------------------------------- | ------- | +| *methodName*.4dm | Métodos de projeto definidos na database. One file per method | texto | #### Classes folder -| Contents | Description | Format | -| --------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ------ | -| *className*.4dm | User class definition method, allowing to instantiate specific objects. One file per class, the name of the file is the class name | text | +| Conteúdos | Descrição | Formato | +| --------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ------- | +| *className*.4dm | User class definition method, allowing to instantiate specific objects. One file per class, the name of the file is the class name | texto | #### Forms folder -| Contents | Description | Format | +| Conteúdos | Descrição | Formato | | ----------------------------------------- | ------------------------------------------ | ------- | | *formName*/form.4DForm | Project form description | json | -| *formName*/method.4dm | Project form method | text | -| *formName*/Images/*pictureName* | Project form static picture | picture | -| *formName*/ObjectMethods/*objectName*.4dm | Object methods. One file per object method | text | - +| *formName*/method.4dm | Project form method | texto | +| *formName*/Images/*pictureName* | Project form static picture | imagem | +| *formName*/ObjectMethods/*objectName*.4dm | Object methods. One file per object method | texto | #### TableForms folder -| Contents | Description | Format | +| Conteúdos | Descrição | Formato | | ---------------------------------------------------- | ------------------------------------------------------ | ------- | | *n*/Input/*formName*/form.4DForm | Input table form description (n is the table number) | json | -| *n*/Input/*formName*/Images/*pictureName* | Input table form static pictures | picture | -| *n*/Input/*formName*/method.4dm | Input table form method | text | -| *n*/Input/*formName*/ObjectMethods/*objectName*.4dm | Input form object methods. One file per object method | text | +| *n*/Input/*formName*/Images/*pictureName* | Input table form static pictures | imagem | +| *n*/Input/*formName*/method.4dm | Input table form method | texto | +| *n*/Input/*formName*/ObjectMethods/*objectName*.4dm | Input form object methods. One file per object method | texto | | *n*/Output/*formName*/form.4DForm | Output table form description (n is the table number) | json | -| *n*/Output/*formName*/Images/*pictureName* | Output table form static pictures | picture | -| *n*/Output/*formName*/method.4dm | Output table form method | text | -| *n*/Output/*formName*/ObjectMethods/*objectName*.4dm | Output form object methods. One file per object method | text | - +| *n*/Output/*formName*/Images/*pictureName* | Output table form static pictures | imagem | +| *n*/Output/*formName*/method.4dm | Output table form method | texto | +| *n*/Output/*formName*/ObjectMethods/*objectName*.4dm | Output form object methods. One file per object method | texto | #### Triggers folder -| Contents | Description | Format | -| ------------- | ------------------------------------------------------------------------------------------- | ------ | -| table_*n*.4dm | Trigger methods defined in the database. One trigger file per table (n is the table number) | text | - +| Conteúdos | Descrição | Formato | +| ------------- | ----------------------------------------------------------------------------------------- | ------- | +| table_*n*.4dm | Métodos trigger definidos na database. One trigger file per table (n is the table number) | texto | **Note:** The .4dm file extension is a text-based file format, containing the code of a 4D method. It is compliant with source control tools. + ### Trash folder The Trash folder contains methods and forms that were deleted from the project (if any). It can contain the following folders: -- Methods -- Forms +- Métodos +- Formulários - TableForms Within these folders, deleted element names are in parentheses, e.g. "(myMethod).4dm". The folder organization is identical to the [Sources](#sources) folder. + ### DerivedData folder The DerivedData folder contains cached data used internally by 4D to optimize processing. It is automatically created or recreated when necessary. You can ignore this folder. + ## Resources folder -The Resources folder contains any custom database resource files and folders. In this folder, you can place all the files needed for the translation or customization of the application interface (picture files, text files, XLIFF files, etc.). 4D uses automatic mechanisms to work with the contents of this folder, in particular for the handling of XLIFF files and static pictures. For using in remote mode, the Resources folder lets you share files between the server machine and all the client machines. See the *4D Server Reference Manual*. +A pasta Resources contém todos os arquivos e pastas de recursos personalizados do banco de dados. In this folder, you can place all the files needed for the translation or customization of the application interface (picture files, text files, XLIFF files, etc.). 4D uses automatic mechanisms to work with the contents of this folder, in particular for the handling of XLIFF files and static pictures. For using in remote mode, the Resources folder lets you share files between the server machine and all the client machines. See the *4D Server Reference Manual*. -| Contents | Description | Format | +| Conteúdos | Descrição | Formato | | --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | -| *item* | Database resource files and folders | various | -| Images/Library/*item* | Pictures from the Picture Library as separate files(*). Names of these items become file names. If a duplicate exists, a number is added to the name. | picture | - +| *item* | Arquivos e pastas dos recursos do banco de dados | various | +| Images/Library/*item* | Pictures from the Picture Library as separate files(*). Names of these items become file names. If a duplicate exists, a number is added to the name. | imagem | (*) only if the project was exported from a .4db binary database. + ## Data folder The data folder contains the data file and all files and folders relating to the data. -| Contents | Description | Format | -| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | -| data.4dd(*) | Data file containing data entered in the records and all the data belonging to the records. When you open a 4D project, the application opens the current data file by default. If you change the name or location of this file, the *Open data file* dialog box will then appear so that you can select the data file to use or create a new one | binary | -| data.journal | Created only when the database uses a log file. The log file is used to ensure the security of the data between backups. All operations carried out on the data are recorded sequentially in this file. Therefore, each operation on the data causes two simultaneous actions: the first on the data (the statement is executed normally) and the second in the log file (a description of the operation is recorded). The log file is constructed independently, without disturbing or slowing down the user’s work. A database can only work with a single log file at a time. The log file records operations such as additions, modifications or deletions of records, transactions, etc. It is generated by default when a database is created. | binary | -| data.match | (internal) UUID matching table number | XML | - +| Conteúdos | Descrição | Formato | +| ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | +| data.4dd(*) | Data file containing data entered in the records and all the data belonging to the records. When you open a 4D project, the application opens the current data file by default. If you change the name or location of this file, the *Open data file* dialog box will then appear so that you can select the data file to use or create a new one | binário | +| data.journal | Created only when the database uses a log file. The log file is used to ensure the security of the data between backups. All operations carried out on the data are recorded sequentially in this file. Therefore, each operation on the data causes two simultaneous actions: the first on the data (the statement is executed normally) and the second in the log file (a description of the operation is recorded). The log file is constructed independently, without disturbing or slowing down the user’s work. A database can only work with a single log file at a time. The log file records operations such as additions, modifications or deletions of records, transactions, etc. It is generated by default when a database is created. It is generated by default when a database is created. | binário | +| data.match | (internal) UUID matching table number | XML | (*) When the project is created from a .4db binary database, the data file is left untouched. Thus, it can be named differently and placed in another location. ### Settings folder -This folder contains **user settings files for data** used for database administration. +Esta pasta contém **arquivos de configuração de dados** utilizados para a administração do banco de dados. -> These settings take priority over **[user settings files](#settings-folder-1)** and **structure settings** files. +> Estes parâmetros têm prioridade sobre os **[arquivos de propriedades usuário](#settings-folder-1)** e os arquivos de **propriedades estrutura**. + +| Conteúdos | Descrição | Formato | +| ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | +| Backup.4DSettings | Parâmetros de cópia de segurança do banco de dados, utilizados para definir as [opções de cópia de segurança](Backup/settings.md)) quando o banco de dados for lançado com este arquivo de dados. Keys concerning backup configuration are described in the *4D XML Keys Backup* manual. | XML | +| settings.4DSettings | Propriedades personalizadas de o banco de dados para este arquivo de dados | XML | +| directory.json | Descrição de os grupos e usuários de 4D e seus direitos de acesso quando o banco for lançado com este arquivo de dados. | JSON | -| Contents | Description | Format | -| ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | -| Backup.4DSettings | Database backup settings, used to set the [backup options](Backup/settings.md)) when the database is run with this data file. Keys concerning backup configuration are described in the *4D XML Keys Backup* manual. | XML | -| settings.4DSettings | Custom database settings for this data file | XML | -| directory.json | Description of 4D groups, users, and their access rights when the database is run with this data file. | JSON | ### Logs folder @@ -179,42 +180,44 @@ The Logs folder contains all log files used by the project. Log files include, i - command debugging, - 4D Server requests (generated on client machines and on the server). -> An additional Logs folder is available in the system user preferences folder (active 4D folder, see [Get 4D folder](https://doc.4d.com/4Dv17R6/4D/17-R6/Get-4D-folder.301-4311294.en.html) command) for maintenance log files and in cases where data folder is read-only. +> Uma pasta Logs adicional está disponível na pasta de preferências do usuário do sistema (pasta 4D ativa, ver [Obter pasta 4D](https://doc.4d.com/4Dv17R6/4D/17-R6/Get-4D-folder.301-4311294.en.html) comando) para os arquivos de registro de manutenção e nos casos em que a pasta de dados for de apenas leitura. ## Settings folder -This folder contains **user settings files** used for database administration. File are added to the folder when necessary. +Esta pasta contém **arquivos de propriedades usuário** utilizados para a administração do banco de dados. Os arquivos são adicionados à pasta se for necessário. -> If a data settings file exists in a Settings folder [in the data folder](#settings-folder), it takes priority over user settings file. +> Se existir um arquivo de propriedades de dados [em uma pasta de dados ](#settings-folder), da pasta Dados, tem prioridade sobre o arquivo de propriedades do usuário. -| Contents | Description | Format | -| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------ | -| directory.json | Description of 4D groups and users for the database, as well as their access rights | JSON | -| BuildApp.4DSettings | Build settings file, created automatically when using the application builder dialog box or the `BUILD APPLICATION` command | XML | -| Backup.4DSettings | Database backup settings, used to set the [backup options](Backup/settings.md)) when each backup is launched. This file can also be used to read or set additional options, such as the amount of information stored in the *backup journal*. Keys concerning backup configuration are described in the *4D XML Keys Backup* manual. | XML | +| Conteúdos | Descrição | Formato | +| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------- | +| directory.json | Descrição dos grupos e usuários de 4D para o banco de dados, assim como seus direitos de acesso | JSON | +| BuildApp.4DSettings | Build settings file, created automatically when using the application builder dialog box or the `BUILD APPLICATION` command | XML | +| Backup.4DSettings | Database backup settings, used to set the [backup options](Backup/settings.md)) when each backup is launched. This file can also be used to read or set additional options, such as the amount of information stored in the *backup journal*. Keys concerning backup configuration are described in the *4D XML Keys Backup* manual. | XML | +| BuildApp.4DSettings | Build settings file, created automatically when using the application builder dialog box or the `BUILD APPLICATION` command | XML | ## userPreferences.*userName* folder -This folder contains files that memorize user configurations, e.g. break point positions. You can just ignore this folder. It contains for example: +Esta pasta contém arquivos que memorizam as configurações do usuário, por exemplo, o ponto de ruptura ou as posições das janelas. You can just ignore this folder. It contains for example: -| Contents | Description | Format | -| ---------------------------- | ------------------------------------------------------ | ------ | -| methodPreferences.json | Current user method editor preferences | JSON | -| methodWindowPositions.json | Current user window positions for methods | JSON | -| formWindowPositions.json | Current user window positions for forms | JSON | -| workspace.json | List of opened windows; on macOS, order of tab windows | JSON | -| debuggerCatches.json | Caught calls to commands | JSON | -| recentTables.json | Ordered list of tables | JSON | -| preferencesv15.4DPreferences | User preferences | JSON | +| Conteúdos | Descrição | Formato | +| -------------------------- | ------------------------------------------------------ | ------- | +| methodPreferences.json | Current user method editor preferences | JSON | +| methodWindowPositions.json | Current user window positions for methods | JSON | +| formWindowPositions.json | Current user window positions for forms | JSON | +| workspace.json | List of opened windows; on macOS, order of tab windows | JSON | +| debuggerCatches.json | Caught calls to commands | JSON | +| recentTables.json | Ordered list of tables | JSON | +| preferences.4DPreferences | Rota de dados atual e posições da janela principal | XML | ## Components folder -This folder contains the components to be available in the project database only. It must be stored at the same level as the Project folder. +Esta carpeta contém os componentes que devem estar disponíveis unicamente no banco de dados projeto. It must be stored at the same level as the Project folder. + +> Um banco de dados projeto pode ser utilizado por si mesmo como um componente: - para o desenvolvimento: ponha um alias/apelido de arquivo .4dproject na pasta Components do banco de dados local. - para o lançamento: crie o componente (ver [Criar um pacote projeto](building.md)) e ponha o arquivo .4dz resultante em uma pasta .4dbase na pasta Componentes do banco de dados local. - para o lançamento: crie o componente (ver [Criar um pacote projeto](building.md)) e ponha o arquivo .4dz resultante em uma pasta .4dbase na pasta Componentes do banco de dados local. - para o lançamento: crie o componente (ver [Criar um pacote projeto](building.md)) e ponha o arquivo .4dz resultante em uma pasta .4dbase na pasta Componentes do banco de dados local. - para o lançamento: crie o componente (ver [Criar um pacote projeto](building.md)) e ponha o arquivo .4dz resultante em uma pasta .4dbase na pasta Componentes do banco de dados local. -> A project database can be used itself as a component: - for development: put an alias of the .4dproject file in the Components folder of the host database. - for deployment: build the component (see [Building a project package](building.md)) and put the resulting .4dz file in a .4dbase folder in the Components folder of the host database. ## Plugins folder -This folder contains the plug-ins to be available in the project database only. It must be stored at the same level as the Project folder. \ No newline at end of file +This folder contains the plug-ins to be available in the project database only. It must be stored at the same level as the Project folder. diff --git a/website/translated_docs/pt/Project/building.md b/website/translated_docs/pt/Project/building.md index 5019333eb060dc..f35a9f7e262048 100644 --- a/website/translated_docs/pt/Project/building.md +++ b/website/translated_docs/pt/Project/building.md @@ -7,18 +7,20 @@ title: Building a project package The application builder allows you to: -* Build a compiled database, without interpreted code, -* Build a stand-alone, double-clickable application, *i.e.*, merged with 4D Volume Desktop, the 4D database engine, -* Build different applications from the same compiled database via an XML project, -* Build homogeneous client-server applications, -* Build client-server applications with automatic updating of client and server parts. -* Save your build settings for future use (*Save settings* button). +* Gerar um banco de dados compilado, sem código interpretado +* Build a stand-alone, double-clickable application, *i.e.*, merged with 4D Volume Desktop, the 4D database engine, +* Gerar aplicações diferentes a partir do mesmo banco de dados compilado mediante um projeto XML, +* Build homogeneous client-server applications, +* Build client-server applications with automatic updating of client and server parts. +* Save your build settings for future use (*Save settings* button). + + ## Build application overview Building a project package can be carried out using: -- either the [BUILD APPLICATION](https://doc.4d.com/4Dv17R6/4D/17-R6/BUILD-APPLICATION.301-4311300.en.html) command, +- o comando [BUILD APPLICATION](https://doc.4d.com/4Dv17R6/4D/17-R6/BUILD-APPLICATION.301-4311300.en.html), - or the [Build Application window](#application-builder). To display the Build Application dialog, select **Design** > **Build Application...** from the menu bar. @@ -29,11 +31,13 @@ The Build Application dialog includes several pages that can be accessed using t ![](assets/en/Project/appbuilderProj.png) -Building can only be carried out once the database is compiled. If you select this command without having previously compiled the database, or if the compiled code does not correspond to the interpreted code, a warning dialog box appears indicating that the database must be (re)compiled. + +A geração do banco de dados só pode ser realizado quando o banco de dados for compilado. Se selecionar esse comando sem ter previamente compilado o banco de dados, ou no caso do código compilado não for correspondente ao código interpretado, aparece uma caixa de diálogo de advertência que indica que o banco de dados deve ser (re)compilado. + ### Build application settings -Each build application parameter is stored as an XML key in the application project file named "buildApp.4DSettings" XML file, located in the Settings folder of the database. +Cada parâmetro de geração da aplicação é armazenado como uma chave XML no arquivo da aplicação chamada "buildApp.4DSettings", localizado na pasta Settings do banco de dados. Default parameters are used the first time the Build Application dialog box is used. The contents of the project file are updated, if necessary, when you click **Build** or **Save settings**. You can define several other XML settings file for the same project and employ them using the [BUILD APPLICATION](https://doc.4d.com/4Dv17R6/4D/17-R6/BUILD-APPLICATION.301-4311300.en.html) command. @@ -41,12 +45,13 @@ XML keys provide additional options besides those displayed in the Build Applica ### Log file -When an application is built, 4D generates a log file in the **Logs** folder. The log file stores the following information for each build: - +Quando uma aplicação é construída, 4D gera um arquivo de histórico na pasta **Logs**. The log file stores the following information for each build: - The start and end of building of targets, - The name and full access path of the files generated, - The date and time of the build, -- Any errors that occurred. +- Todos os erros que forem produzidos. + + ## Application name and destination folder @@ -56,369 +61,399 @@ Enter the name of the application in **Application Name**. Specify the folder for the built application in **Destination Folder**. If the specified folder does not already exist, 4D will create a *Build* folder for you. + + ## Compiled structure page This tab allows you to build a standard compiled structure file and/or a compiled component: ![](assets/en/Project/appbuilderProj.png) + ### Build compiled structure -Builds a database containing only compiled code. +Gera um banco de dados que contém apenas código compilado. -This feature creates a *.4dz* file within a *Compiled Database* folder. If you have named your application “MyProject”, 4D will create: +Esta funcionalidade cria um arquivo *.4dz* em uma pasta *Compiled Database*. Se chamar à sua aplicação "MyProject", 4D criará: *\/Compiled Database/\/\MyProject.4dz* -> A .4dz file is essentially a zipped (packed) version of the project folder. .4dz files can be used by 4D Server, 4D Volume license (merged applications), and 4D Developer. The compact and optimized size of .4dz files makes project packages easy to deploy. +> A .4dz file is essentially a zipped (packed) version of the project folder. Os arquivos.4dz podem ser utilizados por 4D Server, a licença 4D Volume (aplicações fusionadas) e 4D Developer. The compact and optimized size of .4dz files makes project packages easy to deploy. + #### Include related folders -When you check this option, any folders related to the database are copied into the Build folder as *Components* and *Resources* folders. For more information about these folders, refer to [Database Architecture](https://livedoc.4d.com/4D-Design-Reference-18/Managing-4D-databases/Description-of-4D-files.300-4575698.en.html#100374). +Quando se marca esta opção, todas as pastas relacionadas com o banco de dados na pasta Build como pastas *Components* e *Resources*. Para saber mais sobre essas pastas, consulte [Arquitetura do banco de dados](https://livedoc.4d.com/4D-Design-Reference-18/Managing-4D-databases/Description-of-4D-files.300-4575698.en.html#100374). + ### Build component Builds a compiled component from the structure. -A component is a standard 4D project in which specific functionalities have been developed. Once the component has been configured and installed in another 4D database (the host database), its functionalities are accessible from the host database. For more information about components, refer to the Developing and installing 4D components" documentation. +A component is a standard 4D project in which specific functionalities have been developed. Quando o componente tiver sido configurado e instalado em outro banco de dados 4D (o banco local), suas funcionalidades são acessíveis desde o banco local. Para saber mais sobre os componentes, veja a documentação "Desenvolver e instalar componentes 4D'. +Se tiver nomeado sua aplicação, *MeuComponente*, 4D criará uma pasta Components que contém a pasta *MeuComponente.4dbase*:

    *\/Components/name.4dbase/\.4DZ*. -If you have named your application, *MyComponent*, 4D will create a Components folder containing *MyComponent.4dbase* folder: +A pasta *MyComponent.4dbase* contém: +- *MyComponent.4DZ* file +- Uma pasta *Resources* - todos os recursos associados são copiados automaticamente nesta pasta. Todas as outras pastas de componentes ou plugins não são copiadas (um componente não pode utilizar plugins ou outros componentes). -< -p>*\/Components/name.4dbase/\.4DZ*. +## Página de aplicação -The *MyComponent.4dbase* folder contains: - *MyComponent.4DZ* file - A *Resources* folder - any associated Resources are automatically copied into this folder. Any other components and/or plugins folders are not copied (a component cannot use plug-ins or other components). +Esta aba lhe permite construir uma versão autônoma e monousuário de sua aplicação: -## Application page +![](assets/en/Project/standaloneProj.png) -This tab allows you can build a stand-alone, single-user version of your application: +### Criar uma aplicação autônoma -![](assets/en/Project/standaloneProj.png) +Selecionando a opção **Criar uma aplicação autônoma** e clicando em **Gerar** se criará uma aplicação autônoma (com duplo clique) diretamente desde o projeto do banco de dados. -### Build stand-alone Application +Os elementos abaixo são necessários para a geração: +- 4D Volume Desktop (o motor do banco de dados 4D), +- uma [licença apropriada](#licenses) -Checking the **Build stand-alone Application** option and clicking **Build** will create a stand-alone (double-clickable) application directly from your database project. +Em Windows, esta funcionalidade cria um arquivo executável (.exe). Em macOS, se encarrega da criação de pacotes de software. -The following elements are required for the build: +O princípio consiste em fusionar o arquivo 4D Volume Desktop com um arquivo de estrutura compilado. The functionality provided by the 4D Volume Desktop file is linked with the product offer to which you have subscribed. Para mais informação sobre este ponto, consulte a documentação comercial e de [4D Store](http://www.4d.com/). -- 4D Volume Desktop (the 4D database engine), -- an [appropriate license](#licenses) +Pode definir um arquivo de dados por padrão ou permitir aos usuários criar e utilizar seu próprio arquivo de dados (consulte a seção [Gestão de arquivos de dados nas aplicações finais](https://doc.4d.com/4Dv17R6/4D/17-R6/Data-file-management-in-final-applications.300-4354729.en.html)). -On Windows, this feature creates an executable file (.exe). On macOS, it handles the creation of software packages. +É possível automatizar a atualização das aplicações monousuário fusionadas mediante uma sequência de comandos de linguagem (consulte a seção [Atualización automática de aplicações servidor ou monousuário](https://doc.4d.com/4Dv17R6/4D/17-R6/Automatic-updating-of-server-or-single-user-applications.300-4354721.en.html). -The principle consists of merging a compiled structure file with 4D Volume Desktop. The functionality provided by the 4D Volume Desktop file is linked with the product offer to which you have subscribed. For more information about this point, refer to the sales documentation and to the [4D Store](http://www.4d.com/). +#### Localização de 4D Volume Desktop -You can define a default data file or allow users to create and use their own data file (see the [Data file management in final applications](https://doc.4d.com/4Dv17R6/4D/17-R6/Data-file-management-in-final-applications.300-4354729.en.html) section). +Para gerar uma aplicação autônoma, primeiro deve designar a pasta que contém o arquivo 4D Volume Desktop: -It is possible to automate the update of merged single-user applications by means of a sequence of language commands (see [Automatic updating of server or single-user applications](https://doc.4d.com/4Dv17R6/4D/17-R6/Automatic-updating-of-server-or-single-user-applications.300-4354721.en.html). +* *Windows* - a pasta contém os arquivos 4D Volume Desktop.4DE, 4D Volume Desktop.RSR, assim como vários arquivos e pastas necessários para seu funcionamento. Estes elementos devem ser colocados no mesmo nível que a pasta selecionada. +* *macOS* - 4D Volume Desktop é fornecida na forma de um pacote de software estruturado que contém vários arquivos e pastas genéricas. -#### 4D Volume Desktop Location +Para selecionar a pasta de 4D Volume Desktop, clique no botão **[...]**. Aparece uma caixa de diálogo que lhe permite determinar a pasta (Windows) ou o pacote (macOS) de 4D Volume Desktop. -In order to build a stand-alone application, you must first designate the folder containing the 4D Volume Desktop file: +Quando a pasta for selecionada, se mostra seu nome de rota completo e, se realmente conter 4D Volume Desktop, se ativa a opção de construir uma aplicação executável. -* *Windows* - the folder contains the 4D Volume Desktop.4DE, 4D Volume Desktop.RSR, as well as various files and folders required for its operation. These items must be placed at the same level as the selected folder. -* *macOS* - 4D Volume Desktop is provided in the form of a structured software package containing various generic files and folders. +> O número de versão de 4D Volume Desktop deve coincidir com o número de versão de 4D Developer Edition. Por ejemplo, se utilizar 4D Developer v18, deve selecionar um 4D Volume Desktop v18. -To select the 4D Volume Desktop folder, click on the **[...]** button. A dialog box appears allowing you to designate the 4D Volume Desktop folder (Windows) or package (macOS). +#### Modo de vinculo de dados -Once the folder is selected, its complete pathname is displayed and, if it actually contains 4D Volume Desktop, the option for building an executable application is activated. +Esta opção permite escolher o modo de vinculação entre a aplicação fusionada e o arquivo de dados local. Existem dois modos de vinculação de dados: -> The 4D Volume Desktop version number must match the 4D Developer Edition version number. For example, if you use 4D Developer v18, you must select a 4D Volume Desktop v18. +* **Por nome da aplicação** (como padrão) - a aplicação 4D abre automaticamente o último arquivo de dados aberto correspondente ao arquivo de estrutura. This allows you to move the application package freely on the disk. Esta opção deve ser utilizada geralmente para as aplicações fusionadas, a menos que necessite especificamente duplicar a aplicação. -#### Data linking mode +* **Rota da aplicação** - a aplicação 4D fusionada analisará o arquivo *lastDataPath. xml* e tentará abrir o arquivo de dados com um atributo "executablePath" que coincida com a rota completa da aplicação. If such an entry is found, its corresponding data file (defined through its "dataFilePath" attribute) is opened. Caso contrario, se abrirá el último arquivo de datos aberto (modo por defecto). -This option lets you choose the linking mode between the merged application and the local data file. Two data linking modes are available: +Para mais informação sobre o modo de vinculação de dados, consulte a seção [Último arquivo de dados aberto](#último-arquivo-de-dados-aberto). -* **By application name** (default) - The 4D application automatically opens the most recently opened data file corresponding to the structure file. This allows you to move the application package freely on the disk. This option should generally be used for merged applications, unless you specifically need to duplicate your application. -* **By application path** - The merged 4D application will parse the application's *lastDataPath.xml* file and try to open the data file with an "executablePath" attribute that matches the application's full path. If such an entry is found, its corresponding data file (defined through its "dataFilePath" attribute) is opened. Otherwise, the last opened data file is opened (default mode). +#### Arquivos gerados -For more information about the data linking mode, refer to the [Last data file opened](#last-data-file-opened) section. +Quando clicar no botão **Construir**, 4D cria automaticamente uma pasta **Aplicação final** na **Pasta de destino** especificada. Dentro da pasta Final Application há uma subpasta com o nome da aplicação especificada nela. -#### Generated files +Se especificou "MyProject" como nome da aplicação, encontrará os seguintes arquivos nesta subpasta (também conhecida como MyProject): -When you click on the **Build** button, 4D automatically creates a **Final Application** folder in the specified **Destination Folder**. Inside the Final Application folder is a subfolder with the name of the specified application in it. +* *Windows* + * MyProject.exe - Seu executável e um MyProject.rsr (os recursos da aplicação) + * Pasta 4D Extensions, pasta Resources, várias bibliotecas (DLL), pasta Native Components, pasta SASL Plugins - Arquivos necessários para o funcionamento da aplicação + * Pasta Database - Incluem uma pasta Resources e o arquivo MyProject.4DZ. Constituem a estrutura compilada do banco de dados assim como a pasta Resources. **Nota**: esta pasta também contém a pasta *Default Data*, se for definida (ver [Gestão de arquivos de dados em aplicações finais](#data-file-management-in-final-applicatons). + * (Opcional) Pasta Components ou pasta Plugins - contém todos os componentes ou arquivos plug-in incluídos no banco de dados. Para mais informação ao respeito, consulte a seção [Plugins e componentes](#plugins-and-components). + * Pasta Licenses - Um arquivo XML de números de licença integrados na aplicação. Para mais informação ao respeito, consulte a seção [Licenças e certificados](#licenses-and-certificate). + * Elementos adicionais anexados à pasta 4D Volume Desktop, se houver (ver [Personalização da pasta 4D Volume Desktop](#customizing-4d-volume-desktop-folder)). -If you have specified "MyProject" as the name of the application, you will find the following files in this subfolder (aka MyProject): + Todos esses elementos devem manter-se na mesma pasta para que o executável funcione. -* *Windows* - - * MyProject.exe - Your executable and a MyProject.rsr (the application resources) - * 4D Extensions folder, Resources folder, various libraries (DLL), Native Components folder, SASL Plugins folder - Files necessary for the operation of the application - * Database folder - Includes a Resources folder and MyProject.4DZ file. They make up the compiled structure of the database as well as the database Resources folder. **Note**: This folder also contains the *Default Data* folder, if it has been defined (see [Data file management in final applications](#data-file-management-in-final-applicatons). - * (Optional) Components folder and/or Plugins folder - Contains any components and/or plug-in files included in the database. For more information about this, refer to the [Plugins and components](#plugins-and-components) section. - * Licenses folder - An XML file of license numbers integrated into the application. For more information about this, refer to the [Licenses & Certificate](#licenses-and-certificate) section. - * Additional items added to the 4D Volume Desktop folder, if any (see [Customizing the 4D Volume Desktop folder](#customizing-4d-volume-desktop-folder)). - - All these items must be kept in the same folder in order for the executable to operate. +* *macOS* + - Um pacote de software chamado MyProject.app que contém tua aplicação e todos os elementos necessários para seu funcionamento, incluindo os plug-ins, componentes e licencias. For more information about integrating plug-ins and components, refer to the [Plugins and components](#plugins-and-components) section. For more information about integrating licenses, refer to the [Licenses & Certificate](#licenses-and-certificate) section. **Nota**: em macOS, o comando [Arquivo de aplicação](https://doc.4d.com/4Dv17R6/4D/17-R6/Application-file.301-4311297.en.html) da linguagem 4D devolve o nome da rota do arquivo ApplicationName ( na pasta Contents:macOS do pacote de software) e não o do arquivo .comp (pasta Contents:Resources do pacote de software). -* *macOS* - - - A software package named MyProject.app containing your application and all the items necessary for its operation, including the plug-ins, components and licenses. For more information about integrating plug-ins and components, refer to the [Plugins and components](#plugins-and-components) section. For more information about integrating licenses, refer to the [Licenses & Certificate](#licenses-and-certificate) section. **Note**: In macOS, the [Application file](https://doc.4d.com/4Dv17R6/4D/17-R6/Application-file.301-4311297.en.html) command of the 4D language returns the pathname of the ApplicationName file (located in the Contents:macOS folder of the software package) and not that of the .comp file (Contents:Resources folder of the software package). -#### Customizing 4D Volume Desktop folder +#### Personalização da pasta 4D Volume Desktop -When building a stand-alone application, 4D copies the contents of the 4D Volume Desktop folder into Destination folder > *Final Application* folder. You're then able to customize the contents of the original 4D Volume Desktop folder according to your needs. You can, for example: +Quando construir uma aplicação Independente, 4D copia o conteúdo da pasta 4D Volume Desktop na pasta Destination > *Final Application*. You're then able to customize the contents of the original 4D Volume Desktop folder according to your needs. Pode, por exemplo: -* Install a 4D Volume Desktop version corresponding to a specific language; -* Add a custom *PlugIns* folder; -* Customize the contents of the *Resources* folder. +* Instalar uma versão de 4D Volume Desktop correspondente a uma linguagem específico; +* Adicionar uma pasta *PlugIns* personalizada; +* Personaliza o conúdo da pasta *Resources*. +> Em macOS, 4D Volume Desktop se proporciona em forma de pacote de software. Para modificá-lo, primeiro precisa exibir seu conteúdo (**Control+clique** no ícone). -> In macOS, 4D Volume Desktop is provided in the form of a software package. In order to modify it, you must first display its contents (**Control+click** on the icon). -#### Location of Web files +#### Localização dos arquivos web -If your stand-alone application is used as a Web server, the files and folders required by the server must be installed in specific locations. These items are the following: +Se sua aplicação executável for usada como servidor web, os arquivos e pastas requeridos pelo servidor devem ser instalados em locais específicas. Estes elementos são os seguintes: -* *cert.pem* and *key.pem* files (optional): These files are used for SSL connections and by data encryption commands, -* default Web root folder. +* *arquivoscert.pem* e *key.pem* (opcional): Estes arquivos se utilizam para as conexões SSL e pelos comandos de criptografia de dados,. +* Marcador="*" level="0" spaces="0" spaces-after-marker="2"> pasta raiz da web padrão.. -Items must be installed: +Os elementos devem estar instalados: -- **on Windows**: in the *Final Application\MyProject\Database* subfolder. -- **on macOS**: next to the *MyProject.app* software package. +- **em Windows**: na subpasta *Aplicação final*.. +- **em macOS**: junto ao pacote de software *MyProject.app*. -## Client/Server page -On this tab, you can build customized client-server applications that are homogenous, cross-platform and with an automatic update option. + + + +## Página de cliente/servidor + +Nesta aba podem ser construídas aplicações cliente-servidor personalizadas, homogêneas, multiplataforma e com opção de atualização automática. ![](assets/en/Project/buildappCSProj.png) -### What is a Client/Server application? +### O que é uma aplicação Cliente/Servidor? + +Uma aplicação cliente/servidor surge da combinação de três elementos: + +- Um banco de dados compilado em 4D, +- A aplicação 4D Server, +- Marcador="-" level="0" spaces="0" spaces-after-marker="0">A aplicação 4D Volume Desktop (macOS ou Windows).. + +Depois de construída, uma aplicação cliente/servidor é composta de duas partes personalizadas: a parte Servidor (única) e a parte Cliente (para instalar em cada máquina cliente). -A client/server application comes from the combination of three items: +Também se personaliza a aplicação cliente/servidor e se simplifica seu manejo: -- A compiled 4D database, -- The 4D Server application, -- The 4D Volume Desktop application (macOS and/or Windows). +- Para lançar a parte de servidor, o usuário simplesmente dá duplo clique na aplicação do servidor. Não é necessário selecionar o banco de dados. +- Para lançar a parte cliente, o usuário simplesmente dá duplo clique na aplicação cliente, que se conecta diretamente à aplicação servidor. Não é necessário escolher um banco de dados em uma caixa de diálogo de conexão. The client targets the server either using its name, when the client and server are on the same sub-network, or using its IP address, which is set using the `IPAddress` XML key in the buildapp.4DSettings file. If the connection fails, [specific alternative mechanisms can be implemented](#management-of-client-connections). You can "force" the display of the standard connection dialog box by holding down the **Option** (macOS) or **Alt** (Windows) key while launching the client application. Only the client portion can connect to the corresponding server portion. Se um usuário tentar se conectar com a parte servidor utilizando uma aplicação 4D padrão, se devolve uma mensagem de erro e a conexão é impossível. +- Se pode configurar uma aplicação cliente/servidor para que a parte cliente [se atualize automaticamente através da rede](#copy-of-client-applications-in-the-server-application). +- Também é possível automatizar a atualização da parte servidor mediante o uso de uma sequência de comandos da linguagem ([SET UPDATE FOLDER](https://doc.4d.com/4Dv17R6/4D/17-R6/SET-UPDATE-FOLDER.301-4311308.en.html) e [RESTART 4D](https://doc.4d.com/4Dv17R6/4D/17-R6/RESTART-4D.301-4311311.en.html)). -Once built, a client/server application is composed of two customized parts: the Server portion (unique) and the Client portion (to install on each client machine). -Also, the client/server application is customized and its handling simplified: -- To launch the server portion, the user simply double-clicks on the server application. The database does not need to be selected. -- To launch the client portion, the user simply double-clicks the client application, which connects directly to the server application. You do not need to choose a database in a connection dialog box. The client targets the server either using its name, when the client and server are on the same sub-network, or using its IP address, which is set using the `IPAddress` XML key in the buildapp.4DSettings file. If the connection fails, [specific alternative mechanisms can be implemented](#management-of-client-connections). You can "force" the display of the standard connection dialog box by holding down the **Option** (macOS) or **Alt** (Windows) key while launching the client application. Only the client portion can connect to the corresponding server portion. If a user tries to connect to the server portion using a standard 4D application, an error message is returned and connection is impossible. -- A client/server application can be set so that the client portion [can be updated automatically over the network](#copy-of-client-applications-in-the-server-application). -- It is also possible to automate the update of the server part through the use of a sequence of language commands ([SET UPDATE FOLDER](https://doc.4d.com/4Dv17R6/4D/17-R6/SET-UPDATE-FOLDER.301-4311308.en.html) and [RESTART 4D](https://doc.4d.com/4Dv17R6/4D/17-R6/RESTART-4D.301-4311311.en.html)). +### Construir aplicação de servidor -### Build server application +Marque esta opção para gerar a parte de servidor de sua aplicação durante a fase de construção. You must designate the location on your disk of the 4D Server application to be used. Este 4D Server deve corresponder a plataforma atual (que também será a plataforma da aplicação do servidor). -Check this option to generate the server part of your application during the building phase. You must designate the location on your disk of the 4D Server application to be used. This 4D Server must correspond to the current platform (which will also be the platform of the server application). +#### Local de 4D Server -#### 4D Server location +Clique no botão **[...]** e utilize a caixa de diálogo *Buscar pasta* para localizar a aplicação 4D Server. Em macOS, deve selecionar o pacote de 4D Server diretamente. -Click on the **[...]** button and use the *Browse for folder* dialog box to locate the 4D Server application. In macOS, you must select the 4D Server package directly. +#### Versão atual -#### Current version +Se utiliza para indicar o número de versão atual da aplicação gerada. You may then accept or reject connections by client applications according to their version number. O intervalo de compatibilidade das aplicações clientes e servidor se define mediante [chaves XML](#build-application-settings)). -Used to indicate the current version number for the application generated. You may then accept or reject connections by client applications according to their version number. The interval of compatibility for client and server applications is set using specific [XML keys](#build-application-settings)). +#### Modo de link de dados -#### Data linking mode +Esta opção permite escolher o modo de vinculação entre a aplicação fusionada e o arquivo de dados local. Existem dois modos de vinculação de dados: -This option lets you choose the linking mode between the merged application and the local data file. Two data linking modes are available: +* **Por nome da aplicação** (como padrão) - a aplicação 4D abre automaticamente o último arquivo de dados aberto correspondente ao arquivo de estrutura. This allows you to move the application package freely on the disk. Esta opção deve ser utilizada geralmente para as aplicações fusionadas, a menos que necessite especificamente duplicar a aplicação. -* **By application name** (default) - The 4D application automatically opens the most recently opened data file corresponding to the structure file. This allows you to move the application package freely on the disk. This option should generally be used for merged applications, unless you specifically need to duplicate your application. +* **Rota da aplicação** - a aplicação 4D fusionada analisará o arquivo *lastDataPath. xml* e tentará abrir o arquivo de dados com um atributo "executablePath" que coincida com a rota completa da aplicação. If such an entry is found, its corresponding data file (defined through its "dataFilePath" attribute) is opened. Caso contrario, se abrirá o último arquivo de dados aberto (modo padrão). -* **By application path** - The merged 4D application will parse the application's *lastDataPath.xml* file and try to open the data file with an "executablePath" attribute that matches the application's full path. If such an entry is found, its corresponding data file (defined through its "dataFilePath" attribute) is opened. Otherwise, the last opened data file is opened (default mode). +Para mais informação sobre o modo de vinculação de dados, consulte [Último arquivo de dados aberto.](#last-data-file-opened) -For more information about the data linking mode, refer to the [Last data file opened](#last-data-file-opened) section. -### Build client application +### Construir aplicação cliente -Checking this option generates the client part of your application during the building phase. +Marcando esta opção se gera a parte cliente de sua aplicação durante a fase de construção. #### 4D Volume Desktop -You must designate the location on your disk of the 4D Volume Desktop application to be used. This 4D Volume Desktop must correspond to the current platform (which will also be the platform of the client application). If you want to build a client application for a “concurrent” platform, you must carry out an additional build operation using a 4D application running on that platform. This is only necessary for the initial version of the client application since subsequent updates can be handled directly on the same platform using the automatic update mechanism. For more information about this point, see [Customizing 4D Server and/or 4D Client folders](#customizing-4d-server-and-or-4d-client-folders). +Deve determinar o local em seu disco da aplicação 4D Volume Desktop a utilizar. This 4D Volume Desktop must correspond to the current platform (which will also be the platform of the client application). If you want to build a client application for a “concurrent” platform, you must carry out an additional build operation using a 4D application running on that platform. This is only necessary for the initial version of the client application since subsequent updates can be handled directly on the same platform using the automatic update mechanism. Para mais informação sobre este ponto, consulte [Personalizar as pastas 4D Server ou 4D Client](#customizing-4d-server-and-or-4d-client-folders). + +> O número de versão de 4D Volume Desktop deve coincidir com o número de versão de 4D Developer Edition. Por exemplo, se utiliza 4D Developer v18, deve selecionar um 4D Volume Desktop v18. + +Se quiser que a aplicação cliente se conecte ao servidor utilizando um local específico (distinto do nome de servidor publicado na subrede), deve utilizar a chave XML `IPAddress` no arquivo buildapp.4DSettings. For more information about this file, refer to the description of the `BUILD APPLICATION` command. You can also implement specific mechanisms in the event of a connection failure. Os diferentes cenários propostos são descritos no parágrafo [Gestão das conexões para as aplicações clientes](#management-of-client-connections). + +#### Cópia das aplicações clientes na aplicação servidor + +As opções desta área para configurar o mecanismo de atualização das partes clientes de suas aplicações cliente/servidor utilizando a rede cada vez que se gera uma nova versão da aplicação. + +- **Permitir a atualização automática da aplicação cliente Windows** - Marque estas opções para que sua aplicação cliente/servidor Windows possa aproveitar o mecanismo de atualização automática dos clientes através da rede. +- **Permitir a atualização automática da aplicação cliente Macintosh** - Marque estas opções para que sua aplicação cliente/servidor Macintosh possa aproveitar o mecanismo de atualização automática para clientes através da rede. + +* **Permitir a atualização automática da aplicação cliente Macintosh** - Se quiser criar uma aplicação cliente multiplataforma, deve designar a localização em seu disco da aplicação 4D Volume Desktop que corresponde à plataforma "concorrente" da plataforma de construção. -> The 4D Volume Desktop version number must match the 4D Developer Edition version number. For example, if you use 4D Developer v18, you must select a 4D Volume Desktop v18. + Por exemplo, se construir a aplicação em Windows, deve utilizar o botão **[...]** para designar a aplicação 4D Volume Desktop macOS (fornecida como pacote). -If you want the client application to connect to the server using a specific address (other than the server name published on the sub-network), you must use the `IPAddress` XML key in the buildapp.4DSettings file. For more information about this file, refer to the description of the `BUILD APPLICATION` command. You can also implement specific mechanisms in the event of a connection failure. The different scenarios proposed are described in the [Management of connections by client applications](#management-of-client-connections) paragraph. -#### Copy of client applications in the server application -The options of this area to set up the mechanism for updating the client parts of your client/server applications using the network each time a new version of the application is generated. +#### Mostrar a notificação de atualização -- **Allow automatic update of Windows client application** - Check these options so that your Windows client/server application can take advantage of the automatic update mechanism for clients via the network. -- **Allow automatic update of Macintosh client application** - Check these options so that your Macintosh client/server application can take advantage of the automatic update mechanism for clients via the network. +A notificação de atualização da aplicação cliente se realiza automaticamente depois da atualização da aplicação servidor. -- **Allow automatic update of Macintosh client application** - If you want to create a cross-platform client application, you must designate the location on your disk of the 4D Volume Desktop application that corresponds to the “concurrent” platform of the build platform. - - For example, if you build your application in Windows, you must use the **[...]** button to designate the 4D Volume Desktop macOS application (provided as a package). +Funciona da seguinte maneira: quando se construir uma nova versão da aplicação cliente/servidor utilizando o gerador de aplicações, a nova parte cliente se copia como um arquivo comprimido na subpasta **Upgrade4DClient** da pasta Server **ApplicationName** (em macOS, estas pastas são incluídas no pacote servidor). Se seguiu o processo para gerar uma aplicação cliente multiplataforma, um arquivo *4darchive* de atualização está disponível para cada plataforma: -#### Displaying update notification +Para ativar as notificações de atualização da aplicação cliente, basta com substituir a versão antiga da aplicação servidor pela nova e executá-la. O resto do processo é automático.

    Client* e *Server*. +> Estas pastas não são geradas se produzir um erro. Neste caso, abra o [arquivo-de-historico](#archivo-de-registro) para conhecer a causa de erro. -Once a client/server application is built, you will find a new folder in the destination folder named **Client Server executable**. This folder contains two subfolders, *\Client* and *\Server*. +A pasta *Client* contém a parte cliente da aplicação correspondente à plataforma de execução do gerador da aplicação. This folder must be installed on each client machine. a pasta *Server* contém a parte servidor da aplicação. -> These folders are not generated if an error occurs. In this case, open the [log file](#log-file) in order to find out the cause of the error. +o conteúdo destas pastas varia em função da plataforma atual: -The *\Client* folder contains the client portion of the application corresponding to the execution platform of the application builder. This folder must be installed on each client machine. The *\Server* folder contains the server portion of the application. +* *Windows* - Cada pasta contém o arquivo executável da aplicação, chamado *\Client.exe* para a parte cliente e *\Server.exe* para a parte servidor, assim como os arquivos .rsr correspondentes. As pastas também contém vários arquivos e pastas necessários para o funcionamento das aplicações e os elementos personalizados que podem estar nas pastas 4D Volume Desktop e 4D Server de origem. +* *macOS* - Cada pasta contém só o pacote de aplicações, chamado\ Cliente para a parte cliente e \ Server para a parte servidor. Each package contains all the necessary items for the application to work. Em macOS, se lança um pacote dando um duplo clique. -The contents of these folders vary depending on the current platform: + > Os pacotes macOS gerados contém os mesmos elementos que as subpastas Windows. Pode visualizar seu conteúdo (**Control+clique** sobre o ícone) para poder modificá-lo.. -* *Windows* - Each folder contains the application executable file, named *\Client.exe* for the client part and *\Server.exe* for the server part as well as the corresponding .rsr files. The folders also contain various files and folders necessary for the applications to work and customized items that may be in the original 4D Volume Desktop and 4D Server folders. -* *macOS* - Each folder contains only the application package, named \ Client for the client part and \ Server for the server part. Each package contains all the necessary items for the application to work. Under macOS, launch a package by double-clicking it. - - > The macOS packages built contain the same items as the Windows subfolders. You can display their contents (**Control+click** on the icon) in order to be able to modify them. - > +Se marcar a opção "Permitir a atualização automática da aplicação cliente", se adiciona uma subpasta adicional chamada *Upgrade4DClient* na pasta/pacote *Server*. This subfolder contains the client application in macOS and/or Windows format as a compressed file. Este arquivo se utiliza durante a atualização automática das aplicações clientes. -If you checked the “Allow automatic update of client application” option, an additional subfolder called *Upgrade4DClient* is added in the *\Server* folder/package. This subfolder contains the client application in macOS and/or Windows format as a compressed file. This file is used during the automatic client application update. +#### Personalizar a pasta 4D Volume Desktop -#### Customizing 4D Volume Desktop folder +Durante a criação de uma aplicação executável, 4D duplica o conteúdo da pasta 4D Volume Desktop na subpasta Final Application da pasta de destino. A seguir poderá personalizar o conteúdo da pasta 4D volume desktop original segundo suas necessidades. Pode, por exemplo: -When building a double-clickable application, 4D copies the contents of the 4D Volume Desktop folder into the Final Application subfolder of the destination folder. You are then able to customize the contents of the original 4D Volume Desktop folder according to your needs. You can, for instance: +- Instalar uma versão de 4D Volume Desktop correspondente a uma linguagem específico; +- Adicionar uma pasta PlugIns personalizada; +- Personalizar o conteúdo da pasta Resources. -- Install a 4D Volume Desktop version corresponding to a specific language; -- Add a custom PlugIns folder; -- Customize the contents of the Resources folder. +#### Local dos arquivos web -#### Location of Web files +Se a parte servidor ou do cliente de sua aplicação de duplo clique se utiliza como servidor web, os arquivos e pastas exigidos pelo servidor debem ser instalados em locais específicos. Estes elementos são os seguintes: -If the server and/or client part of your double-clickable application is used as a Web server, the files and folders required by the server must be installed in specific locations. These items are the following: +- *cert.pem* e *key.pem* arquivos (opcional): Esses arquivos são usados por conexões SSL e por comandos de criptografia, +- Pasta web raiz (WebFolder). -- *cert.pem* and *key.pem* files (optional): These files are used for SSL connections and by data encryption commands, -- Default Web root folder (WebFolder). +Itens devem ser instalados: +* **em Windows** + * **aplicação servidor** - em *executávle Cliente Servidor\ \Server\Server Database* subpasta. + * **Aplicação cliente** - em *executável Client Server\ \Cliente* subpasta. -Items must be installed: * **on Windows** * **Server application** - in the *Client Server executable\ \Server\Server Database* subfolder. * **Client application** - in the *Client Server executable\ \Client* subfolder. +* **em macOS** + * **Aplicação Servidor** - ao lado do *\Servidor* pacote de software. + * **Aplicação Servidor** - ao lado de *\Cliente* software package. -* **on macOS** - * **Server application** - next to the *\Server* software package. - * **Client application** - next to the *\Client* software package. -## Plugins & components page -On this tab, you set each [plug-in](Concepts/plug-ins.md) and each [component](Concepts/components.md) that you will use in your stand-alone or client/server application. -The page lists the elements loaded by the current 4D application: + +## Plugins & páginas de componentes + +Nessa aba estabelece [plug-in](Concepts/plug-ins.md)e cada [componente](Concepts/components.md) que vai usar em sua aplicação standalone ou cliente/server. + +A página lista os elm,entos carregados pela aplicação atual 4D: ![](assets/en/Project/buildapppluginsProj.png) -* **Active** column - Indicates that the items will be integrated into the application package built. All the items are checked by default. To exclude a plug-in or a component, deselect the check box next to it. +* **Ativo** coluna - Indica que os itens serão integrados na o pacote da aplicação. All the items are checked by default. Para excluir um plug-in ou um componente, de-selecione a check box que está do lado. + +* **Coluna Plugins e componentes** - Exibe o nome do componente ou plug-in. + +* **Coluna ID** - Exibe o número de identificação do plug-in/componente (se houver). + +* **Coluna Tipo** coluna - Indica o tipo de item: plug-in ou componente. + +Se quiser integrar outros plug-ins ou componentes com sua aplicação executável, precisa colocá-las nas pastas **PlugIns** ou **Componentes** do lado da aplicação 4D Volume Desktop ou da aplicação 4D Server. O mecanismo para copiar os conteúdos da pasta de aplicação fonte (ver [Personalizar a pasta 4D Volume Desktop](#customizing-4d-volume-desktop-folder)) pode ser usada para integrar qualquer tipo de arquivo em uma aplicação executável. + +Se houver um conflito entre duas versões diferentes do mesmo plug-in (um carregado por 4D e outro em uma pasta aplicação fonte), a prioridade é do plug-in instalado na pasta 4D Volume Desktop/4D Server. Entretanto se houver duas instâncias do mesmo componente, a aplicação não vai abrir. +> O uso de plug-ins ou componentes em uma versão lançada exige os números de licença necessários. + + + + + -* **Plugins and components** column - Displays the name of the plug-in/component. +## Página Licenças & Certificado -* **ID** column - Displays the plug-in/component's identification number (if any). -* **Type** column - Indicates the type of item: plug-in or component. -If you want to integrate other plug-ins or components into the executable application, you just need to place them in a **PlugIns** or **Components** folder next to the 4D Volume Desktop application or next to the 4D Server application. The mechanism for copying the contents of the source application folder (see [Customizing the 4D Volume Desktop folder](#customizing-4d-volume-desktop-folder)) can be used to integrate any type of file into the executable application. -If there is a conflict between two different versions of the same plug-in (one loaded by 4D and the other located in the source application folder), priority goes to the plug-in installed in the 4D Volume Desktop/4D Server folder. However, if there are two instances of the same component, the application will not open. -> The use of plug-ins and/or components in a deployment version requires the necessary license numbers. -## Licenses & Certificate page +## -The Licences & Certificate page can be used to: +A página Licenças & Certificados pode ser usada para: + +* determinar o número de licenças que precisa integrar em sua aplicação monusuário stand-alone +* assine a aplicação usando o certificado em macOS. -* designate the license number(s) that you want to integrate into your single-user stand-alone application -* sign the application by means of a certificate in macOS. ![](assets/en/Project/buildapplicenseProj.png) -### Licenses +### Licenças -This tab displays the list of available deployment licenses that you can integrate into your application. By default, the list is empty. You must explicitly add your *4D Developer Professional* license as well as each *4D Desktop Volume* license to be used in the application built. You can add another 4D Developer Professional number and its associated licenses other than the one currently being used. +Essa aba exibe a lista de licenças de lançamento disponíveis que pode integrar em sua aplicação. By default, the list is empty. You must explicitly add your *4D Developer Professional* license as well as each *4D Desktop Volume* license to be used in the application built. Pode adicoinar outro número de 4D Developer Professional e licenças associadas que está sendo usada atualmente. -To remove or add a license, use the **[+]** and **[-]** buttons at the bottom of the window. +Para remover ou adicionar uma licença, use os botões **[+]** e **[-]** no fundo da janela. -When you click on the \[+] button, an open file dialog box appears displaying by default the contents of the *Licenses* folder of your machine. For more information about the location of this folder, refer to the [Get 4D folder](https://doc.4d.com/4Dv17R6/4D/17-R6/Get-4D-folder.301-4311294.en.html) command. +Quando clicar no botão \[+] uma caixa de diálogo abrir arquivo aparece com os conteúdos da pasta *Licenças* em sua máquina. Para saber mais sobre o local dessa pasta, veja o comando [Get 4D folder](https://doc.4d.com/4Dv17R6/4D/17-R6/Get-4D-folder.301-4311294.en.html) . -You must designate the files that contain your Developer license as well as those containing your deployment licenses. These files were generated or updated when the *4D Developer Professional* license and the *4D Desktop Volume* licenses were purchased. +Precisa deteminar os arquivos que contenham sua licença Developr assim como aquelas contendo suas licenças de lançamento. Estes arquivo foram gerados ou atualizados quando foram compradas as licenças *4D Developer Professional* e *4D Desktop Volume* . -Once you have selected a file, the list will indicate the characteristics of the license that it contains. +Quando tiver selecionado um arquivo, a lista indica as caracteristicas da licença que contém. -* **License #** - Product license number -* **License** - Name of the product -* **Expiration date** - Expiration date of the license (if any) -* **Path** - Location on disk +* **License #** - Número de licença de produto +* **License** - Nome do produto +* **Expiration date** - Prazo de validade da licença (se houver +* **Path** - Local no disco -If a license is not valid, a message will warn you. +Se uma licença não for válida, uma mensagem vai avisar. -You can designate as many valid files as you want. When building an executable application, 4D will use the most appropriate license available. +Pode determinar quantos arquivos válidos quantos quiser. Quando construir uma aplicação executável, 4D vai usar a licença mais apropriada que esteja disponível. +> Licenças dedicadas "R" são necessárias para construir aplicações baseadas em versões "R-release" (número de licença para produtos "R" começa com "R-4DDP"). -> Dedicated "R" licenses are required to build applications based upon "R-release" versions (license numbers for "R" products start with "R-4DDP"). +Depois que a aplicação for construída, um novo arquivo de licença de lançamento é incluído automaticamente na pasta Licenças ao lado da aplicação executável (Windows) ou do pacote (macOS). -After the application is built, a new deployment license file is automatically included in the Licenses folder next to the executable application (Windows) or in the package (macOS). -### OS X signing certificate +### Certificado de assinatura OS X -The application builder can sign merged 4D applications under macOS (single-user applications, 4D Server and client parts under macOS). Signing an application authorizes it to be executed using the Gatekeeper functionality of macOS when the "Mac App Store and identified Developers" option is selected (see "About Gatekeeper" below). +O construtor da aplicação pode assinar aplicações fusionadas 4D em macOS (aplicações monousuário, 4D Server e partes clientes em macOS). A assinatura de uma aplicação a autoriza a ser executada usando uma funcionalidade Gatekeeper de macOS quando a opção "Mac App Store and identified Developers" for selecionada (ver "About Gatekeeper" abaixo). -- Check the **Sign application** option to include certification in the application builder procedure for OS X. 4D will check the availability of elements required for certification when the build occurs: +- Marque a opção **Sign application** para incluir certificação no construtor de aplicação para OSX. 4D vai verificar a disponibilidade dos elementos exigidos para certificação quando a construção ocorrer: ![](assets/en/Project/buildapposxcertProj.png) -This option is displayed under both Windows and macOS, but it is only taken into account for macOS versions. +Esta opção é exibida em Windows e macOS, mas só é considerada em versões macOS. -* **Name of certificate** - Enter the name of your developer certificate validated by Apple in this entry area. The certificate name is usually the name of the certificate in the Keychain Access utility (part in red in the following example): +* **Nome de certificado** - Digite o nome de seu certificado desenvolvedor validado por Apple. O nome do certificado é geralmente o nome do certificado no serviço Keychain Access (parte em vermelho no exemplo abaixo): ![](assets/en/Project/certificate.png) -To obtain a developer certificate from Apple, Inc., you can use the commands of the Keychain Access menu or go here: . +Para obter um certificado de desenvolvedor de Apple, Inc., pode usar os comandos do menu Keychain Access ou ir aqui: [http://developer.apple.com/library/mac/#documentation/Security/Conceptual/CodeSigningGuide/Procedures/Procedures.html](http://developer.apple.com/library/mac/#documentation/Security/Conceptual/CodeSigningGuide/Procedures/Procedures.html). +> Esse certificado exige a presença da serviço Apple codesign, que é fornecido como padrão e geralmente está na pasta “/usr/bin/”. Se um erro acontecer, tenha certeza que o serviço está presente em seu disco. + + +#### Sobre o Gatekeeper + +Gatekeeper é uma funcionalidade de segurança de OS X que controla a execução de aplicações baixadas da Internet. Se uma aplicação baixada não vier da Apple Store ou não for assinada, ela será rejeitada e não poderá ser lançada. -> This certificate requires the presence of the Apple codesign utility, which is provided by default and usually located in the “/usr/bin/” folder. If an error occurs, make sure that this utility is present on your disk. +A opção **Sign application** do construtor de aplicação 4D permite gerar aplicações que são compatíveis com essa opção por padrão. -#### About Gatekeeper -Gatekeeper is a security feature of OS X that controls the execution of applications downloaded from the Internet. If a downloaded application does not come from the Apple Store or is not signed, it is rejected and cannot be launched. +#### Sobre Autenticação -The **Sign application** option of the 4D application builder lets you generate applications that are compatible with this option by default. +Autenticação de Aplicação é altamente recomendado por Apple desde macOS 10.14.5 (Mojave) e 10.15 (Catalina), já que aplicações não autenticadas lançadas via internet são bloqueadas por padrão. -#### About Notarization +Em 4D v18, as funcionalidades [de assinatura integradas](#os-x-signing-certificate) foram atualizadas para atender às exigências de Apple usando o serviço de autenticação de Apple. The notarization itself must be conducted by the developer and is independent from 4D (note also that it requires installing Xcode). Veja [este blog 4D ](https://blog.4d.com/how-to-notarize-your-merged-4d-application/) que oferece uma descrição passo a passo do processo de autenticação. -Application notarization is highly recommended by Apple as of macOS 10.14.5 (Mojave) and 10.15 (Catalina), since non-notarized applications deployed via the internet are blocked by default. +para saber mais sobre o conceito de autenticação, veja [esta página do site desenvolvedor Apple](https://developer.apple.com/documentation/xcode/notarizing_your_app_before_distribution/customizing_the_notarization_workflow). -In 4D v18, the [built-in signing features](#os-x-signing-certificate) have been updated to meet all of Apple's requirements to allow using the Apple notary service. The notarization itself must be conducted by the developer and is independent from 4D (note also that it requires installing Xcode). Please refer to [this 4D blog post](https://blog.4d.com/how-to-notarize-your-merged-4d-application/) that provides a step-by-step description of the notarization process. +## Ícones de personalização de aplicações -For more information on the notarization concept, please refer to [this page on the Apple developer website](https://developer.apple.com/documentation/xcode/notarizing_your_app_before_distribution/customizing_the_notarization_workflow). +4D associa um ícone padrão com aplicações stand-alone, servidor e cliente, entretanto pode personalizar o ícone para cada aplicação. -## Customizing application icons +* **macOs** - Quando construir uma aplicação de duplo clique, 4D maneja a personalização do ícone. Para fazer isso, deve criar um arquivo ícone (tipo icns), antes de construir o arquivo da aplicação, e colocá-lo na pasta projeto. +> Apple, Inc. oferece uma ferramenta especifica para construir *icns* arquivos ícones (para mais informação, veja [documentação Apple](https://developer.apple.com/library/archive/documentation/GraphicsAnimation/Conceptual/HighResolutionOSX/Optimizing/Optimizing.html#//apple_ref/doc/uid/TP40012302-CH7-SW2)). -4D associates a default icon with stand-alone, server, and client applications, however you can customize the icon for each application. + Seu arquivo ícone deve ter o mesmo nome que o arquivo de projeto e incluir a extensão *.icns*. 4D leva esse arquivo em consideração automaticamente quando construir uma aplicação de duplo clique (o arquivo *.icns* é renomeado *ApplicationName.icns* e copiado na pasta Resources; *A entrada CFBundleFileIcon* de *info.plist* arquivo for atualizado). -* **macOs** - When building a double-clickable application, 4D handles the customizing of the icon. In order to do this, you must create an icon file (icns type), prior to building the application file, and place it next to the project folder. - - > Apple, Inc. provides a specific tool for building *icns* icon files (for more information, please refer to [Apple documentation](https://developer.apple.com/library/archive/documentation/GraphicsAnimation/Conceptual/HighResolutionOSX/Optimizing/Optimizing.html#//apple_ref/doc/uid/TP40012302-CH7-SW2)). - - Your icon file must have the same name as the project file and include the *.icns* extension. 4D automatically takes this file into account when building the double-clickable application (the *.icns* file is renamed *ApplicationName.icns* and copied into the Resources folder; the *CFBundleFileIcon* entry of the *info.plist* file is updated). +* **Windows** - Quando construir uma aplicação duplo clique, 4D gerencia a personalização do ícone. Para fazer isso, deve criar um arquivo de ícone (*.ico* extensão), antes de construir o arquivo aplicação, e colocá-lo na pasta projeto. -* **Windows** - When building a double-clickable application, 4D handles the customizing of its icon. In order to do this, you must create an icon file (*.ico* extension), prior to building the application file, and place it next to the project folder. - - Your icon file must have the same name as the project file and include the *.ico* extension. 4D automatically takes this file into account when building the double-clickable application. + Seu arquivo ícone deve ter o mesmo nome que o arquivo de projeto e inclui a extensão *.ico*. 4D automaticamente leva em conta esse arquivo quando construir a aplicação de duplo clique. -You can also set specific [XML keys](https://doc.4d.com/4Dv17R6/4D/17-R6/4D-XML-Keys-BuildApplication.100-4465602.en.html) in the buildApp.4DSettings file to designate each icon to use. The following keys are available: +Pode também estabelecer especificamente [XML keys](https://doc.4d.com/4Dv17R6/4D/17-R6/4D-XML-Keys-BuildApplication.100-4465602.en.html) no arquivo buildApp.4DSettings para determinar cada ícone para usar. As chaves abaixo são disponíveis: - RuntimeVLIconWinPath - RuntimeVLIconMacPath @@ -429,112 +464,122 @@ You can also set specific [XML keys](https://doc.4d.com/4Dv17R6/4D/17-R6/4D-XML- - ClientMacIconForWinPath - ClientWinIconForWinPath -## Management of data file(s) -### Opening the data file -When a user launches a merged application or an update (single-user or client/server applications), 4D tries to select a valid data file. Several locations are examined by the application successively. +## Gerenciamento de arquivos de dados -The opening sequence for launching a merged application is: +### Abrir o arquivo de dados -1. 4D tries to open the last data file opened, [as described below](#last-data-file-opened) (not applicable during initial launch). -2. If not found, 4D tries to open the data file in a default data folder next to the .4DZ file in read-only mode. -3. If not found, 4D tries to open the standard default data file (same name and same location as the .4DZ file). -4. If not found, 4D displays a standard "Open data file" dialog box. +Quando um usuário lança uma aplicação fusionada ou uma atualização (monousuário ou cliente/servidor), 4D tenta selecionar um arquivo de dados válido. Vários locais são examinadas pela aplicação sucessivamente. -### Last data file opened +A sequencia de abertura para lançar uma aplicação fusionada é: -#### Path of last data file +1. 4D tenta abrir o último arquivo de dados aberto, [como descrito abaixo](#last-data-file-opened) (não é aplicável durante o lançamento inicial). +2. Se não for encontrado, 4D tenta abrir o arquivo de dados em uma pasta de dados do lado do arquivo .4DZ em modo apenas leitura. +3. Se não for encontrado, 4D tenta abrir o arquivo de dados padrão (mesmo nome e mesmo local que o arquivo .4DZ). +4. Se não for encontrado, 4D exibe uma caixa de diálogo "Open data file" . -Any standalone or server applications built with 4D stores the path of the last data file opened in the application's user preferences folder. -The location of the application's user preferences folder corresponds to the path returned by the following statement: +### ùltimo arquivo de dados aberto + +#### Rota do último arquivo de dados +Qualquer aplicação standalone ou servidor construida com 4D armazena o último arquivo de dados aberto na pasta preferencia de usuário doa aplicação. + +O local da pasta de preferências de usuário da aplicação corresponde à rota retornada pela declaração abaixo: ```4d userPrefs:=Get 4D folder(Active 4D Folder) ``` -The data file path is stored in a dedicated file, named *lastDataPath.xml*. +A rota de arquivo de dados é armazenado em um arquivod edicado chamado *lastDataPath.xml*. + +Graças a essa arquitetura, quando oferecer uma atualização de sua aplicação, o arquivo de dados de usuário local (último arquivo de dados usado) é aberto automaticamente no primeiro lançamento -Thanks to this architecture, when you provide an update of your application, the local user data file (last data file used) is opened automatically at first launch. +Esse mecanismo geralmente é adeqaudo para lançamentos padrão. Entretanto, por razões específicas, por exemplo se quiser dupliar suas aplicações fusionadas, pode querer mudar a maneira em que os arquivos de dados estão conectados à aplicação (descrito abaixo). -This mechanism is usually suitable for standard deployments. However, for specific needs, for example if you duplicate your merged applications, you might want to change the way that the data file is linked to the application (described below). +#### Configurando o modo de data linking mode -#### Configuring the data linking mode +Com suas aplicações compiladas, 4D automaticamente usa o último arquivo de dados aberto. Como padrão, a rota de cada arquivo de dados é armazenada na pasta de preferências de usuário da aplicação e é conectada ao **nome da aplicação** -With your compiled applications, 4D automatically uses the last data file opened. By default, the path of the data file is stored in the application's user preferences folder and is linked to the **application name**. +Isso pode ser inadequado se quiser duplicar uma aplicação fusionada criada para usar arquivos de dados diferentes. -This may be unsuitable if you want to duplicate a merged application intended to use different data files. Duplicated applications actually share the application's user preferences folder and thus, always use the same data file -- even if the data file is renamed, because the last file used for the application is opened. +Isso pode ser inadequado se quiser duplicar uma aplicação fusionada criada para ser usada com arquivos de dados diferentes. Aplicações duplicadas na verdade partilharm a pasta de preferências de usuário da aplicação e assim, sempre usam o mesmo arquivo de dados - mesmo se o arquivo de dados for renomeado, porque o último arquivo usado para essa aplicação está aberto.. -4D therefore lets you link the data file path to the application path. In this case, the data file will be linked using a specific path and will not just be the last file opened. You therefore link your data **by application path**. +4D assim perlite linkar a rota do arquivo de dados na rota da aplicação. In this case, the data file will be linked using a specific path and will not just be the last file opened. Faz assim um link de seus dados **com a rota da aplicação**. -This mode allows you to duplicate your merged applications without breaking the link to the data file. However, with this option, if the application package is moved on the disk, the user will be prompted for a data file, since the application path will no longer match the "executablePath" attribute (after a user has selected a data file, the *lastDataPath.xml* file is updated accordingly). +Esse modo permite duplicar suas aplicações fusionadas sem quebrar o linke ao arquivo de dados. Entretanto, com essa opção, se o pacote dea aplicação for movido no disco, o usuário será pedido um arquivo de dados, já que a rota da aplicação não corresponde mais com o atributo "executablePath" (depois que o usuário tiver selecionar um arquivo de dados, o arquivo *lastDataPath.xml* é também atualizado). -*Duplication when data linked by application name:* ![](assets/en/Project/datalinking1.png) -*Duplication when data linked by application path:* ![](assets/en/Project/datalinking2.png) +*Duplicação quando dados linkados pelo nome da aplicação:* ![](assets/en/Project/datalinking1.png) -You can select the data linking mode during the build application process. You can either: +*Duplicação quando os dados são linkados pela rota da aplicação:* ![](assets/en/Project/datalinking2.png) -- Use the [Application page](#application) or [Client/Server page](#client-server) of the Build Application dialog box. -- Use the **LastDataPathLookup** XML key (single-user application or server application). +Pode selecionar o modo de linking de dados durante o processo de construção da aplicação. É possível: -### Defining a default data folder +- Usar a [página Application](#application) ou [a página Client/Server](#client-server) do diálogo Build Application. +- Use a chave XML**LastDataPathLookup** (aplicações monousuário ou servidor). -4D allows you to define a default data file at the application building stage. When the application is launched for the first time, if no local data file is found (see [opening sequence described above](#opening-the-data-file)), the default data file is automatically opened silently in read-only mode by 4D. This gives you better control over data file creation and/or opening when launching a merged application for the first time. -More specifically, the following cases are covered: +### Definir uma pasta padrão de dados -- Avoiding the display of the 4D "Open Data File" dialog box when launching a new or updated merged application. You can detect, for example at startup, that the default data file has been opened and thus execute your own code and/or dialogs to create or select a local data file. -- Allowing the distribution of merged applications with read-only data (for demo applications, for instance). +4D permite que defina um arquivo de dados padrão no estágio de construção da aplicação. When the application is launched for the first time, if no local data file is found (see [opening sequence described above](#opening-the-data-file)), the default data file is automatically opened silently in read-only mode by 4D. Isso dá mais controle sobre a criação de arquivos de dados ou sua abertura quando lançar uma aplicação fusionada pela primeira vez. -To define and use a default data file: +Mais especificamente os casos abaixos são cobertos: -- You provide a default data file (named "Default.4DD") and store it in a default folder (named "Default Data") inside the database project folder. This file must be provided along with all other necessary files, depending on the database configuration: index (.4DIndx), external Blobs, journal, etc. It is your responsibility to provide a valid default data file. Note however that since a default data file is opened in read-only mode, it is recommended to uncheck the "Use Log File" option in the original structure file before creating the data file. -- When the application is built, the default data folder is integrated into the merged application. All files within this default data folder are also embedded. +- Evitar a exibição do diálogo 4D "Open Data File" quando lançar uma nova aplicação fusionada atualizada. É possível detectar, por exemplo ao iniciar, que o arquivo de dados padrão foi aberto e assim executar seu próprio código ou diálogos para criar ou selecionar um arquivo de dados local +- Permitir a distribuição de aplicações fusionadas com dados apenas leitura (para aplicações demo por exemplo). -The following graphic illustrates this feature: + +Para definri e usar um arquivo de dados padrão: + +- Deve fornecer um arquivo de dados padrão (chamado de "Default.4DD") e armazena-o em uma pasta padrão (chamado "Default Data") dentro da pasta de projeto de banco de dados. Esse arquivo pode ser fornecido junto com todos os outros necessários arquivos, dependendo da configuração do banco de dados: index (.4DIndx), blobs externos, históricos, etc. It is your responsibility to provide a valid default data file. Note entretanto que como um arquivo de dados padrão é aberto em modo apenas leitura, é recomendado desmarcar a opção "Use Log File" no arquivo de estrutura original antes de criar o arquivo de dados. +- Quando a aplicação for construida, a pasta de dados padrão é integrada na aplicação fusionada. Todos os arquivos dentro dessa pasta de dados padrão também são embebidos. + +O gráfico a seguir ilustra essa propriedade: ![](assets/en/Project/DefaultData.png) -When the default data file is detected at first launch, it is silently opened in read-only mode, thus allowing you to execute any custom operations that do not modify the data file itself. +Quando o arquivo de dados padrão for detectado ao lançamento, é aberto silenciosamente em modo apenas leitura, assim permitindo que execute qualquer operação personalizada que não modifique o arquivo de dados. -## Management of client connection(s) -The management of connections by client applications covers the mechanisms by which a merged client application connects to the target server, once it is in its production environment. +## Gerenciamento de conexões de cliente -### Connection scenario +O gerenciamento de conexões de aplicações de cliente cobre os mecanismos pelos quais uma aplicação de cliente fusionada se conecta ao servidor alvo, quando estiver em seu ambiente de produção. -The connection procedure for merged client applications supports cases where the dedicated server is not available. The startup scenario for a 4D client application is the following: +### Cenário de conexão -- The client application tries to connect to the server using the discovery service (based upon the server name, broadcasted on the same subnet). - OR - If valid connection information is stored in the "EnginedServer.4DLink" file within the client application, the client application tries to connect to the specified server address. -- If this fails, the client application tries to connect to the server using information stored in the application's user preferences folder ("lastServer.xml" file, see last step). -- If this fails, the client application displays a connection error dialog box. - - If the user clicks on the **Select...** button (when allowed by the 4D developer at the build step, see below), the standard "Server connection" dialog box is displayed. - - If the user clicks on the **Quit** button, the client application quits. -- If the connection is successful, the client application saves this connection information in the application's user preferences folder for future use. +O processo de conexão para aplicação de clientes fusionadas é compatível com casos onde o servidor dedicado não estiver disponível O cenário de inicialização para uma aplicação cliente 4D é o abaixo: -### Storing the last server path +- A aplicação cliente tenta conectar ao servidor usando o serviço de descoberta (baseado no nome de servidor, transmitido na mesma subnet). + OR + Se a informação de uma conexão válida for armazenada no arquivo "EnginedServer.4DLink" dentro da aplicação cliente, a aplicação cliente tenta se conectar com o endereço de servidor especificado. +- Se isso falhar, a aplicação cliente tentar se conectar ao servidor usando informação armazenada na pasta de preferência de usuários da aplicação (arquivo "lastServer.xml" ver o último passo). +- Se isso falhar, a aplicação cliente exibe uma caixa de diálogo de erro de conexão. + - Se o usuário clicar no botão **Selecione...** (quando permitido pelo desenvolvedor 4D no passo de construção, ver abaixo), a caixa de diálogo padrão "Server connection" é exibida. + - Se o usuário clicar no botão **Quit** a aplicaão do cliente termina. +- Se a conexão tiver sucesso, a aplicação cliente guarda a informação de conexão na pasta de preferências de usuário da aplicação para uso futuro. -The last used and validated server path is automatically saved in a file named "lastServer.xml" in the application's user preferences folder. This folder is stored at the following location: +### Armazenar a última rota de servidor + +A última rota de servidor usada e validade é uatomaticamente salva no arquivo chamado "lastServer.xml" na pasta de preferência de usuário da aplicação. Essa pasta é armazenada no local abaixo: ```4d userPrefs:=Get 4D folder(Active 4D Folder) ``` -This mechanism addresses the case where the primary targeted server is temporary unavailable for some reason (maintenance mode for example). When this case occurs for the first time, the server selection dialog box is displayed (if allowed, see below) and the user can manually select an alternate server, whose path is then saved if the connection is successful. Any subsequent unavailability would be handled automatically through the "lastServer.xml" path information. +Esse mecanismo afeta o caso onde o servidor alvo primário está temporariamente indisponível por algum motivo (modo manutenção por exemplo). When this case occurs for the first time, the server selection dialog box is displayed (if allowed, see below) and the user can manually select an alternate server, whose path is then saved if the connection is successful. Qualquer indisponibilidade subsequente seria tratada automaticamente através da informação de rota "lastServer.xml". + +> - Quando aplicações cliente não possam se beneficiar do serviço de descoberta, por exemplo por causa da configuração de rede, é recomendado que o desenvolvedor forneça um nome de host no momento de construção usando a chave [IPAddress](https://doc.4d.com/4Dv17R6/4D/17-R6/IPAddress.300-4465710.en.html) no arquivo "BuildApp.4DSettings". The mechanism addresses cases of temporary unavailability. +> - Apertar a tecla **Alt/Option** ao iniciar vai exibir a caixa de diálogo de seleção de servidor ainda é compatível em todos os casos. + -> - When client applications cannot permanently benefit from the discovery service, for example because of the network configuration, it is recommended that the developer provide a host name at build time using the [IPAddress](https://doc.4d.com/4Dv17R6/4D/17-R6/IPAddress.300-4465710.en.html) key in the "BuildApp.4DSettings" file. The mechanism addresses cases of temporary unavailability. -> - Pressing the **Alt/Option** key at startup to display the server selection dialog box is still supported in all cases. -### Availability of the server selection dialog box in case of error +### Disponibilidade da caixa de diálogo de seleção de servidor no caso de erro -You can choose whether or not to display the standard server selection dialog box on merged client applications when the server cannot be reached. The configuration depends on the value of the [ServerSelectionAllowed](https://doc.4d.com/4Dv17R6/4D/17-R6/ServerSelectionAllowed.300-4465714.en.html) XML key on the machine where the application was built: +Pode escolher se quer ou não exibir a caixa de diálogo de seleção de servidor padrão na aplicação de cliente fusionada quando o servidor não puder ser alcançado. A configuração depende do valor da chave [ServerSelectionAllowed](https://doc.4d.com/4Dv17R6/4D/17-R6/ServerSelectionAllowed.300-4465714.en.html) XML na máquina onde a aplicação foi construida: -- **Display of an error message with no access possible to the server selection dialog box**. Default operation. The application can only quit. - `ServerSelectionAllowed`: **False** or key omitted ![](assets/en/Project/connect1.png) +- **Exibe uma mensagem de erro sem acesso possível à caixa de diálogo de seleção de servidor**. Default operation. A aplicação só pode terminar. + `ServerSelectionAllowed`: **False** ou chave omitida ![](assets/en/Project/connect1.png) -- **Display of an error message with access to the server selection dialog box possible**. The user can access the server selection window by clicking on the **Select...** button. - `ServerSelectionAllowed`: **True** ![](assets/en/Project/connect2.png) ![](assets/en/Project/connect3.png) \ No newline at end of file +- **É possível exibir uma mensagem de erro com acesso a caixa de dialogo de seleção de servidor**. O usuário pode acessar a janela de seleção de servidor clicando no botão **Select...**. + `ServerSelectionAllowed`: **True** ![](assets/en/Project/connect2.png) ![](assets/en/Project/connect3.png) diff --git a/website/translated_docs/pt/Project/creating.md b/website/translated_docs/pt/Project/creating.md index 950ab3572a10cb..3582c1f344cf71 100644 --- a/website/translated_docs/pt/Project/creating.md +++ b/website/translated_docs/pt/Project/creating.md @@ -1,27 +1,27 @@ --- id: creating -title: Creating a 4D project +title: Criar um projeto 4D --- -## Requirements +## Requisitos -New 4D projects can only be created from **4D Developer** (see [Developing a project](developing.md)). +Os novos projetos 4D só podem ser criados desde **4D Developer** (ver [Desenvolver um projeto](developing.md)). -**Note:** 4D Server can open .4DProject files in read-only mode, for testing purposes only. For deployment, 4D projects are provided as .4dz files (zipped files). For more information, please refer to [Building a project package](building.md). -> You can create project databases by exporting existing binary databases. See "Export from a 4D database" on [doc.4d.com](https://doc.4d.com). +**Nota:** Servidor 4D pode abrir arquivos .4DProject em modo apenas leitura, mas apenas para propósitos de teste. Para lançamento, projetos 4D são oferecidos como arquivos .4dz (arquivos compactados zipados). Para saber mais, consulte [Construir um pacote de projetos](building.md). -## Creating the project files +> Pode criar bancos de dados projeto exportando os bancos binários existentes. Ver "Exportar desde um banco de dados 4D" em [doc.4d.com](https://doc.4d.com). -To create a new database project: +## Criar arquivos de projeto -1. Launch a 4D Developer application. -2. Select **New > Database Project...** from the **File** menu: ![](assets/en/Project/project-create1.png) OR Select **Database Project...** from the **New** toolbar button: ![](assets/en/Project/projectCreate2.png) - A standard **Save** dialog box appears so that you can choose the name and location of the 4D database project main folder. -3. Enter the name of your project folder and click **Save**. This name will be used: - - as the name of the main project folder (named "MyFirstProject" in the [Architecture of a 4D Project](Project/architecture.md) section example), - - as the name of the .4DProject file at the first level of the "Project" folder. You can choose any name allowed by your operating system. *Warning:* if your database project is intended to work on other systems or to be saved via a source control tool, you must take their specific naming recommendations into account. +Para criar um novo projeto de banco de dados: -When you validate the dialog box, 4D closes the current database (if any), creates a project folder at the indicated location, and puts all the files needed for proper operation of the database project into it. For more information, refer to [Architecture of a 4D Project](Project/architecture.md). +1. Lance uma aplicação 4D Developer. +2. Selecione **Novo > Banco de dados projeto...** no menu **Arquivo**: ![](assets/en/Project/project-create1.png) O Selecione **Banco de dados projeto...** desde o botão **Novo** da barra de ferramentas: ![](assets/en/Project/projectCreate2.png) Aparecerá uma caixa de diálogo padrão **Guardar** para que possa escolher o nome e o local da pasta principal do banco projeto 4D. +1. Enter the name of your project folder and click **Save**. This name will be used: + - como o nome da pasta principal de projeto (chamada "MyFirstProject" no exemplo da seção [Arquitetura de um Projeto 4D](Project/architecture.md)), + - as the name of the .4DProject file at the first level of the "Project" folder. You can choose any name allowed by your operating system. *Atenção:* se seu banco projeto estiver destinado a funcionar em outros sistemas ou a ser guardada através de uma ferramenta de controle de código fonte, deve levar em consideração suas recomendações específicas de denominação. -Next, the 4D application window is displayed with the Explorer in the foreground. You can then, for example, create project forms or display the Structure editor and add tables, fields, etc. \ No newline at end of file +Quando validar a caixa de diálogo, 4D fecha o banco de dados atual (se houver) e cria uma pasta "Project" no local indicado e coloca nela todos os arquivos necessários para o funcioanamento correto do banco de dados projeto. Para saber mais, consulte [Arquitetura de um projeto 4D](Project/architecture.md). + +A seguir se mostra a janela da aplicação 4D com o Explorador em primeiro plano. A seguir, pode, por exemplo, criar formulários de projeto ou mostrar o editor de estruturas e adicionar tabelas, campos, etc diff --git a/website/translated_docs/pt/Project/developing.md b/website/translated_docs/pt/Project/developing.md index 062c69a0b39e46..ec4bc9ddcb9cd3 100644 --- a/website/translated_docs/pt/Project/developing.md +++ b/website/translated_docs/pt/Project/developing.md @@ -3,31 +3,34 @@ id: developing title: Developing a project --- -## Development tools +## Ferramentas de desenvolvimento -4D database projects are created locally, using the **4D Developer** application. To open a project from 4D Developer, select the project's main file, named *databaseName.4DProject* (see [Architecture of a 4D project](architecture.md)). Note that you can also work with any text editor since most of the 4D project files are text files. Concurrent file access is handled via a file access manager (see below). -4D Server can open *databaseName.4DProject* files for testing purposes: remote 4D machines can connect and use the database, but all database structure files are read-only. +Os projetos bancos de dados 4D são criados localmente, utilizando a aplicação **4D Developer**. Para abrir um projeto desde 4D Developer, selecione o arquivo principal do projeto, chamado *databaseName.4DProject* (ver [Arquitetura de um projeto 4D](architecture.md)). Lembre que também pode trabalhar com qualquer editor de texto, já que a maioria dos arquivos de projeto 4D são arquivos texto. Concurrent file access is handled via a file access manager (see below). -Multi-user development is managed through standard source control tools, which allow developers to work on different branches, and compare, merge, or revert modifications. +4D Server pode abrir os arquivos *nome do banco de dados.4DProject* para realizar provas: as máquinas 4D remotas podem conectar-se e utilizar o banco de dados, mas todos os arquivos da estrutura do banco de dados são de apenas leitura. -## Project file access +O desenvolvimento multiusuário é gerenciado através de ferramentas padrão de controle de versão padrão, quer permitem aos desenvolvedores trabalhar em diferentes ramos e comparar, fusionar ou reverter as modificações. -When working on a project in 4D Developer, you can use built-in 4D editors to create, modify, or save structure items, methods, forms, etc. Since the editors use files on the disk, potential conflicts could happen if the same file is modified or even deleted from different locations. For example, if the same method is edited in a method editor window *and* in a text editor, saving both modifications will result in a conflict. -The 4D Developer framework includes a file access manager to control concurrent access: -- if an open file which is read-only at the OS level, a locked icon is displayed in the editor: - ![](assets/en/Project/lockicon.png) -- if an open file is edited concurrently from different locations, 4D displays an alert dialog box when trying to save the changes: ![](assets/en/Project/projectReload.png) - - **Yes**: discard editor changes and reload +## Acesso ao arquivo de projeto + +Quando trabalhar em um projeto em 4D Developer, pode usar os editores integrados de 4D para criar, modificar ou salvar elementos da estrutura, os métodos, os formulários, etc. Quando trabalhar em um projeto em 4D Developer, pode usar os editores integrados de 4D para criar, modificar ou salvar elementos da estrutura, os métodos, os formulários, etc. Since the editors use files on the disk, potential conflicts could happen if the same file is modified or even deleted from different locations. Quando trabalhar em um projeto em 4D Developer, pode usar os editores integrados de 4D para criar, modificar ou salvar elementos da estrutura, os métodos, os formulários, etc. Since the editors use files on the disk, potential conflicts could happen if the same file is modified or even deleted from different locations. For example, if the same method is edited in a method editor window *and* in a text editor, saving both modifications will result in a conflict. + +4D Developer incluem um gestor de acesso aos arquivos para controlar os acessos simultâneos: + +- se um arquivo aberto que for de apenas leitura a nível de sistema operativo, se mostra um ícone de bloqueio no editor: + ![](assets/en/Project/lockicon.png) +- se um arquivo aberto for editado simultaneamente desde diferentes locais, 4D mostra uma caixa de diálogo de alerta ao tentar salvar as mudanças: ![](assets/en/Project/projectReload.png) + - **Sim**: ignorar as mudanças do editor e voltar a carregar - **No**: save changes and overwrite the other version - **Cancel**: do not save -This feature is enabled for all built-in editors: +Esta funcionalidade está habilitada para todos os editores integrados: -- Structure editor -- Form editor -- Method editor -- Settings editor -- Toolbox editor \ No newline at end of file +- Editor de estrutura +- Editor de formulários +- Editor de método +- Editor de parâmetros +- Toolbox editor diff --git a/website/translated_docs/pt/Project/overview.md b/website/translated_docs/pt/Project/overview.md index fdc8d1fc60b3f0..4d62af462ff051 100644 --- a/website/translated_docs/pt/Project/overview.md +++ b/website/translated_docs/pt/Project/overview.md @@ -1,35 +1,38 @@ --- -id: overview -title: Overview +id: visão Geral +title: Visão Geral --- -A 4D project contains all of the source code of a 4D database application, from the database structure to the user interface, including forms, menus, user settings, or any required resources. A 4D project is primarily made of text-based files. +Um projeto 4D contém todo o código fonte de uma aplicação de banco de dados 4D, desde a estrutura do banco de dados até a interface de usuário, passando pelos formulários, os menus, a configuração de usuário ou qualquer recurso necessário. A 4D project is primarily made of text-based files. + +Os projetos 4D são criados e gerenciados usando a aplicação 4D Developer. Os arquivos de projeto se utilizam para criar arquivos de lançamento da aplicação final, que podem ser abertos com 4D Server ou com uma licencia 4D Volume (aplicações fusionadas). -4D projects are created and handled using the 4D Developer application. Project files are then used to build final application deployment files, that can be opened by 4D Server or 4D Volume license (merged applications). ## Project files -4D project files are open and edited using regular 4D platform applications. Full-featured editors are available to manage files, including a structure editor, a method editor, a form editor, a menu editor... +Os arquivos de projeto 4D se abrem e editam com as aplicações padrão da plataforma 4D. Editores completos para gerenciar os arquivos, como um editor de estruturas, um editor de métodos, um editor de formulários, um editor de menu... + +Além disso, dado que os projetos são encontrados em arquivos legíveis, em texto plano (JSON, XML, etc.), podem ser lidos ou editados manualmente pelos desenvolvedores, utilizando qualquer editor de código. -Moreover, since projects are in human-readable, plain text files (JSON, XML, etc.), they can be read or edited manually by developers, using any code editor. -## Source control +## Controle da fonte -4D project files make it easier to program generically, create application templates, and share code. +Os arquivos de projeto 4D facilitam a programação genérica, a criação de modelos de aplicações e o compartir código. -The flexibility of developing a 4D project is especially demonstrated when multiple developers need to work on the same part of an application, at the same time. 4D project files are particularly well suited to be managed by a **source control** repository (Perforce, Git, SVN, etc.), allowing development teams to take advantage of features such as: +A flexibilidade de desenvolvimento de um projeto 4D são demostradas especialmente quando vários desenvolvedores precisam trabalhar na mesma parte de uma aplicação ao mesmo tempo. Os arquivos de projeto 4D são particularmente adequados para ser gerenciados por um sistema de **controle de versão** (Perforce, Git, SVN, etc.), permitindo às equipes de desenvolvimento aproveitar funcionalidades como: - Versioning -- Revision comparisons +- Comparações de revisão - Rollbacks -## Working with projects -You create a 4D database project by: +## Trabalhar com projetos + +Pode criar um projeto de banco de dados 4D: -- creating a new, blank project -- see [Creating a 4D project](creating.md). -- exporting an existing 4D "binary" development to a project -- see "Export from a 4D database" on [doc.4d.com](https://doc.4d.com). +- criar um novo projeto em branco -- ver [Criar um projeto 4D](creating.md). +- exportar um desenvolvimento "binário" 4D existente a um projeto -- ver "Exportar desde um banco de dados 4D" em [doc.4d.com](https://doc.4d.com). -Project development is done locally, using the 4D Developer application -- see [Developing a project](developing.md). Team development interactions are handled by the source control tool +O desenvolvimento de projeto é realizado localmente usando a aplicação 4D Developer -- consulte [Desenvolver um projeto](developing.md). As interações de desenvolvimento em equipe são manejadas pela ferramenta de controle de fontes. -4D projects can be compiled and easily deployed as single-user or client-server applications containing compacted versions of your project -- see [Building a project package](building.md). \ No newline at end of file +Projetos 4D podem ser compilados e lançados facilmente como aplicações monousuário ou cliente servidor que contém versões compactadas de seu projeto -- ver [Construir um pacote de projeto](building.md). diff --git a/website/translated_docs/pt/REST/$asArray.md b/website/translated_docs/pt/REST/$asArray.md index 1ac99ac95615a5..ad5c8b2dd335f2 100644 --- a/website/translated_docs/pt/REST/$asArray.md +++ b/website/translated_docs/pt/REST/$asArray.md @@ -6,114 +6,119 @@ title: '$asArray' Returns the result of a query in an array (i.e. a collection) instead of a JSON object. -## Description -If you want to receive the response in an array, you just have to add `$asArray` to your REST request (*e.g.*, `$asArray=true`). +## Descrição -## Example +If you want to receive the response in an array, you just have to add `$asArray` to your REST request (*e.g.*, `$asArray=true`). +## Exemplo Here is an example or how to receive the response in an array. -`GET /rest/Company/?$filter="name begin a"&$top=3&$asArray=true` + `GET /rest/Company/?$filter="name begin a"&$top=3&$asArray=true` **Response**: - [ +```` +[ + { + "__KEY": 15, + "__STAMP": 0, + "ID": 15, + "name": "Alpha North Yellow", + "creationDate": "!!0000-00-00!!", + "revenues": 82000000, + "extra": null, + "comments": "", + "__GlobalStamp": 0 + }, + { + "__KEY": 34, + "__STAMP": 0, + "ID": 34, + "name": "Astral Partner November", + "creationDate": "!!0000-00-00!!", + "revenues": 90000000, + "extra": null, + "comments": "", + "__GlobalStamp": 0 + }, + { + "__KEY": 47, + "__STAMP": 0, + "ID": 47, + "name": "Audio Production Uniform", + "creationDate": "!!0000-00-00!!", + "revenues": 28000000, + "extra": null, + "comments": "", + "__GlobalStamp": 0 + } +] +```` + +The same data in its default JSON format: + +```` +{ + "__entityModel": "Company", + "__GlobalStamp": 50, + "__COUNT": 52, + "__FIRST": 0, + "__ENTITIES": [ { - "__KEY": 15, + "__KEY": "15", + "__TIMESTAMP": "2018-03-28T14:38:07.434Z", "__STAMP": 0, "ID": 15, "name": "Alpha North Yellow", - "creationDate": "!!0000-00-00!!", + "creationDate": "0!0!0", "revenues": 82000000, "extra": null, "comments": "", - "__GlobalStamp": 0 + "__GlobalStamp": 0, + "employees": { + "__deferred": { + "uri": "/rest/Company(15)/employees?$expand=employees" + } + } }, { - "__KEY": 34, + "__KEY": "34", + "__TIMESTAMP": "2018-03-28T14:38:07.439Z", "__STAMP": 0, "ID": 34, "name": "Astral Partner November", - "creationDate": "!!0000-00-00!!", + "creationDate": "0!0!0", "revenues": 90000000, "extra": null, "comments": "", - "__GlobalStamp": 0 + "__GlobalStamp": 0, + "employees": { + "__deferred": { + "uri": "/rest/Company(34)/employees?$expand=employees" + } + } }, { - "__KEY": 47, + "__KEY": "47", + "__TIMESTAMP": "2018-03-28T14:38:07.443Z", "__STAMP": 0, "ID": 47, "name": "Audio Production Uniform", - "creationDate": "!!0000-00-00!!", + "creationDate": "0!0!0", "revenues": 28000000, "extra": null, "comments": "", - "__GlobalStamp": 0 + "__GlobalStamp": 0, + "employees": { + "__deferred": { + "uri": "/rest/Company(47)/employees?$expand=employees" + } + } } - ] - + ], +"__SENT": 3 +} +```` -The same data in its default JSON format: - { - "__entityModel": "Company", - "__GlobalStamp": 50, - "__COUNT": 52, - "__FIRST": 0, - "__ENTITIES": [ - { - "__KEY": "15", - "__TIMESTAMP": "2018-03-28T14:38:07.434Z", - "__STAMP": 0, - "ID": 15, - "name": "Alpha North Yellow", - "creationDate": "0!0!0", - "revenues": 82000000, - "extra": null, - "comments": "", - "__GlobalStamp": 0, - "employees": { - "__deferred": { - "uri": "/rest/Company(15)/employees?$expand=employees" - } - } - }, - { - "__KEY": "34", - "__TIMESTAMP": "2018-03-28T14:38:07.439Z", - "__STAMP": 0, - "ID": 34, - "name": "Astral Partner November", - "creationDate": "0!0!0", - "revenues": 90000000, - "extra": null, - "comments": "", - "__GlobalStamp": 0, - "employees": { - "__deferred": { - "uri": "/rest/Company(34)/employees?$expand=employees" - } - } - }, - { - "__KEY": "47", - "__TIMESTAMP": "2018-03-28T14:38:07.443Z", - "__STAMP": 0, - "ID": 47, - "name": "Audio Production Uniform", - "creationDate": "0!0!0", - "revenues": 28000000, - "extra": null, - "comments": "", - "__GlobalStamp": 0, - "employees": { - "__deferred": { - "uri": "/rest/Company(47)/employees?$expand=employees" - } - } - } - ], - "__SENT": 3 - } \ No newline at end of file diff --git a/website/translated_docs/pt/REST/$atomic_$atonce.md b/website/translated_docs/pt/REST/$atomic_$atonce.md index 24b14c9f285b13..9377ac1ca99266 100644 --- a/website/translated_docs/pt/REST/$atomic_$atonce.md +++ b/website/translated_docs/pt/REST/$atomic_$atonce.md @@ -6,61 +6,62 @@ title: '$atomic/$atonce' Allows the actions in the REST request to be in a transaction. If there are no errors, the transaction is validated. Otherwise, the transaction is cancelled. -## Description +## Descrição When you have multiple actions together, you can use `$atomic/$atonce` to make sure that none of the actions are completed if one of them fails. You can use either `$atomic` or `$atonce`. -## Example +## Exemplo We call the following REST request in a transaction. -`POST /rest/Employee?$method=update&$atomic=true` + `POST /rest/Employee?$method=update&$atomic=true` **POST data**: - [ - { - "__KEY": "200", - "firstname": "John" - }, - { - "__KEY": "201", - "firstname": "Harry" - } - ] - +```` +[ +{ + "__KEY": "200", + "firstname": "John" +}, +{ + "__KEY": "201", + "firstname": "Harry" +} +] +```` We get the following error in the second entity and therefore the first entity is not saved either: - { - "__STATUS": { - "success": true - }, - "__KEY": "200", - "__STAMP": 1, - "uri": "/rest/Employee(200)", - "__TIMESTAMP": "!!2020-04-03!!", - "ID": 200, - "firstname": "John", - "lastname": "Keeling", - "isWoman": false, - "numberOfKids": 2, - "addressID": 200, - "gender": false, - "address": { - "__deferred": { - "uri": "/rest/Address(200)", - "__KEY": "200" - } - }, - "__ERROR": [ - { - "message": "Cannot find entity with \"201\" key in the \"Employee\" datastore class", - "componentSignature": "dbmg", - "errCode": 1542 - } - ] - } - - -> Even though the salary for the first entity has a value of 45000, this value was not saved to the server and the *timestamp (__STAMP)* was not modified either. If we reload the entity, we will see the previous value. \ No newline at end of file +```` +{ + "__STATUS": { + "success": true + }, + "__KEY": "200", + "__STAMP": 1, + "uri": "/rest/Employee(200)", + "__TIMESTAMP": "!!2020-04-03!!", + "ID": 200, + "firstname": "John", + "lastname": "Keeling", + "isWoman": false, + "numberOfKids": 2, + "addressID": 200, + "gender": false, + "address": { + "__deferred": { + "uri": "/rest/Address(200)", + "__KEY": "200" + } + }, + "__ERROR": [ + { + "message": "Cannot find entity with \"201\" key in the \"Employee\" dataclass", + "componentSignature": "dbmg", + "errCode": 1542 + } + ] +} +```` +> Even though the salary for the first entity has a value of 45000, this value was not saved to the server and the *timestamp (__STAMP)* was not modified either. If we reload the entity, we will see the previous value. diff --git a/website/translated_docs/pt/REST/$attributes.md b/website/translated_docs/pt/REST/$attributes.md index de4bc3ca52ea4d..968bdd66bca24d 100644 --- a/website/translated_docs/pt/REST/$attributes.md +++ b/website/translated_docs/pt/REST/$attributes.md @@ -5,94 +5,102 @@ title: '$attributes' Allows selecting the related attribute(s) to get from the dataclass (*e.g.*, `Company(1)?$attributes=employees.lastname` or `Employee?$attributes=employer.name`). -## Description + +## Descrição When you have relation attributes in a dataclass, use `$attributes` to define the path of attributes whose values you want to get for the related entity or entities. You can apply `$attributes` to an entity (*e.g.*, People(1)) or an entity selection (*e.g.*, People/$entityset/0AF4679A5C394746BFEB68D2162A19FF) . + - If `$attributes` is not specified in a query, or if the "*" value is passed, all available attributes are extracted. **Related entity** attributes are extracted with the simple form: an object with property `__KEY` (primary key) and `URI`. **Related entities** attributes are not extracted. - If `$attributes` is specified for **related entity** attributes: - - `$attributes=relatedEntity`: the related entity is returned with simple form (deferred __KEY property (primary key)) and `URI`. - `$attributes=relatedEntity.*`: all the attributes of the related entity are returned - `$attributes=relatedEntity.attributePath1, relatedEntity.attributePath2, ...`: only those attributes of the related entity are returned. + + - If `$attributes` is specified for **related entities** attributes: - - `$attributes=relatedEntities.*`: all the properties of all the related entities are returned - `$attributes=relatedEntities.attributePath1, relatedEntities.attributePath2, ...`: only those attributes of the related entities are returned. + + ## Example with related entities -If we pass the following REST request for our Company datastore class (which has a relation attribute "employees"): +Se passarmos a petição REST seguinte para nossa classe de dados Company (que tem um atributo de relação "empregados"): -`GET /rest/Company(1)/?$attributes=employees.lastname` + `GET /rest/Company(1)/?$attributes=employees.lastname` **Response**: - { - "__entityModel": "Company", - "__KEY": "1", - "__TIMESTAMP": "2018-04-25T14:41:16.237Z", - "__STAMP": 2, - "employees": { - "__ENTITYSET": "/rest/Company(1)/employees?$expand=employees", - "__GlobalStamp": 50, - "__COUNT": 135, - "__FIRST": 0, - "__ENTITIES": [ - { - "__KEY": "1", - "__TIMESTAMP": "2019-12-01T20:18:26.046Z", - "__STAMP": 5, - "lastname": "ESSEAL" - }, - { - "__KEY": "2", - "__TIMESTAMP": "2019-12-04T10:58:42.542Z", - "__STAMP": 6, - "lastname": "JONES" - }, - ... - } +``` +{ + "__entityModel": "Company", + "__KEY": "1", + "__TIMESTAMP": "2018-04-25T14:41:16.237Z", + "__STAMP": 2, + "employees": { + "__ENTITYSET": "/rest/Company(1)/employees?$expand=employees", + "__GlobalStamp": 50, + "__COUNT": 135, + "__FIRST": 0, + "__ENTITIES": [ + { + "__KEY": "1", + "__TIMESTAMP": "2019-12-01T20:18:26.046Z", + "__STAMP": 5, + "lastname": "ESSEAL" + }, + { + "__KEY": "2", + "__TIMESTAMP": "2019-12-04T10:58:42.542Z", + "__STAMP": 6, + "lastname": "JONES" + }, + ... } - +} +``` If you want to get all attributes from employees: -`GET /rest/Company(1)/?$attributes=employees.*` + `GET /rest/Company(1)/?$attributes=employees.*` If you want to get last name and job name attributes from employees: -`GET /rest/Company(1)/?$attributes=employees.lastname,employees.jobname` + `GET /rest/Company(1)/?$attributes=employees.lastname,employees.jobname` + ## Example with related entity -If we pass the following REST request for our Employee datastore class (which has several relation attributes, including "employer"): +Se passarmos a petição REST seguinte para nossa classe de dados Employee (que tem vários atributos relacionais, incluindo "employer"): -`GET /rest/Employee(1)?$attributes=employer.name` + + `GET /rest/Employee(1)?$attributes=employer.name` **Response**: - { - "__entityModel": "Employee", +``` +{ + "__entityModel": "Employee", + "__KEY": "1", + "__TIMESTAMP": "2019-12-01T20:18:26.046Z", + "__STAMP": 5, + "employer": { "__KEY": "1", - "__TIMESTAMP": "2019-12-01T20:18:26.046Z", - "__STAMP": 5, - "employer": { - "__KEY": "1", - "__TIMESTAMP": "2018-04-25T14:41:16.237Z", - "__STAMP": 0, - "name": "Adobe" - } + "__TIMESTAMP": "2018-04-25T14:41:16.237Z", + "__STAMP": 0, + "name": "Adobe" } - +} +``` If you want to get all attributes of the employer: -`GET /rest/Employee(1)?$attributes=employer.*` + `GET /rest/Employee(1)?$attributes=employer.*` If you want to get the last names of all employees of the employer: -`GET /rest/Employee(1)?$attributes=employer.employees.lastname` \ No newline at end of file + `GET /rest/Employee(1)?$attributes=employer.employees.lastname` \ No newline at end of file diff --git a/website/translated_docs/pt/REST/$binary.md b/website/translated_docs/pt/REST/$binary.md index 05b167f9016774..385576470aa021 100644 --- a/website/translated_docs/pt/REST/$binary.md +++ b/website/translated_docs/pt/REST/$binary.md @@ -1,19 +1,21 @@ --- -id: binary +id: binário title: '$binary' --- Pass "true" to save the BLOB as a document (must also pass `$expand={blobAttributeName}`) -## Description +## Descrição -`$binary` allows you to save the BLOB as a document. You must also use the [`$expand`]($expand.md) command in conjunction with it. +`$binary` allows you to save the BLOB as a document. You must also use the [`$expand`]($expand.md) command in conjunction with it. When you make the following request: - GET /rest/Company(11)/blobAtt?$binary=true&$expand=blobAtt - +``` +GET /rest/Company(11)/blobAtt?$binary=true&$expand=blobAtt +``` You will be asked where to save the BLOB to disk: -![](assets/en/REST/binary.png) \ No newline at end of file +![](assets/en/REST/binary.png) + diff --git a/website/translated_docs/pt/REST/$catalog.md b/website/translated_docs/pt/REST/$catalog.md index 1de8e388bc4789..bb4f2e729daccc 100644 --- a/website/translated_docs/pt/REST/$catalog.md +++ b/website/translated_docs/pt/REST/$catalog.md @@ -6,9 +6,10 @@ title: '$catalog' The catalog describes all the dataclasses and attributes available in the datastore. + ## Available syntaxes -| Syntax | Example | Description | +| Sintaxe | Exemplo | Descrição | | --------------------------------------------- | -------------------- | -------------------------------------------------------------------------------- | | [**$catalog**](#catalog) | `/$catalog` | Returns a list of the dataclasses in your project along with two URIs | | [**$catalog/$all**](#catalogall) | `/$catalog/$all` | Returns information about all of your project's dataclasses and their attributes | @@ -16,10 +17,10 @@ The catalog describes all the dataclasses and attributes available in the datast ## $catalog - Returns a list of the dataclasses in your project along with two URIs: one to access the information about its structure and one to retrieve the data in the dataclass -### Description + +### Descrição When you call `$catalog`, a list of the dataclasses is returned along with two URIs for each dataclass in your project's datastore. @@ -27,303 +28,313 @@ Only the exposed dataclasses are shown in this list for your project's datastore Here is a description of the properties returned for each dataclass in your project's datastore: -| Property | Type | Description | -| -------- | ------ | --------------------------------------------------------------------------------- | -| name | String | Name of the dataclass. | -| uri | String | A URI allowing you to obtain information about the |dataclass and its attributes. | -| dataURI | String | A URI that allows you to view the data in the dataclass. | + +| Propriedade | Type | Descrição | +| ----------- | ------ | --------------------------------------------------------------------------------- | +| name | String | Name of the dataclass. | +| uri | String | A URI allowing you to obtain information about the |dataclass and its attributes. | +| dataURI | String | A URI that allows you to view the data in the dataclass. | -### Example +### Exemplo `GET /rest/$catalog` **Result**: - { - dataClasses: [ - { - name: "Company", - uri: "http://127.0.0.1:8081/rest/$catalog/Company", - dataURI: "http://127.0.0.1:8081/rest/Company" - }, - { - name: "Employee", - uri: "http://127.0.0.1:8081/rest/$catalog/Employee", - dataURI: "http://127.0.0.1:8081/rest/Employee" - } - ] - } - +```` +{ + dataClasses: [ + { + name: "Company", + uri: "http://127.0.0.1:8081/rest/$catalog/Company", + dataURI: "http://127.0.0.1:8081/rest/Company" + }, + { + name: "Employee", + uri: "http://127.0.0.1:8081/rest/$catalog/Employee", + dataURI: "http://127.0.0.1:8081/rest/Employee" + } + ] +} +```` + ## $catalog/$all Returns information about all of your project's dataclasses and their attributes -### Description +### Descrição -Calling `$catalog/$all` allows you to receive detailed information about the attributes in each of the datastore classes in your project's active model. +Chamando `$catalog/$all` pode reciber informação detalhada sobre os atributos de cada uma das classes de dados do modelo ativo de projeto. -For more information about what is returned for each datastore class and its attributes, use [`$catalog/{dataClass}`](#catalogdataClass). +Para saber mais sobre o que se devolve para cada classe de dados e seus atributos, utilize [`$catalog/{dataClass}`](#catalogdataClass). -### Example + +### Exemplo `GET /rest/$catalog/$all` **Result**: - { - - "dataClasses": [ - { - "name": "Company", - "className": "Company", - "collectionName": "CompanySelection", - "tableNumber": 2, - "scope": "public", - "dataURI": "/rest/Company", - "attributes": [ - { - "name": "ID", - "kind": "storage", - "fieldPos": 1, - "scope": "public", - "indexed": true, - "type": "long", - "identifying": true - }, - { - "name": "name", - "kind": "storage", - "fieldPos": 2, - "scope": "public", - "type": "string" - }, - { - "name": "revenues", - "kind": "storage", - "fieldPos": 3, - "scope": "public", - "type": "number" - }, - { - "name": "staff", - "kind": "relatedEntities", - "fieldPos": 4, - "scope": "public", - "type": "EmployeeSelection", - "reversePath": true, - "path": "employer" - }, - { - "name": "url", - "kind": "storage", - "scope": "public", - "type": "string" - } - ], - "key": [ - { - "name": "ID" - } - ] - }, - { - "name": "Employee", - "className": "Employee", - "collectionName": "EmployeeSelection", - "tableNumber": 1, - "scope": "public", - "dataURI": "/rest/Employee", - "attributes": [ - { - "name": "ID", - "kind": "storage", - "scope": "public", - "indexed": true, - "type": "long", - "identifying": true - }, - { - "name": "firstname", - "kind": "storage", - "scope": "public", - "type": "string" - }, - { - "name": "lastname", - "kind": "storage", - "scope": "public", - "type": "string" - }, - { - "name": "employer", - "kind": "relatedEntity", - "scope": "public", - "type": "Company", - "path": "Company" - } - ], - "key": [ - { - "name": "ID" - } - ] - } - ] - } - +```` +{ + + "dataClasses": [ + { + "name": "Company", + "className": "Company", + "collectionName": "CompanySelection", + "tableNumber": 2, + "scope": "public", + "dataURI": "/rest/Company", + "attributes": [ + { + "name": "ID", + "kind": "storage", + "fieldPos": 1, + "scope": "public", + "indexed": true, + "type": "long", + "identifying": true + }, + { + "name": "name", + "kind": "storage", + "fieldPos": 2, + "scope": "public", + "type": "string" + }, + { + "name": "revenues", + "kind": "storage", + "fieldPos": 3, + "scope": "public", + "type": "number" + }, + { + "name": "staff", + "kind": "relatedEntities", + "fieldPos": 4, + "scope": "public", + "type": "EmployeeSelection", + "reversePath": true, + "path": "employer" + }, + { + "name": "url", + "kind": "storage", + "scope": "public", + "type": "string" + } + ], + "key": [ + { + "name": "ID" + } + ] + }, + { + "name": "Employee", + "className": "Employee", + "collectionName": "EmployeeSelection", + "tableNumber": 1, + "scope": "public", + "dataURI": "/rest/Employee", + "attributes": [ + { + "name": "ID", + "kind": "storage", + "scope": "public", + "indexed": true, + "type": "long", + "identifying": true + }, + { + "name": "firstname", + "kind": "storage", + "scope": "public", + "type": "string" + }, + { + "name": "lastname", + "kind": "storage", + "scope": "public", + "type": "string" + }, + { + "name": "employer", + "kind": "relatedEntity", + "scope": "public", + "type": "Company", + "path": "Company" + } + ], + "key": [ + { + "name": "ID" + } + ] + } + ] +} +```` + ## $catalog/{dataClass} Returns information about a dataclass and its attributes -### Description +### Descrição -Calling `$catalog/{dataClass}` for a specific dataclass will return the following information about the dataclass and the attributes it contains. If you want to retrieve this information for all the datastore classes in your project's datastore, use [`$catalog/$all`](#catalogall). +Calling `$catalog/{dataClass}` for a specific dataclass will return the following information about the dataclass and the attributes it contains. Se quiser recuperar essa informação para todas as classes de dados do armazém de dados de seu projeto, use [`$catalog/$all`](#catalogall). The information you retrieve concerns the following: -* Dataclass -* Attribute(s) -* Method(s) if any -* Primary key +* Dataclass +* Attribute(s) +* Method(s) if any +* Primary key ### DataClass The following properties are returned for an exposed dataclass: -| Property | Type | Description | -| -------------- | ------ | -------------------------------------------------------------------------------------------------- | -| name | String | Name of the dataclass | -| collectionName | String | Name of an entity selection on the dataclass | -| tableNumber | Number | Table number in the 4D database | -| scope | String | Scope for the dataclass (note that only datastore classes whose **Scope** is public are displayed) | -| dataURI | String | A URI to the data in the dataclass | + +| Propriedade | Type | Descrição | +| -------------- | ------ | --------------------------------------------------------------------------------------------------------- | +| name | String | Name of the dataclass | +| collectionName | String | Name of an entity selection on the dataclass | +| tableNumber | Número | Table number in the 4D database | +| scope | String | Alcance da classe de dados (lembre que só são mostradas as classes de dados cujo **Alcance** for público) | +| dataURI | String | A URI to the data in the dataclass | ### Attribute(s) Here are the properties for each exposed attribute that are returned: -| Property | Type | Description | -| ----------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | -| name | String | Attribute name. | -| kind | String | Attribute type (storage or relatedEntity). | -| fieldPos | Number | Position of the field in the database table). | -| scope | String | Scope of the attribute (only those attributes whose scope is Public will appear). | -| indexed | String | If any **Index Kind** was selected, this property will return true. Otherwise, this property does not appear. | -| type | String | Attribute type (bool, blob, byte, date, duration, image, long, long64, number, string, uuid, or word) or the datastore class for a N->1 relation attribute. | -| identifying | Boolean | This property returns True if the attribute is the primary key. Otherwise, this property does not appear. | -| path | String | Name of the relation for a relatedEntity or relateEntities attribute. | - foreignKey|String |For a relatedEntity attribute, name of the related attribute.| inverseName |String |Name of the opposite relation for a relatedEntity or relateEntities attribute.| +| Propriedade | Type | Descrição | +| ----------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| name | String | Attribute name. | +| kind | String | Attribute type (storage or relatedEntity). | +| fieldPos | Número | Position of the field in the database table). | +| scope | String | Scope of the attribute (only those attributes whose scope is Public will appear). | +| indexed | String | If any **Index Kind** was selected, this property will return true. Otherwise, this property does not appear. | +| type | String | Tipo de atributo (booleano, blob, byte, data, duração, imagem, long, long64, número, string, uuid ou palavra) ou a classe de dados para um atributo de relação N->1. | +| identifying | Booleano | This property returns True if the attribute is the primary key. Otherwise, this property does not appear. | +| path | String | Nome da relação de um atributo relatedEntity ou relateEntities. | + foreignKey|String|Para um atributo relatedEntity, nome do atributo relacionado.| inverseName|String |Nome da relação oposta para um atributo relatedEntity ou relateEntities.| -### Method(s) +### Método(s) -Defines the project methods asociated to the dataclass, if any. +Define os métodos projeto associados à classe de dados, se houver. ### Primary Key -The key object returns the **name** of the attribute defined as the **Primary Key** for the datastore class. +O objeto chave devolve o nome do atributo **name** definido como **chave primária** para a classe de dados. -### Example -You can retrieve the information regarding a specific datastore class. +### Exemplo +Pode recuperar a informação relativa a uma classe de dados específica. `GET /rest/$catalog/Employee` **Result**: - { - name: "Employee", - className: "Employee", - collectionName: "EmployeeCollection", - scope: "public", - dataURI: "http://127.0.0.1:8081/rest/Employee", - defaultTopSize: 20, - extraProperties: { - panelColor: "#76923C", - __CDATA: "\n\n\t\t\n", - panel: { - isOpen: "true", - pathVisible: "true", - __CDATA: "\n\n\t\t\t\n", - position: { - X: "394", - Y: "42" - } +```` +{ + name: "Employee", + className: "Employee", + collectionName: "EmployeeCollection", + scope: "public", + dataURI: "http://127.0.0.1:8081/rest/Employee", + defaultTopSize: 20, + extraProperties: { + panelColor: "#76923C", + __CDATA: "\n\n\t\t\n", + panel: { + isOpen: "true", + pathVisible: "true", + __CDATA: "\n\n\t\t\t\n", + position: { + X: "394", + Y: "42" } + } + }, + attributes: [ + { + name: "ID", + kind: "storage", + scope: "public", + indexed: true, + type: "long", + identifying: true }, - attributes: [ - { - name: "ID", - kind: "storage", - scope: "public", - indexed: true, - type: "long", - identifying: true - }, - { - name: "firstName", - kind: "storage", - scope: "public", - type: "string" - }, - { - name: "lastName", - kind: "storage", - scope: "public", - type: "string" - }, - { - name: "fullName", - kind: "calculated", - scope: "public", - type: "string", - readOnly: true - }, - { - name: "salary", - kind: "storage", - scope: "public", - type: "number", - defaultFormat: { - format: "$###,###.00" - } - }, - { - name: "photo", - kind: "storage", - scope: "public", - type: "image" - }, - { - name: "employer", - kind: "relatedEntity", - scope: "public", - type: "Company", - path: "Company" - }, - { - name: "employerName", - kind: "alias", - scope: "public", - - type: "string", - path: "employer.name", - readOnly: true - }, - { - name: "description", - kind: "storage", - scope: "public", - type: "string", - multiLine: true - }, - ], - key: [ - { - name: "ID" + { + name: "firstName", + kind: "storage", + scope: "public", + type: "string" + }, + { + name: "lastName", + kind: "storage", + scope: "public", + type: "string" + }, + { + name: "fullName", + kind: "calculated", + scope: "public", + type: "string", + readOnly: true + }, + { + name: "salary", + kind: "storage", + scope: "public", + type: "number", + defaultFormat: { + format: "$###,###.00" } - ] - } \ No newline at end of file + }, + { + name: "photo", + kind: "storage", + scope: "public", + type: "image" + }, + { + name: "employer", + kind: "relatedEntity", + scope: "public", + type: "Company", + path: "Company" + }, + { + name: "employerName", + kind: "alias", + scope: "public", + + type: "string", + path: "employer.name", + readOnly: true + }, + { + name: "description", + kind: "storage", + scope: "public", + type: "string", + multiLine: true + }, + ], + key: [ + { + name: "ID" + } + ] +} +```` + diff --git a/website/translated_docs/pt/REST/$compute.md b/website/translated_docs/pt/REST/$compute.md index 187617f79fe519..936f4bf7de9abe 100644 --- a/website/translated_docs/pt/REST/$compute.md +++ b/website/translated_docs/pt/REST/$compute.md @@ -5,76 +5,81 @@ title: '$compute' Calculate on specific attributes (*e.g.*, `Employee/salary/?$compute=sum)` or in the case of an Object attribute (*e.g.*, Employee/objectAtt.property1/?$compute=sum) -## Description + +## Descrição This parameter allows you to do calculations on your data. If you want to perform a calculation on an attribute, you write the following: -`GET /rest/Employee/salary/?$compute=$all` + `GET /rest/Employee/salary/?$compute=$all` -If you want to pass an Object attribute, you must pass one of its property. For example: +If you want to pass an Object attribute, you must pass one of its property. Por exemplo: -`GET /rest/Employee/objectAtt.property1/?$compute=$all` + `GET /rest/Employee/objectAtt.property1/?$compute=$all` You can use any of the following keywords: -| Keyword | Description | + +| Keyword | Descrição | | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | $all | A JSON object that defines all the functions for the attribute (average, count, min, max, and sum for attributes of type Number and count, min, and max for attributes of type String | | average | Get the average on a numerical attribute | -| count | Get the total number in the collection or datastore class (in both cases you must specify an attribute) | +| count | Obter o número total na coleção ou na classe de dados (em ambos os casos há que especificar um atributo) | | min | Get the minimum value on a numerical attribute or the lowest value in an attribute of type String | | max | Get the maximum value on a numerical attribute or the highest value in an attribute of type String | | sum | Get the sum on a numerical attribute | -## Example +## Exemplo If you want to get all the computations for an attribute of type Number, you can write: -`GET /rest/Employee/salary/?$compute=$all` + `GET /rest/Employee/salary/?$compute=$all` **Response**: - { - "salary": { - "count": 4, - "sum": 335000, - "average": 83750, - "min": 70000, - "max": 99000 - } +```` +{ + "salary": { + "count": 4, + "sum": 335000, + "average": 83750, + "min": 70000, + "max": 99000 } - +} +```` If you want to get all the computations for an attribute of type String, you can write: -`GET /rest/Employee/firstName/?$compute=$all` + `GET /rest/Employee/firstName/?$compute=$all` **Response**: - { - "salary": { - "count": 4, - "min": Anne, - "max": Victor - } +```` +{ + "salary": { + "count": 4, + "min": Anne, + "max": Victor } - +} +```` If you want to just get one calculation on an attribute, you can write the following: -`GET /rest/Employee/salary/?$compute=sum` + `GET /rest/Employee/salary/?$compute=sum` **Response**: `235000` + If you want to perform a calculation on an Object attribute, you can write the following: -`GET /rest/Employee/objectAttribute.property1/?$compute=sum` + `GET /rest/Employee/objectAttribute.property1/?$compute=sum` Response: -`45` \ No newline at end of file +`45` \ No newline at end of file diff --git a/website/translated_docs/pt/REST/$directory.md b/website/translated_docs/pt/REST/$directory.md index 799a96a92a15db..9373e65d84713e 100644 --- a/website/translated_docs/pt/REST/$directory.md +++ b/website/translated_docs/pt/REST/$directory.md @@ -5,12 +5,12 @@ title: '$directory' The directory handles user access through REST requests. + ## $directory/login Opens a REST session on your 4D application and logs in the user. -### Description - +### Descrição Use `$directory/login` to open a session in your 4D application through REST and login a user. You can also modify the default 4D session timeout. All parameters must be passed in **headers** of a POST method: @@ -23,7 +23,7 @@ All parameters must be passed in **headers** of a POST method: | session-4D-length | Session inactivity timeout (minutes). Cannot be less than 60 - Not mandatory | -### Example +### Exemplo ```4d C_TEXT($response;$body_t) @@ -35,20 +35,23 @@ $hKey{3}:="session-4D-length" $hValues{1}:="john" $hValues{2}:=Generate digest("123";4D digest) $hValues{3}:=120 -$httpStatus:=HTTP Request(HTTP POST method;"database.example.com:9000";$body_t;$response;$hKey;$hValues) +$httpStatus:=HTTP Request(HTTP POST method;"app.example.com:9000/rest/$directory/login";$body_t;$response;$hKey;$hValues) ``` **Result**: If the login was successful, the result will be: - { - "result": true - } - +``` +{ + "result": true +} +``` Otherwise, the response will be: - { - "result": false - } \ No newline at end of file +``` +{ + "result": false +} +``` diff --git a/website/translated_docs/pt/REST/$distinct.md b/website/translated_docs/pt/REST/$distinct.md index eec3ddaa8ce6f0..c4e267cd14e645 100644 --- a/website/translated_docs/pt/REST/$distinct.md +++ b/website/translated_docs/pt/REST/$distinct.md @@ -6,21 +6,24 @@ title: '$distinct' Returns the distinct values for a specific attribute in a collection (*e.g.*, `Company/name?$filter="name=a*"&$distinct=true`) -## Description + +## Descrição `$distinct` allows you to return a collection containing the distinct values for a query on a specific attribute. Only one attribute in the dataclass can be specified. Generally, the String type is best; however, you can also use it on any attribute type that could contain multiple values. You can also use `$skip` and `$top/$limit` as well, if you'd like to navigate the selection before it's placed in an array. -## Example - +## Exemplo In our example below, we want to retrieve the distinct values for a company name starting with the letter "a": -`GET /rest/Company/name?$filter="name=a*"&$distinct=true` + `GET /rest/Company/name?$filter="name=a*"&$distinct=true` **Response**: - [ - "Adobe", - "Apple" - ] \ No newline at end of file +```` +[ + "Adobe", + "Apple" +] +```` + diff --git a/website/translated_docs/pt/REST/$entityset.md b/website/translated_docs/pt/REST/$entityset.md index eb6d217570c0e4..4c6e6e8699afde 100644 --- a/website/translated_docs/pt/REST/$entityset.md +++ b/website/translated_docs/pt/REST/$entityset.md @@ -5,19 +5,23 @@ title: '$entityset' After [creating an entity set]($method.md#methodentityset) by using `$method=entityset`, you can then use it subsequently. + ## Available syntaxes -| Syntax | Example | Description | +| Sintaxe | Exemplo | Descrição | | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ------------------------------------------------------------ | | [**$entityset/{entitySetID}**](#entitysetentitySetID) | `/People/$entityset/0ANUMBER` | Retrieves an existing entity set | | [**$entityset/{entitySetID}?$operator...&$otherCollection**](#entitysetentitysetidoperatorothercollection) | `/Employee/$entityset/0ANUMBER?$logicOperator=AND &$otherCollection=C0ANUMBER` | Creates a new entity set from comparing existing entity sets | + + ## $entityset/{entitySetID} Retrieves an existing entity set (*e.g.*, `People/$entityset/0AF4679A5C394746BFEB68D2162A19FF`) -### Description + +### Descrição This syntax allows you to execute any operation on a defined entity set. @@ -25,38 +29,38 @@ Because entity sets have a time limit on them (either by default or after callin When you retrieve an existing entity set stored in 4D Server's cache, you can also apply any of the following to the entity set: [`$expand`]($expand.md), [`$filter`]($filter), [`$orderby`]($orderby), [`$skip`]($skip.md), and [`$top/$limit`]($top_$limit.md). -### Example +### Exemplo After you create an entity set, the entity set ID is returned along with the data. You call this ID in the following manner: -`GET /rest/Employee/$entityset/9718A30BF61343C796345F3BE5B01CE7` + `GET /rest/Employee/$entityset/9718A30BF61343C796345F3BE5B01CE7` + ## $entityset/{entitySetID}?$operator...&$otherCollection Create another entity set based on previously created entity sets -| Parameter | Type | Description | +| Parameter | Type | Descrição | | ---------------- | ------ | -------------------------------------------------------------- | | $operator | String | One of the logical operators to test with the other entity set | | $otherCollection | String | Entity set ID | -### Description -After creating an entity set (entity set #1) by using `$method=entityset`, you can then create another entity set by using the `$entityset/{entitySetID}?$operator... &$otherCollection` syntax, the `$operator` property (whose values are shown below), and another entity set (entity set #2) defined by the `$otherCollection` property. The two entity sets must be in the same datastore class. +### Descrição + +After creating an entity set (entity set #1) by using `$method=entityset`, you can then create another entity set by using the `$entityset/{entitySetID}?$operator... &$otherCollection` syntax, the `$operator` property (whose values are shown below), and another entity set (entity set #2) defined by the `$otherCollection` property. Os dois conjuntos de entidades devem estar na mesma classe de dados. You can then create another entity set containing the results from this call by using the `$method=entityset` at the end of the REST request. Here are the logical operators: -| Operator | Description | +| Operator | Descrição | | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | | AND | Returns the entities in common to both entity sets | -| OR | Returns the entities in both entity sets | +| OU | Returns the entities in both entity sets | | EXCEPT | Returns the entities in entity set #1 minus those in entity set #2 | | INTERSECT | Returns either true or false if there is an intersection of the entities in both entity sets (meaning that least one entity is common in both entity sets) | - - > The logical operators are not case-sensitive, so you can write "AND" or "and". Below is a representation of the logical operators based on two entity sets. The red section is what is returned. @@ -65,7 +69,7 @@ Below is a representation of the logical operators based on two entity sets. The ![](assets/en/REST/and.png) -**OR** +**OU** ![](assets/en/REST/or.png) @@ -73,22 +77,22 @@ Below is a representation of the logical operators based on two entity sets. The ![](assets/en/REST/except.png) -The syntax is as follows: -`GET /rest/dataClass/$entityset/entitySetID?$logicOperator=AND&$otherCollection=entitySetID` +The syntax is as follows: -### Example + `GET /rest/dataClass/$entityset/entitySetID?$logicOperator=AND&$otherCollection=entitySetID` +### Exemplo In the example below, we return the entities that are in both entity sets since we are using the AND logical operator: -`GET /rest/Employee/$entityset/9718A30BF61343C796345F3BE5B01CE7?$logicOperator=AND&$otherCollection=C05A0D887C664D4DA1B38366DD21629B` + `GET /rest/Employee/$entityset/9718A30BF61343C796345F3BE5B01CE7?$logicOperator=AND&$otherCollection=C05A0D887C664D4DA1B38366DD21629B` If we want to know if the two entity sets intersect, we can write the following: -`GET /rest/Employee/$entityset/9718A30BF61343C796345F3BE5B01CE7?$logicOperator=intersect&$otherCollection=C05A0D887C664D4DA1B38366DD21629B` + `GET /rest/Employee/$entityset/9718A30BF61343C796345F3BE5B01CE7?$logicOperator=intersect&$otherCollection=C05A0D887C664D4DA1B38366DD21629B` If there is an intersection, this query returns true. Otherwise, it returns false. In the following example we create a new entity set that combines all the entities in both entity sets: -`GET /rest/Employee/$entityset/9718A30BF61343C796345F3BE5B01CE7?$logicOperator=OR&$otherCollection=C05A0D887C664D4DA1B38366DD21629B&$method=entityset` \ No newline at end of file +`GET /rest/Employee/$entityset/9718A30BF61343C796345F3BE5B01CE7?$logicOperator=OR&$otherCollection=C05A0D887C664D4DA1B38366DD21629B&$method=entityset` diff --git a/website/translated_docs/pt/REST/$expand.md b/website/translated_docs/pt/REST/$expand.md index c677faa841c242..6718b0603c750b 100644 --- a/website/translated_docs/pt/REST/$expand.md +++ b/website/translated_docs/pt/REST/$expand.md @@ -4,22 +4,22 @@ title: '$expand' --- -Expands an image stored in an Image attribute (*e.g.*, `Employee(1)/photo?$imageformat=best&$expand=photo`) -or -Expands an BLOB attribute to save it. +Expands an image stored in an Image attribute (*e.g.*, `Employee(1)/photo?$imageformat=best&$expand=photo`)
    or
    Expands an BLOB attribute to save it. > **Compatibility**: For compatibility reasons, $expand can be used to expand a relational attribute (*e.g.*, `Company(1)?$expand=staff` or `Employee/?$filter="firstName BEGIN a"&$expand=employer`). It is however recommended to use [`$attributes`]($attributes.md) for this feature. + + ## Viewing an image attribute If you want to view an image attribute in its entirety, write the following: -`GET /rest/Employee(1)/photo?$imageformat=best&$version=1&$expand=photo` + `GET /rest/Employee(1)/photo?$imageformat=best&$version=1&$expand=photo` For more information about the image formats, refer to [`$imageformat`]($imageformat.md). For more information about the version parameter, refer to [`$version`]($version.md). ## Saving a BLOB attribute to disk -If you want to save a BLOB stored in your datastore class, you can write the following by also passing "true" to $binary: +Se quiser salvar um BLOB armazenado em sua classe de dados pode escrever o seguinte passando também "true" a $binary: -`GET /rest/Company(11)/blobAtt?$binary=true&$expand=blobAtt` \ No newline at end of file + `GET /rest/Company(11)/blobAtt?$binary=true&$expand=blobAtt` \ No newline at end of file diff --git a/website/translated_docs/pt/REST/$filter.md b/website/translated_docs/pt/REST/$filter.md index 79a0c364c4c05d..4c81135d5de41c 100644 --- a/website/translated_docs/pt/REST/$filter.md +++ b/website/translated_docs/pt/REST/$filter.md @@ -7,7 +7,8 @@ title: '$filter' Allows to query the data in a dataclass or method *(e.g.*, `$filter="firstName!='' AND salary>30000"`) -## Description + +## Descrição This parameter allows you to define the filter for your dataclass or method. @@ -25,7 +26,8 @@ A more compex filter is composed of the following elements, which joins two quer **{attribute} {comparator} {value} {AND/OR/EXCEPT} {attribute} {comparator} {value}** -For example: `$filter="firstName=john AND salary>20000"` where `firstName` and `salary` are attributes in the Employee datastore class. + +Por exemplo: `$filter="firstName=john AND salary>20000"` onde `firstName` y `salary` são atributos da classe de dados Employee. ### Using the params property @@ -33,65 +35,67 @@ You can also use 4D's params property. **{attribute} {comparator} {placeholder} {AND/OR/EXCEPT} {attribute} {comparator} {placeholder}&$params='["{value1}","{value2}"]"'** -For example: `$filter="firstName=:1 AND salary>:2"&$params='["john",20000]'` where firstName and salary are attributes in the Employee datastore class. +Por exemplo: `$filter="firstName=:1 AND salary>:2"&$params='["john",20000]'` onde firstName e salary são os atributos da classe de dados Employee. For more information regarding how to query data in 4D, refer to the [dataClass.query()](https://doc.4d.com/4Dv18/4D/18/dataClassquery.305-4505887.en.html) documentation. - > When inserting quotes (') or double quotes ("), you must escape them using using their character code: > -> - Quotes ('): \u0027 -> - Double quotes ("): \u0022

    -> For example, you can write the following when passing a value with a quote when using the *params* property: -> `http://127.0.0.1:8081/rest/Person/?$filter="lastName=:1"&$params='["O\u0027Reilly"]'` -> -> If you pass the value directly, you can write the following: `http://127.0.0.1:8081/rest/Person/?$filter="lastName=O'Reilly"` -> -> ## Attribute -> -> If the attribute is in the same dataclass, you can just pass it directly (*e.g.*, `firstName`). However, if you want to query another dataclass, you must include the relation attribute name plus the attribute name, i.e. the path (*e.g.*, employer.name). The attribute name is case-sensitive (`firstName` is not equal to `FirstName`). -> -> You can also query attributes of type Object by using dot-notation. For example, if you have an attribute whose name is "objAttribute" with the following structure: -> -> { -> prop1: "this is my first property", -> prop2: 9181, -> prop3: ["abc","def","ghi"] -> } -> -> -> You can search in the object by writing the following: -> -> `GET /rest/Person/?filter="objAttribute.prop2 == 9181"` -> -> ## Comparator -> -> The comparator must be one of the following values: -> -> | Comparator | Description | -> | ---------- | ------------------------ | -> | = | equals to | -> | != | not equal to | -> | > | greater than | -> | >= | greater than or equal to | -> | < | less than | -> | <= | less than or equal to | -> | begin | begins with | - -> -> ## Examples -> -> In the following example, we look for all employees whose last name begins with a "j": -> -> GET /rest/Employee?$filter="lastName begin j" -> -> -> In this example, we search the Employee datastore class for all employees whose salary is greater than 20,000 and who do not work for a company named Acme: -> -> GET /rest/Employee?$filter="salary>20000 AND -> employer.name!=acme"&$orderby="lastName,firstName" -> -> -> In this example, we search the Person datastore class for all the people whose number property in the anotherobj attribute of type Object is greater than 50: -> -> GET /rest/Person/?filter="anotherobj.mynum > 50" -> \ No newline at end of file +>
  • Quotes ('): \u0027
  • Double quotes ("): \u0022 +> +> For example, you can write the following when passing a value with a quote when using the *params* property: +> `http://127.0.0.1:8081/rest/Person/?$filter="lastName=:1"&$params='["O\u0027Reilly"]'` +> +> If you pass the value directly, you can write the following: `http://127.0.0.1:8081/rest/Person/?$filter="lastName=O'Reilly"` + +## Atributo + +If the attribute is in the same dataclass, you can just pass it directly (*e.g.*, `firstName`). However, if you want to query another dataclass, you must include the relation attribute name plus the attribute name, i.e. the path (*e.g.*, employer.name). The attribute name is case-sensitive (`firstName` is not equal to `FirstName`). + +You can also query attributes of type Object by using dot-notation. For example, if you have an attribute whose name is "objAttribute" with the following structure: + +``` +{ + prop1: "this is my first property", + prop2: 9181, + prop3: ["abc","def","ghi"] +} +``` + +You can search in the object by writing the following: + +`GET /rest/Person/?filter="objAttribute.prop2 == 9181"` + +## Comparator + +The comparator must be one of the following values: + +| Comparator | Descrição | +| ---------- | ------------------------ | +| = | equals to | +| != | not equal to | +| > | greater than | +| >= | greater than or equal to | +| < | less than | +| <= | less than or equal to | +| begin | begins with | + +## Exemplos + +In the following example, we look for all employees whose last name begins with a "j": + +``` + GET /rest/Employee?$filter="lastName begin j" +``` + +Nesse exemplo pesquisamos na classe de dados Empregado todos os empregados cujo salário seja superior a 20.000 e que não trabalhem para uma empresa chamada Acme: + +``` + GET /rest/Employee?$filter="salary>20000 AND + employer.name!=acme"&$orderby="lastName,firstName" +``` + +Neste exemplo, buscamos na classe de dados Person todas as pessoas cuja propriedade número no atributo anotherobj de tipo Object for maior que 50: + +``` + GET /rest/Person/?filter="anotherobj.mynum > 50" +``` diff --git a/website/translated_docs/pt/REST/$imageformat.md b/website/translated_docs/pt/REST/$imageformat.md index a256964f2cfe21..928ee59fec8b25 100644 --- a/website/translated_docs/pt/REST/$imageformat.md +++ b/website/translated_docs/pt/REST/$imageformat.md @@ -5,11 +5,11 @@ title: '$imageformat' Defines which image format to use for retrieving images (*e.g.*, `$imageformat=png`) -## Description +## Descrição Define which format to use to display images. By default, the best format for the image will be chosen. You can, however, select one of the following formats: -| Type | Description | +| Type | Descrição | | ---- | ------------------------------ | | GIF | GIF format | | PNG | PNG format | @@ -17,13 +17,13 @@ Define which format to use to display images. By default, the best format for th | TIFF | TIFF format | | best | Best format based on the image | - Once you have defined the format, you must pass the image attribute to [`$expand`]($expand.md) to load the photo completely. If there is no image to be loaded or the format doesn't allow the image to be loaded, the response will be empty. -## Example +## Exemplo The following example defines the image format to JPEG regardless of the actual type of the photo and passes the actual version number sent by the server: -`GET /rest/Employee(1)/photo?$imageformat=jpeg&$version=3&$expand=photo` \ No newline at end of file +`GET /rest/Employee(1)/photo?$imageformat=jpeg&$version=3&$expand=photo` + diff --git a/website/translated_docs/pt/REST/$info.md b/website/translated_docs/pt/REST/$info.md index 8e6452c288a125..2ebfba267fe538 100644 --- a/website/translated_docs/pt/REST/$info.md +++ b/website/translated_docs/pt/REST/$info.md @@ -5,53 +5,47 @@ title: '$info' Returns information about the entity sets currently stored in 4D Server's cache as well as user sessions -## Description - +## Descrição When you call this request for your project, you retrieve information in the following properties: -| Property | Type | Description | -| -------------- | ---------- | ----------------------------------------------------------------------------------- | -| cacheSize | Number | 4D Server's cache size. | -| usedCache | Number | How much of 4D Server's cache has been used. | -| entitySetCount | Number | Number of entity selections. | -| entitySet | Collection | A collection in which each object contains information about each entity selection. | -| ProgressInfo | Collection | A collection containing information about progress indicator information. | -| sessionInfo | Collection | A collection in which each object contains information about each user session. | - +| Propriedade | Type | Descrição | +| -------------- | ------- | ----------------------------------------------------------------------------------- | +| cacheSize | Número | 4D Server's cache size. | +| usedCache | Número | How much of 4D Server's cache has been used. | +| entitySetCount | Número | Number of entity selections. | +| entitySet | Coleção | A collection in which each object contains information about each entity selection. | +| ProgressInfo | Coleção | A collection containing information about progress indicator information. | +| sessionInfo | Coleção | A collection in which each object contains information about each user session. | ### entitySet - For each entity selection currently stored in 4D Server's cache, the following information is returned: -| Property | Type | Description | -| ------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| id | String | A UUID that references the entity set. | -| dataClass | String | Name of the datastore class. | -| selectionSize | Number | Number of entities in the entity selection. | -| sorted | Boolean | Returns true if the set was sorted (using `$orderby`) or false if it's not sorted. | -| refreshed | Date | When the entity set was created or the last time it was used. | -| expires | Date | When the entity set will expire (this date/time changes each time when the entity set is refreshed). The difference between refreshed and expires is the timeout for an entity set. This value is either two hours by default or what you defined using `$timeout`. | +| Propriedade | Type | Descrição | +| ------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| id | String | A UUID that references the entity set. | +| dataClass | String | Name of the dataclass. | +| selectionSize | Número | Number of entities in the entity selection. | +| sorted | Booleano | Returns true if the set was sorted (using `$orderby`) or false if it's not sorted. | +| refreshed | Date | When the entity set was created or the last time it was used. | +| expires | Date | When the entity set will expire (this date/time changes each time when the entity set is refreshed). The difference between refreshed and expires is the timeout for an entity set. This value is either two hours by default or what you defined using `$timeout`. | For information about how to create an entity selection, refer to `$method=entityset`. If you want to remove the entity selection from 4D Server's cache, use `$method=release`. - > 4D also creates its own entity selections for optimization purposes, so the ones you create with `$method=entityset` are not the only ones returned. -> > **IMPORTANT** If your project is in **Controlled Admin Access Mode**, you must first log into the project as a user in the Admin group. ### sessionInfo For each user session, the following information is returned in the *sessionInfo* collection: -| Property | Type | Description | -| ---------- | ------ | ------------------------------------------------------------ | -| sessionID | String | A UUID that references the session. | -| userName | String | The name of the user who runs the session. | -| lifeTime | Number | The lifetime of a user session in seconds (3600 by default). | -| expiration | Date | The current expiration date and time of the user session. | - +| Propriedade | Type | Descrição | +| ----------- | ------ | ------------------------------------------------------------ | +| sessionID | String | A UUID that references the session. | +| userName | String | The name of the user who runs the session. | +| lifeTime | Número | The lifetime of a user session in seconds (3600 by default). | +| expiration | Date | The current expiration date and time of the user session. | -## Example +## Exemplo Retrieve information about the entity sets currently stored in 4D Server's cache as well as user sessions: @@ -59,65 +53,64 @@ Retrieve information about the entity sets currently stored in 4D Server's cache **Result**: +``` +{ +cacheSize: 209715200, +usedCache: 3136000, +entitySetCount: 4, +entitySet: [ + { + id: "1418741678864021B56F8C6D77F2FC06", + tableName: "Company", + selectionSize: 1, + sorted: false, + refreshed: "2011-11-18T10:30:30Z", + expires: "2011-11-18T10:35:30Z" + }, { - cacheSize: 209715200, - usedCache: 3136000, - entitySetCount: 4, - entitySet: [ - { - id: "1418741678864021B56F8C6D77F2FC06", - tableName: "Company", - selectionSize: 1, - sorted: false, - refreshed: "2011-11-18T10:30:30Z", - expires: "2011-11-18T10:35:30Z" - }, - { - id: "CAD79E5BF339462E85DA613754C05CC0", - tableName: "People", - selectionSize: 49, - sorted: true, - refreshed: "2011-11-18T10:28:43Z", - expires: "2011-11-18T10:38:43Z" - }, - { - id: "F4514C59D6B642099764C15D2BF51624", - tableName: "People", - selectionSize: 37, - sorted: false, - refreshed: "2011-11-18T10:24:24Z", - expires: "2011-11-18T12:24:24Z" - } - ], - ProgressInfo: [ - { - UserInfo: "flushProgressIndicator", - sessions: 0, - percent: 0 - }, - { - UserInfo: "indexProgressIndicator", - sessions: 0, - percent: 0 - } - ], - sessionInfo: [ - { - sessionID: "6657ABBCEE7C3B4089C20D8995851E30", - userID: "36713176D42DB045B01B8E650E8FA9C6", - userName: "james", - lifeTime: 3600, - expiration: "2013-04-22T12:45:08Z" - }, - { - sessionID: "A85F253EDE90CA458940337BE2939F6F", - userID: "00000000000000000000000000000000", - userName: "default guest", - lifeTime: 3600, - expiration: "2013-04-23T10:30:25Z" + id: "CAD79E5BF339462E85DA613754C05CC0", + tableName: "People", + selectionSize: 49, + sorted: true, + refreshed: "2011-11-18T10:28:43Z", + expires: "2011-11-18T10:38:43Z" + }, + { + id: "F4514C59D6B642099764C15D2BF51624", + tableName: "People", + selectionSize: 37, + sorted: false, + refreshed: "2011-11-18T10:24:24Z", + expires: "2011-11-18T12:24:24Z" } - ] +], ProgressInfo: [ + { + UserInfo: "flushProgressIndicator", + sessions: 0, + percent: 0 + }, + { + UserInfo: "indexProgressIndicator", + sessions: 0, + percent: 0 } - - +], +sessionInfo: [ + { + sessionID: "6657ABBCEE7C3B4089C20D8995851E30", + userID: "36713176D42DB045B01B8E650E8FA9C6", + userName: "james", + lifeTime: 3600, + expiration: "2013-04-22T12:45:08Z" + }, + { + sessionID: "A85F253EDE90CA458940337BE2939F6F", + userID: "00000000000000000000000000000000", + userName: "default guest", + lifeTime: 3600, + expiration: "2013-04-23T10:30:25Z" +} +] +} +``` > The progress indicator information listed after the entity selections is used internally by 4D. \ No newline at end of file diff --git a/website/translated_docs/pt/REST/$method.md b/website/translated_docs/pt/REST/$method.md index 3d80d75d7cd13b..2800979ddfa7e3 100644 --- a/website/translated_docs/pt/REST/$method.md +++ b/website/translated_docs/pt/REST/$method.md @@ -7,7 +7,7 @@ This parameter allows you to define the operation to execute with the returned e ## Available syntaxes -| Syntax | Example | Description | +| Sintaxe | Exemplo | Descrição | | ----------------------------------------------- | ----------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | | [**$method=delete**](#methoddelete) | `POST /Employee?$filter="ID=11"& $method=delete` | Deletes the current entity, entity collection, or entity selection | | [**$method=entityset**](#methodentityset) | `GET /People/?$filter="ID>320"& $method=entityset& $timeout=600` | Creates an entity set in 4D Server's cache based on the collection of entities defined in the REST request | @@ -16,74 +16,82 @@ This parameter allows you to define the operation to execute with the returned e | [**$method=update**](#methodupdate) | `POST /Person/?$method=update` | Updates and/or creates one or more entities | + + + ## $method=delete Deletes the current entity, entity collection, or entity selection (created through REST) -### Description + +### Descrição With `$method=delete`, you can delete an entity or an entire entity collection. You can define the collection of entities by using, for example, [`$filter`]($filter.md) or specifying one directly using [`{dataClass}({key})`](%7BdataClass%7D.html#dataclasskey) *(e.g.*, /Employee(22)). You can also delete the entities in an entity set, by calling [`$entityset/{entitySetID}`]($entityset.md#entitysetentitysetid). -## Example - +## Exemplo You can then write the following REST request to delete the entity whose key is 22: -`POST /rest/Employee(22)/?$method=delete` + `POST /rest/Employee(22)/?$method=delete` You can also do a query as well using $filter: -`POST /rest/Employee?$filter="ID=11"&$method=delete` + `POST /rest/Employee?$filter="ID=11"&$method=delete` You can also delete an entity set using $entityset/{entitySetID}: -`POST /rest/Employee/$entityset/73F46BE3A0734EAA9A33CA8B14433570?$method=delete` + `POST /rest/Employee/$entityset/73F46BE3A0734EAA9A33CA8B14433570?$method=delete` Response: - { - "ok": true - } - +``` +{ + "ok": true +} +``` + + ## $method=entityset Creates an entity set in 4D Server's cache based on the collection of entities defined in the REST request -### Description +### Descrição When you create a collection of entities in REST, you can also create an entity set that will be saved in 4D Server's cache. The entity set will have a reference number that you can pass to `$entityset/{entitySetID}` to access it. By default, it is valid for two hours; however, you can modify that amount of time by passing a value (in seconds) to $timeout. If you have used `$savedfilter` and/or `$savedorderby` (in conjunction with `$filter` and/or `$orderby`) when you created your entity set, you can recreate it with the same reference ID even if it has been removed from 4D Server's cache. -### Example +### Exemplo To create an entity set, which will be saved in 4D Server's cache for two hours, add `$method=entityset` at the end of your REST request: -`GET /rest/People/?$filter="ID>320"&$method=entityset` + `GET /rest/People/?$filter="ID>320"&$method=entityset` You can create an entity set that will be stored in 4D Server's cache for only ten minutes by passing a new timeout to `$timeout`: -`GET /rest/People/?$filter="ID>320"&$method=entityset&$timeout=600` + `GET /rest/People/?$filter="ID>320"&$method=entityset&$timeout=600` You can also save the filter and order by, by passing true to `$savedfilter` and `$savedorderby`. - > `$skip` and `$top/$limit` are not taken into consideration when saving an entity set. After you create an entity set, the first element, `__ENTITYSET`, is added to the object returned and indicates the URI to use to access the entity set: `__ENTITYSET: "http://127.0.0.1:8081/rest/Employee/$entityset/9718A30BF61343C796345F3BE5B01CE7"` + + + ## $method=release Releases an existing entity set stored in 4D Server's cache. -### Description +### Descrição You can release an entity set, which you created using [`$method=entityset`](#methodentityset), from 4D Server's cache. -### Example +### Exemplo Release an existing entity set: @@ -93,27 +101,29 @@ Release an existing entity set: If the request was successful, the following response is returned: - { - "ok": true - } - If the entity set wasn't found, an error is returned: - - { - "__ERROR": [ - { - "message": "Error code: 1802\nEntitySet \"4C51204DD8184B65AC7D79F09A077F24\" cannot be found\ncomponent: 'dbmg'\ntask 22, name: 'HTTP connection handler'\n", - "componentSignature": "dbmg", - "errCode": 1802 - } - ] - } - +``` +{ + "ok": true +} If the entity set wasn't found, an error is returned: + +{ + "__ERROR": [ + { + "message": "Error code: 1802\nEntitySet \"4C51204DD8184B65AC7D79F09A077F24\" cannot be found\ncomponent: 'dbmg'\ntask 22, name: 'HTTP connection handler'\n", + "componentSignature": "dbmg", + "errCode": 1802 + } + ] +} +``` + ## $method=subentityset Creates an entity set in 4D Server's cache based on the collection of related entities defined in the REST request -### Description + +### Descrição `$method=subentityset` allows you to sort the data returned by the relation attribute defined in the REST request. @@ -121,7 +131,7 @@ To sort the data, you use the `$subOrderby` property. For each attribute, you sp If you want to specify multiple attributes, you can delimit them with a comma, µ, `$subOrderby="lastName desc, firstName asc"`. -### Example +### Exemplo If you want to retrieve only the related entities for a specific entity, you can make the following REST request where staff is the relation attribute in the Company dataclass linked to the Employee dataclass: @@ -129,52 +139,55 @@ If you want to retrieve only the related entities for a specific entity, you can #### Response: - { - - "__ENTITYSET": "/rest/Employee/$entityset/FF625844008E430B9862E5FD41C741AB", - "__entityModel": "Employee", - "__COUNT": 2, - "__SENT": 2, - "__FIRST": 0, - "__ENTITIES": [ - { - "__KEY": "4", - "__STAMP": 1, - "ID": 4, - "firstName": "Linda", - "lastName": "Jones", - "birthday": "1970-10-05T14:23:00Z", - "employer": { - "__deferred": { - "uri": "/rest/Company(1)", - "__KEY": "1" - } +``` +{ + + "__ENTITYSET": "/rest/Employee/$entityset/FF625844008E430B9862E5FD41C741AB", + "__entityModel": "Employee", + "__COUNT": 2, + "__SENT": 2, + "__FIRST": 0, + "__ENTITIES": [ + { + "__KEY": "4", + "__STAMP": 1, + "ID": 4, + "firstName": "Linda", + "lastName": "Jones", + "birthday": "1970-10-05T14:23:00Z", + "employer": { + "__deferred": { + "uri": "/rest/Company(1)", + "__KEY": "1" } - }, - { - "__KEY": "1", - "__STAMP": 3, - "ID": 1, - "firstName": "John", - "lastName": "Smith", - "birthday": "1985-11-01T15:23:00Z", - "employer": { - "__deferred": { - "uri": "/rest/Company(1)", - "__KEY": "1" - } + } + }, + { + "__KEY": "1", + "__STAMP": 3, + "ID": 1, + "firstName": "John", + "lastName": "Smith", + "birthday": "1985-11-01T15:23:00Z", + "employer": { + "__deferred": { + "uri": "/rest/Company(1)", + "__KEY": "1" } } - ] - - } - + } + ] + +} +``` + ## $method=update + Updates and/or creates one or more entities -### Description +### Descrição `$method=update` allows you to update and/or create one or more entities in a single **POST**. If you update and/or create one entity, it is done in an object with each property an attribute with its value, *e.g.*, `{ lastName: "Smith" }`. If you update and/or create multiple entities, you must create a collection of objects. @@ -187,125 +200,131 @@ Triggers are executed immediately when saving the entity to the server. The resp You can also put these requests to create or update entities in a transaction by calling `$atomic/$atonce`. If any errors occur during data validation, none of the entities are saved. You can also use $method=validate to validate the entities before creating or updating them. If a problem arises while adding or modifying an entity, an error will be returned to you with that information. - > Notes for specific attribute types: > > * **Dates** must be expressed in JS format: YYYY-MM-DDTHH:MM:SSZ (e.g., "2010-10-05T23:00:00Z"). If you have selected the Date only property for your Date attribute, the time zone and time (hour, minutes, and seconds) will be removed. In this case, you can also send the date in the format that it is returned to you dd!mm!yyyy (e.g., 05!10!2013). > * **Booleans** are either true or false. > * Uploaded files using `$upload` can be applied to an attribute of type Image or BLOB by passing the object returned in the following format { "ID": "D507BC03E613487E9B4C2F6A0512FE50"} -### Example +### Exemplo To update a specific entity, you use the following URL: -`POST /rest/Person/?$method=update` + `POST /rest/Person/?$method=update` **POST data:** - { - __KEY: "340", - __STAMP: 2, - firstName: "Pete", - lastName: "Miller" - } - +``` +{ + __KEY: "340", + __STAMP: 2, + firstName: "Pete", + lastName: "Miller" +} +``` The firstName and lastName attributes in the entity indicated above will be modified leaving all other attributes (except calculated ones based on these attributes) unchanged. If you want to create an entity, you can POST the attributes using this URL: -`POST /rest/Person/?$method=update` + `POST /rest/Person/?$method=update` **POST data:** - { - firstName: "John", - lastName: "Smith" - } - +``` +{ + firstName: "John", + lastName: "Smith" +} +``` You can also create and update multiple entities at the same time using the same URL above by passing multiple objects in an array to the POST: -`POST /rest/Person/?$method=update` + `POST /rest/Person/?$method=update` **POST data:** - [{ - "__KEY": "309", - "__STAMP": 5, - "ID": "309", - "firstName": "Penelope", - "lastName": "Miller" - }, { - "firstName": "Ann", - "lastName": "Jones" - }] - +``` +[{ + "__KEY": "309", + "__STAMP": 5, + "ID": "309", + "firstName": "Penelope", + "lastName": "Miller" +}, { + "firstName": "Ann", + "lastName": "Jones" +}] +``` **Response:** When you add or modify an entity, it is returned to you with the attributes that were modified. For example, if you create the new employee above, the following will be returned: - { - "__KEY": "622", - "__STAMP": 1, - "uri": "http://127.0.0.1:8081/rest/Employee(622)", - "__TIMESTAMP": "!!2020-04-03!!", - "ID": 622, - "firstName": "John", - "firstName": "Smith" - } - +``` +{ + "__KEY": "622", + "__STAMP": 1, + "uri": "http://127.0.0.1:8081/rest/Employee(622)", + "__TIMESTAMP": "!!2020-04-03!!", + "ID": 622, + "firstName": "John", + "firstName": "Smith" +} +``` If, for example, the stamp is not correct, the following error is returned: - { - "__STATUS": { - "status": 2, - "statusText": "Stamp has changed", - "success": false - }, - "__KEY": "1", - "__STAMP": 12, - "__TIMESTAMP": "!!2020-03-31!!", - "ID": 1, - "firstname": "Denise", - "lastname": "O'Peters", - "isWoman": true, - "numberOfKids": 1, - "addressID": 1, - "gender": true, - "imageAtt": { - "__deferred": { - "uri": "/rest/Persons(1)/imageAtt?$imageformat=best&$version=12&$expand=imageAtt", - "image": true - } +``` +{ + "__STATUS": { + "status": 2, + "statusText": "Stamp has changed", + "success": false + }, + "__KEY": "1", + "__STAMP": 12, + "__TIMESTAMP": "!!2020-03-31!!", + "ID": 1, + "firstname": "Denise", + "lastname": "O'Peters", + "isWoman": true, + "numberOfKids": 1, + "addressID": 1, + "gender": true, + "imageAtt": { + "__deferred": { + "uri": "/rest/Persons(1)/imageAtt?$imageformat=best&$version=12&$expand=imageAtt", + "image": true + } + }, + "extra": { + "num": 1, + "alpha": "I am 1" + }, + "address": { + "__deferred": { + "uri": "/rest/Address(1)", + "__KEY": "1" + } + }, + "__ERROR": [ + { + "message": "Given stamp does not match current one for record# 0 of table Persons", + "componentSignature": "dbmg", + "errCode": 1263 }, - "extra": { - "num": 1, - "alpha": "I am 1" + { + "message": "Cannot save record 0 in table Persons of database remote_dataStore", + "componentSignature": "dbmg", + "errCode": 1046 }, - "address": { - "__deferred": { - "uri": "/rest/Address(1)", - "__KEY": "1" - } - }, - "__ERROR": [ - { - "message": "Given stamp does not match current one for record# 0 of table Persons", - "componentSignature": "dbmg", - "errCode": 1263 - }, - { - "message": "Cannot save record 0 in table Persons of database remote_dataStore", - "componentSignature": "dbmg", - "errCode": 1046 - }, - { - "message": "The entity# 1 in the \"Persons\" datastore class cannot be saved", - "componentSignature": "dbmg", - "errCode": 1517 - } - ] - }{} \ No newline at end of file + { + "message": "The entity# 1 in the \"Persons\" dataclass cannot be saved", + "componentSignature": "dbmg", + "errCode": 1517 + } + ] +}{} + +``` diff --git a/website/translated_docs/pt/REST/$orderby.md b/website/translated_docs/pt/REST/$orderby.md index b00eb345354636..feb3624668c50c 100644 --- a/website/translated_docs/pt/REST/$orderby.md +++ b/website/translated_docs/pt/REST/$orderby.md @@ -6,42 +6,46 @@ title: '$orderby' Sorts the data returned by the attribute and sorting order defined (*e.g.*, `$orderby="lastName desc, salary asc"`) -## Description +## Descrição -`$orderby` orders the entities returned by the REST request. For each attribute, you specify the order as `ASC` (or `asc`) for ascending order and `DESC` (`desc`) for descending order. By default, the data is sorted in ascending order. If you want to specify multiple attributes, you can delimit them with a comma, *e.g.*, `$orderby="lastName desc, firstName asc"`. +`$orderby` orders the entities returned by the REST request. For each attribute, you specify the order as `ASC` (or `asc`) for ascending order and `DESC` (`desc`) for descending order. By default, the data is sorted in ascending order. By default, the data is sorted in ascending order. -## Example + +## Exemplo In this example, we retrieve entities and sort them at the same time: -`GET /rest/Employee/?$filter="salary!=0"&$orderby="salary DESC,lastName ASC,firstName ASC"` + `GET /rest/Employee/?$filter="salary!=0"&$orderby="salary DESC,lastName ASC,firstName ASC"` The example below sorts the entity set by lastName attribute in ascending order: -`GET /rest/Employee/$entityset/CB1BCC603DB0416D939B4ED379277F02?$orderby="lastName"` + `GET /rest/Employee/$entityset/CB1BCC603DB0416D939B4ED379277F02?$orderby="lastName"` **Result**: - { - __entityModel: "Employee", - __COUNT: 10, - __SENT: 10, - __FIRST: 0, - __ENTITIES: [ - { - __KEY: "1", - __STAMP: 1, - firstName: "John", - lastName: "Smith", - salary: 90000 - }, - { - __KEY: "2", - __STAMP: 2, - firstName: "Susan", - lastName: "O'Leary", - salary: 80000 - }, - // more entities - ] - } \ No newline at end of file +``` +{ + __entityModel: "Employee", + __COUNT: 10, + __SENT: 10, + __FIRST: 0, + __ENTITIES: [ + { + __KEY: "1", + __STAMP: 1, + firstName: "John", + lastName: "Smith", + salary: 90000 + }, + { + __KEY: "2", + __STAMP: 2, + firstName: "Susan", + lastName: "O'Leary", + salary: 80000 + }, +// more entities + ] +} +``` + diff --git a/website/translated_docs/pt/REST/$querypath.md b/website/translated_docs/pt/REST/$querypath.md index 3489e4309eb966..3d19f6cd3d4385 100644 --- a/website/translated_docs/pt/REST/$querypath.md +++ b/website/translated_docs/pt/REST/$querypath.md @@ -5,7 +5,7 @@ title: '$querypath' Returns the query as it was executed by 4D Server (*e.g.*, `$querypath=true`) -## Description +## Descrição `$querypath` returns the query as it was executed by 4D Server. If, for example, a part of the query passed returns no entities, the rest of the query is not executed. The query requested is optimized as you can see in this `$querypath`. @@ -13,19 +13,18 @@ For more information about query paths, refer to [queryPlan and queryPath](genIn In the steps collection, there is an object with the following properties defining the query executed: -| Property | Type | Description | -| ------------- | ---------- | --------------------------------------------------------------------------- | -| description | String | Actual query executed or "AND" when there are multiple steps | -| time | Number | Number of milliseconds needed to execute the query | -| recordsfounds | Number | Number of records found | -| steps | Collection | An collection with an object defining the subsequent step of the query path | +| Propriedade | Type | Descrição | +| ------------- | ------- | --------------------------------------------------------------------------- | +| description | String | Actual query executed or "AND" when there are multiple steps | +| time | Número | Number of milliseconds needed to execute the query | +| recordsfounds | Número | Number of records found | +| steps | Coleção | An collection with an object defining the subsequent step of the query path | - -## Example +## Exemplo If you passed the following query: -`GET /rest/Employee/$filter="employer.name=acme AND lastName=Jones"&$querypath=true` + `GET /rest/Employee/$filter="employer.name=acme AND lastName=Jones"&$querypath=true` And no entities were found, the following query path would be returned, if you write the following: @@ -33,76 +32,79 @@ And no entities were found, the following query path would be returned, if you w **Response**: - __queryPath: { - - steps: [ - { - description: "AND", - time: 0, - recordsfounds: 0, - steps: [ - { - description: "Join on Table : Company : People.employer = Company.ID", - time: 0, - recordsfounds: 0, - steps: [ - { - steps: [ - { - description: "Company.name = acme", - time: 0, - recordsfounds: 0 - } - ] - } - ] - } - ] - } - ] - - } - +``` +__queryPath: { + + steps: [ + { + description: "AND", + time: 0, + recordsfounds: 0, + steps: [ + { + description: "Join on Table : Company : People.employer = Company.ID", + time: 0, + recordsfounds: 0, + steps: [ + { + steps: [ + { + description: "Company.name = acme", + time: 0, + recordsfounds: 0 + } + ] + } + ] + } + ] + } + ] + +} +``` If, on the other hand, the first query returns more than one entity, the second one will be executed. If we execute the following query: -`GET /rest/Employee/$filter="employer.name=a* AND lastName!=smith"&$querypath=true` + `GET /rest/Employee/$filter="employer.name=a* AND lastName!=smith"&$querypath=true` If at least one entity was found, the following query path would be returned, if you write the following: -`GET /rest/$querypath` + `GET /rest/$querypath` **Respose**: - "__queryPath": { - "steps": [ - { - "description": "AND", - "time": 1, - "recordsfounds": 4, - "steps": [ - { - "description": "Join on Table : Company : Employee.employer = Company.ID", - "time": 1, - "recordsfounds": 4, - "steps": [ - { - "steps": [ - { - "description": "Company.name LIKE a*", - "time": 0, - "recordsfounds": 2 - } - ] - } - ] - }, - { - "description": "Employee.lastName # smith", - "time": 0, - "recordsfounds": 4 - } - ] - } - ] - } \ No newline at end of file +``` +"__queryPath": { + "steps": [ + { + "description": "AND", + "time": 1, + "recordsfounds": 4, + "steps": [ + { + "description": "Join on Table : Company : Employee.employer = Company.ID", + "time": 1, + "recordsfounds": 4, + "steps": [ + { + "steps": [ + { + "description": "Company.name LIKE a*", + "time": 0, + "recordsfounds": 2 + } + ] + } + ] + }, + { + "description": "Employee.lastName # smith", + "time": 0, + "recordsfounds": 4 + } + ] + } + ] +} +``` diff --git a/website/translated_docs/pt/REST/$queryplan.md b/website/translated_docs/pt/REST/$queryplan.md index 377c057321b8ee..7412b9c911cfbe 100644 --- a/website/translated_docs/pt/REST/$queryplan.md +++ b/website/translated_docs/pt/REST/$queryplan.md @@ -6,38 +6,37 @@ title: '$queryplan' Returns the query as it was passed to 4D Server (*e.g.*, `$queryplan=true`) -## Description - +## Descrição $queryplan returns the query plan as it was passed to 4D Server. -| Property | Type | Description | -| -------- | ------ | ------------------------------------------------------------------------------------------- | -| item | String | Actual query executed | -| subquery | Array | If there is a subquery, an additional object containing an item property (as the one above) | - +| Propriedade | Type | Descrição | +| ----------- | ------ | ------------------------------------------------------------------------------------------- | +| item | String | Actual query executed | +| subquery | Array | If there is a subquery, an additional object containing an item property (as the one above) | For more information about query plans, refer to [queryPlan and queryPath](genInfo.md#querypath-and-queryplan). -## Example - +## Exemplo If you pass the following query: -`GET /rest/People/$filter="employer.name=acme AND lastName=Jones"&$queryplan=true` + `GET /rest/People/$filter="employer.name=acme AND lastName=Jones"&$queryplan=true` #### Response: - __queryPlan: { - And: [ - { - item: "Join on Table : Company : People.employer = Company.ID", - subquery: [ - { - item: "Company.name = acme" - } - ] - }, - { - item: "People.lastName = Jones" - } - ] - } \ No newline at end of file +``` +__queryPlan: { + And: [ + { + item: "Join on Table : Company : People.employer = Company.ID", + subquery: [ + { + item: "Company.name = acme" + } + ] + }, + { + item: "People.lastName = Jones" + } + ] +} +``` diff --git a/website/translated_docs/pt/REST/$savedfilter.md b/website/translated_docs/pt/REST/$savedfilter.md index e31a328f969115..dcc489d33bd0f2 100644 --- a/website/translated_docs/pt/REST/$savedfilter.md +++ b/website/translated_docs/pt/REST/$savedfilter.md @@ -5,7 +5,7 @@ title: '$savedfilter' Saves the filter defined by $filter when creating an entity set (*e.g.*, `$savedfilter="{filter}"`) -## Description +## Descrição When you create an entity set, you can save the filter that you used to create it as a measure of security. If the entity set that you created is removed from 4D Server's cache (due to the timeout, the server's need for space, or your removing it by calling [`$method=release`]($method.md#methodrelease)). @@ -15,7 +15,7 @@ If the entity set is no longer in 4D Server's cache, it will be recreated with a If you have used both `$savedfilter` and [`$savedorderby`]($savedorderby.md) in your call when creating an entity set and then you omit one of them, the new entity set, which will have the same reference number, will reflect that. -## Example +## Exemplo In our example, we first call ``$savedfilter` with the initial call to create an entity set as shown below: @@ -23,4 +23,4 @@ In our example, we first call ``$savedfilter` with the initial call to create an Then, when you access your entity set, you write the following to ensure that the entity set is always valid: -`GET /rest/People/$entityset/AEA452C2668B4F6E98B6FD2A1ED4A5A8?$savedfilter="employer.name=Apple"` \ No newline at end of file +`GET /rest/People/$entityset/AEA452C2668B4F6E98B6FD2A1ED4A5A8?$savedfilter="employer.name=Apple"` diff --git a/website/translated_docs/pt/REST/$savedorderby.md b/website/translated_docs/pt/REST/$savedorderby.md index 4788e9abc6d5e6..609c6bbecb12d8 100644 --- a/website/translated_docs/pt/REST/$savedorderby.md +++ b/website/translated_docs/pt/REST/$savedorderby.md @@ -5,7 +5,7 @@ title: '$savedorderby' Saves the order by defined by `$orderby` when creating an entity set (*e.g.*, `$savedorderby="{orderby}"`) -## Description +## Descrição When you create an entity set, you can save the sort order along with the filter that you used to create it as a measure of security. If the entity set that you created is removed from 4D Server's cache (due to the timeout, the server's need for space, or your removing it by calling [`$method=release`]($method.md#methodrelease)). @@ -13,12 +13,11 @@ You use `$savedorderby` to save the order you defined when creating your entity If the entity set is no longer in 4D Server's cache, it will be recreated with a new default timeout of 10 minutes. If you have used both [`$savedfilter`]($savedfilter.md) and `$savedorderby` in your call when creating an entity set and then you omit one of them, the new entity set, having the same reference number, will reflect that. -## Example - +## Exemplo You first call `$savedorderby` with the initial call to create an entity set: -`GET /rest/People/?$filter="lastName!=''"&$savedfilter="lastName!=''"&$orderby="salary"&$savedorderby="salary"&$method=entityset` + `GET /rest/People/?$filter="lastName!=''"&$savedfilter="lastName!=''"&$orderby="salary"&$savedorderby="salary"&$method=entityset` Then, when you access your entity set, you write the following (using both $savedfilter and $savedorderby) to ensure that the filter and its sort order always exists: -`GET /rest/People/$entityset/AEA452C2668B4F6E98B6FD2A1ED4A5A8?$savedfilter="lastName!=''"&$savedorderby="salary"` \ No newline at end of file +`GET /rest/People/$entityset/AEA452C2668B4F6E98B6FD2A1ED4A5A8?$savedfilter="lastName!=''"&$savedorderby="salary"` diff --git a/website/translated_docs/pt/REST/$skip.md b/website/translated_docs/pt/REST/$skip.md index 0b512bc38e6568..514f8dbc60f560 100644 --- a/website/translated_docs/pt/REST/$skip.md +++ b/website/translated_docs/pt/REST/$skip.md @@ -5,14 +5,15 @@ title: '$skip' Starts the entity defined by this number in the collection (*e.g.*, `$skip=10`) -## Description + +## Descrição `$skip` defines which entity in the collection to start with. By default, the collection sent starts with the first entity. To start with the 10th entity in the collection, pass 10. -`$skip` is generally used in conjunction with [`$top/$limit`]($top_$limit.md) to navigate through an entity collection. +`$skip` is generally used in conjunction with [`$top/$limit`]($top_$limit.md) to navigate through an entity collection. -## Example +## Exemplo In the following example, we go to the 20th entity in our entity set: -`GET /rest/Employee/$entityset/CB1BCC603DB0416D939B4ED379277F02?$skip=20` \ No newline at end of file + `GET /rest/Employee/$entityset/CB1BCC603DB0416D939B4ED379277F02?$skip=20` \ No newline at end of file diff --git a/website/translated_docs/pt/REST/$timeout.md b/website/translated_docs/pt/REST/$timeout.md index 2eac9ac71f3f27..e6ad27591f5c15 100644 --- a/website/translated_docs/pt/REST/$timeout.md +++ b/website/translated_docs/pt/REST/$timeout.md @@ -6,7 +6,7 @@ title: '$timeout' Defines the number of seconds to save an entity set in 4D Server's cache (*e.g.*, `$timeout=1800`) -## Description +## Descrição To define a timeout for an entity set that you create using [`$method=entityset`]($method.md#methodentityset), pass the number of seconds to `$timeout`. For example, if you want to set the timeout to 20 minutes, pass 1200. By default, the timeout is two (2) hours. @@ -14,7 +14,7 @@ Once the timeout has been defined, each time an entity set is called upon (by us If an entity set is removed and then recreated using `$method=entityset` along with [`$savedfilter`]($savedfilter.md), the new default timeout is 10 minutes regardless of the timeout you defined when calling `$timeout`. -## Example +## Exemplo In our entity set that we're creating, we define the timeout to 20 minutes: diff --git a/website/translated_docs/pt/REST/$top_$limit.md b/website/translated_docs/pt/REST/$top_$limit.md index 8539277f771f3e..c83ffea8d7a667 100644 --- a/website/translated_docs/pt/REST/$top_$limit.md +++ b/website/translated_docs/pt/REST/$top_$limit.md @@ -5,13 +5,13 @@ title: '$top/$limit' Limits the number of entities to return (e.g., `$top=50`) -## Description +## Descrição `$top/$limit` defines the limit of entities to return. By default, the number is limited to 100. You can use either keyword: `$top` or `$limit`. When used in conjunction with [`$skip`]($skip.md), you can navigate through the entity selection returned by the REST request. -## Example +## Exemplo In the following example, we request the next ten entities after the 20th entity: diff --git a/website/translated_docs/pt/REST/$upload.md b/website/translated_docs/pt/REST/$upload.md index 0e91db31a213c7..0be5be0ccb1864 100644 --- a/website/translated_docs/pt/REST/$upload.md +++ b/website/translated_docs/pt/REST/$upload.md @@ -6,53 +6,55 @@ title: '$upload' Returns an ID of the file uploaded to the server -## Description - +## Descrição Post this request when you have a file that you want to upload to the Server. If you have an image, you pass `$rawPict=true`. For all other files, you pass `$binary=true`. You can modify the timeout, which by default is 120 seconds, by passing a value to the `$timeout parameter`. ## Image upload example - To upload an image, you must first select the file object on the client using the HTML 5 built-in API for using file from a web application. 4D uses the MIME type attribute of the file object so it can handle it appropriately. Then, we upload the selected image to 4D Server: -`POST /rest/$upload?$rawPict=true` + `POST /rest/$upload?$rawPict=true` **Result**: `{ "ID": "D507BC03E613487E9B4C2F6A0512FE50" }` -Afterwards, you use this ID to add it to an attribute using [`$method=update`]($method.md#methodupdate) to add the image to an entity: + Afterwards, you use this ID to add it to an attribute using [`$method=update`]($method.md#methodupdate) to add the image to an entity: -`POST /rest/Employee/?$method=update` + `POST /rest/Employee/?$method=update` **POST data**: - { - __KEY: "12", - __STAMP: 4, - photo: { "ID": "D507BC03E613487E9B4C2F6A0512FE50" } - } - +```` +{ + __KEY: "12", + __STAMP: 4, + photo: { "ID": "D507BC03E613487E9B4C2F6A0512FE50" } +} +```` **Response**: The modified entity is returned: +```` +{ + "__KEY": "12", + "__STAMP": 5, + "uri": "http://127.0.0.1:8081/rest/Employee(12)", + "ID": 12, + "firstName": "John", + "firstName": "Smith", + "photo": { - "__KEY": "12", - "__STAMP": 5, - "uri": "http://127.0.0.1:8081/rest/Employee(12)", - "ID": 12, - "firstName": "John", - "firstName": "Smith", - "photo": + "__deferred": { - "__deferred": - { - "uri": "/rest/Employee(12)/photo?$imageformat=best&$version=1&$expand=photo", - "image": true - } - },} \ No newline at end of file + "uri": "/rest/Employee(12)/photo?$imageformat=best&$version=1&$expand=photo", + "image": true + } + },} +```` + diff --git a/website/translated_docs/pt/REST/$version.md b/website/translated_docs/pt/REST/$version.md index 65ebdc2d1058ed..63a6b3da76f695 100644 --- a/website/translated_docs/pt/REST/$version.md +++ b/website/translated_docs/pt/REST/$version.md @@ -5,14 +5,14 @@ title: '$version' Image version number -## Description +## Descrição `$version` is the image's version number returned by the server. The version number, which is sent by the server, works around the browser's cache so that you are sure to retrieve the correct image. The value of the image's version parameter is modified by the server. -## Example +## Exemplo The following example defines the image format to JPEG regardless of the actual type of the photo and passes the actual version number sent by the server: -`GET /rest/Employee(1)/photo?$imageformat=jpeg&$version=3&$expand=photo` \ No newline at end of file + `GET /rest/Employee(1)/photo?$imageformat=jpeg&$version=3&$expand=photo` \ No newline at end of file diff --git a/website/translated_docs/pt/REST/REST_requests.md b/website/translated_docs/pt/REST/REST_requests.md index ab8853e5d90abd..e7953880c2433c 100644 --- a/website/translated_docs/pt/REST/REST_requests.md +++ b/website/translated_docs/pt/REST/REST_requests.md @@ -1,12 +1,12 @@ --- id: REST_requests -title: About REST Requests +title: Sobre petições REST --- -The following structures are supported for REST requests: +As estrutyuras abaixo são compatíveis com petições REST: -| URI | Resource | {Subresource} | {Querystring} | +| URI | Recurso | {Subresource} | {Querystring} | | -------------------------------- | --------------------------------------------------------------------------- | -------------------------------------------------------------------------- | --------------------------------------------------------------- | | http://{servername}:{port}/rest/ | [{dataClass}](%7BdataClass%7D.html)/ | [{attribute1, attribute2, ...}](manData.html#selecting-attributes-to-get)/ | | | | [{dataClass}](%7BdataClass%7D.html)/ | [{attribute1, attribute2, ...}](manData.html#selecting-attributes-to-get)/ | [{method}](%7BdataClass%7D.html#dataclassmethod) | @@ -20,38 +20,38 @@ The following structures are supported for REST requests: | | [$info]($info.md) | | | -While all REST requests must contain the URI and Resource parameters, the Subresource (which filters the data returned) is optional. +Todas as petições REST devem conter os parâmetros URI e Resource, mas o parâmetro Subresource (que filtra os dados retornados) é opcional. -As with all URIs, the first parameter is delimited by a “?” and all subsequent parameters by a “&”. For example: +Como com todas as URIs, o primeiro parâmetro é definido por um “?” e todos os parâmetros subsequentes por “&”. Por exemplo: -`GET /rest/Person/?$filter="lastName!=Jones"&$method=entityset&$timeout=600` + `GET /rest/Person/?$filter="lastName!=Jones"&$method=entityset&$timeout=600` +> Pode colocar todos os valores entre aspas para evitar ambiguidades. Por exemplo, no exemplo anterior, poderíamos colocar o valor para o último nome em aspas simples: "lastName!='Jones'". -> You can place all values in quotes in case of ambiguity. For example, in our above example, we could have put the value for the last name in single quotes: "lastName!='Jones'". +Os parâmetros permitem que manipule dados em dataclasses em seu projeto 4D. Além de recuperar dados usando métodos HTTP`GET`, também pode adicionar, atualizar e apagar entidades em uma dataclass usando os métodos HTTP `POST`. -The parameters allow you to manipulate data in dataclasses in your 4D project. Besides retrieving data using `GET` HTTP methods, you can also add, update, and delete entities in a datastore class using `POST` HTTP methods. +Se quiser que os dados sejam retornados em um array ao invés de um JSON, use o parâmetro [`$asArray`]($asArray.md). -If you want the data to be returned in an array instead of JSON, use the [`$asArray`]($asArray.md) parameter. -## REST Status and Response +## Estado e resposta REST +Com cada petição REST, o servidor retorna o estado e uma resposta (com ou sem um erro). -With each REST request, the server returns the status and a response (with or without an error). +### Estado da petição +Com cada petição REST, se obtém o estado junto com a resposta. Abaixo estão alguns estados que podem surgir: -### Request Status +| Estado | Descrição | +| ------------------------- | --------------------------------------------------------------------------------- | +| 0 | Petição não processada (servidor pode não ter iniciado). | +| 200 OK | Petição processada sem erro. | +| 401 Unauthorized | Erro de autorização (verifique as permissões do usuário). | +| 402 No session | Número máximo de sessões foi alcançado. | +| 404 Not Found | A classe de dados não é acessível via REST ou o conjunto de entidades não existe. | +| 500 Internal Server Error | Erro processando a petição REST. | -With each REST request, you get the status along with the response. Below are a few of the statuses that can arise: +### Resposta -| Status | Description | -| ------------------------- | -------------------------------------------------------------------------- | -| 0 | Request not processed (server might not be started). | -| 200 OK | Request processed without error. | -| 401 Unauthorized | Permissions error (check user's permissions). | -| 402 No session | Maximum number of sessions has been reached. | -| 404 Not Found | The data class is not accessible via REST or the entity set doesn't exist. | -| 500 Internal Server Error | Error processing the REST request. | +A resposta (em formato JSON) varia dependendo da petição. +Se um erro surgir, será enviado junto com a resposta do servidor ou será a resposta do servidor. -### Response + -The response (in JSON format) varies depending on the request. - -If an error arises, it will be sent along with the response from the server or it will be the response from the server. \ No newline at end of file diff --git a/website/translated_docs/pt/REST/authUsers.md b/website/translated_docs/pt/REST/authUsers.md index fab3ebc1f758ff..ba33ec0c88dfb1 100644 --- a/website/translated_docs/pt/REST/authUsers.md +++ b/website/translated_docs/pt/REST/authUsers.md @@ -6,80 +6,69 @@ title: Users and sessions ## Authenticating users -As a first step to open a REST session on the 4D server, the user sending the request must be authenticated. +Como primeiro passo para abrir uma sessão REST no servidor 4D, o usuário que envia a solicitude deve estar autenticado. -You log in a user to your application by passing the user's name and password to [`$directory/login`]($directory.md#directorylogin). +Pode iniciar a sessão de um usuário em sua aplicação passando o nome e a senhar de usuário em [`$directory/login`]($directory.md#directorylogin). -Once a user is successfully logged, a session is open. See below to know how to handle the session cookie in subsequent client requests, if necessary. +Quando um usuário registrar com sucesso, se abre uma sessão. Veja abaixo para saber como manejar o cookie da sessão nas seguintes petições de cliente se for necessário. -The session will automatically be closed once the timeout is reached. +A sessão se fechará automaticamente quando alcançar o tempo de espera. -## Session cookie +## Cookie de sessão -Each REST request is handled through a specific session on the 4D server. +Cada petição REST se gerencia por uma sessão específica no servidor 4D. -When a first valid REST request is received, the server creates the session and sends a session cookie named `WASID4D` in the **"Set-Cookie" response header**, containing the session UUID, for example: +Quando se recebe uma primeira petição REST válida, o servidor cria a sessão e envia uma cookie de sessão chamada `WASID4D` no cabeçalho de resposta **"Set-Cookie"**, que contém o UUID da sessão, por exemplo: - WASID4D=EA0400C4D58FF04F94C0A4XXXXXX3 - +``` +WASID4D=EA0400C4D58FF04F94C0A4XXXXXX3 +``` -In the subsequent REST requests, make sure this cookie is included in the **"Cookie" request header** so that you will reuse the same session. Otherwise, a new session will be opened, and another license used. +Nas seguintes petições REST, tenha certeza de que esta cookie se inclua no **cabeçalho "Cookie"** com o fim de reutilizar a mesma sessão. Em caso contrário, se abrirá uma nova sessão e se utilizará outra licença. -### Example +### Exemplo -The way to handle session cookies actually depends on your HTTP client. This example shows how to extract and resend the session cookie in the context of requests handled through the 4D `HTTP Request` command. +A gestão de cookies de sessão depende de seu cliente HTTP. Este exemplo mostra como extrair e reenviar a cookie de sessão no contexto das petições gestionadas através do comando 4D `HTTP Request`. ```4d -// Creating headers ARRAY TEXT(headerNames;0) -ARRAY TEXT(headerValues;0) - -APPEND TO ARRAY(headerNames;"username-4D") +ARRAY TEXT(headerValues;0) APPEND TO ARRAY(headerNames;"username-4D") APPEND TO ARRAY(headerNames;"session-4D-length") -APPEND TO ARRAY(headerNames;"hashed-password-4D") - -APPEND TO ARRAY(headerValues;"kind user") +APPEND TO ARRAY(headerNames;"hashed-password-4D") APPEND TO ARRAY(headerValues;"kind user") APPEND TO ARRAY(headerValues;"60") -APPEND TO ARRAY(headerValues;Generate digest("test";4D digest)) - -C_OBJECT($response) +APPEND TO ARRAY(headerValues;Generate digest("test";4D digest)) C_OBJECT($response) $response:=New object -//This request opens a session for the user "kind user" +//Esta petição abre uma sessão para o usuário "kind user" $result:=HTTP Request(HTTP POST method;"127.0.0.1:8044/rest/$directory/login";"";\ $response;headerNames;headerValues;*) -//Build new arrays for headers with only the cookie WASID4D +//Criar novos arrays para os cabeçalhos com apenas o cookie WASID4D buildHeader(->headerNames;->headerValues) -//This other request will not open a new session +//Esta outra petição não abrirá uma nova sessão $result:=HTTP Request(HTTP GET method;"127.0.0.1:8044/rest/$catalog";"";\ $response;headerNames;headerValues;*) ``` ```4d -// buildHeader project method - -C_POINTER($pointerNames;$1;$pointerValues;$2) +// método projeto buildHeader C_POINTER($pointerNames;$1;$pointerValues;$2) ARRAY TEXT($headerNames;0) -ARRAY TEXT($headerValues;0) - -COPY ARRAY($1->;$headerNames) +ARRAY TEXT($headerValues;0) COPY ARRAY($1->;$headerNames) COPY ARRAY($2->;$headerValues) $indexCookie:=Find in array($headerValues;"WASID4D@") $cookie:=$headerValues{$indexCookie} $start:=Position("WASID4D";$cookie) $end:=Position(";";$cookie) -$uuid:= Substring($cookie;$start;$end-$start) - -ARRAY TEXT($headerNames;1) +$uuid:= Substring($cookie;$start;$end-$start) ARRAY TEXT($headerNames;1) ARRAY TEXT($headerValues;1) $headerNames{1}:="Cookie" -$headerValues{1}:=$uuid - -COPY ARRAY($headerNames;$1->) +$headerValues{1}:=$uuid COPY ARRAY($headerNames;$1->) COPY ARRAY($headerValues;$2->) -``` \ No newline at end of file +``` + + + diff --git a/website/translated_docs/pt/REST/configuration.md b/website/translated_docs/pt/REST/configuration.md index 74e38a86a6e29e..c8306dc4789a90 100644 --- a/website/translated_docs/pt/REST/configuration.md +++ b/website/translated_docs/pt/REST/configuration.md @@ -3,84 +3,88 @@ id: configuration title: Server Configuration --- -Using standard HTTP requests, the 4D REST Server allows external applications to access the data of your database directly, *i.e.* to retrieve information about the dataclasses in your project, manipulate data, log into your web application, and much more. +Utilizando petições HTTP padrão, o servidor 4D REST permite às aplicações externas acessar diretamente aos dados de seu banco, *ou seja, *recuperar informação sobre as classes de dados de seu projeto, manipular dados, entrar em sua aplicação web, e muito mais. -To start using the REST features, you need to start and configure the 4D REST server. +Para iniciar usando as funcionalidades REST, precisa iniciar e configurar o servidor 4D REST. -> - On 4D Server, opening a REST session requires that a free 4D client licence is available. -> -> - On 4D single-user, you can open up to three REST sessions for testing purposes. -> You need to manage the [session cookie](authUsers.md#session-cookie) to use the same session for your requesting application. +> - Em 4D Server, abrir uma sessão REST exige que uma licença cliente 4D free esteja disponível.
    +> - Em 4D monousuário é possível abrir até três sessões REST com objetivo de testes. +> É preciso gerenciar [o cookie de sessão](authUsers.md#session-cookie) para usar a mesma sessão para sua aplicação peticionante. -## Starting the REST Server -For security reasons, by default, 4D does not respond to REST requests. If you want to start the REST Server, you must check the **Expose as REST server** option in the "Web/REST resource" page of the database settings in order for REST requests to be processed. + +## Iniciar o servidor REST + +Por razões de segurança, o padrão de 4D é não responder a petições REST. Se quiser iniciar o servidor REST, precisa marcar a opção **Expose as REST server** na página "Web/REST resource" das configurações de banco de dados para que as petições REST sejam processadas.. ![alt-text](assets/en/REST/Settings.png) -> REST services use the 4D HTTP server, so you need to make sure that the 4D Web server is started. +> Serviços REST usam o servidor 4D HTTP, por isso precisa ter certeza que o servidor 4D Web Server foi iniciado. + +A mensagem de aviso "Atenção, verifique os privilégios de acesso" é exibida quando checar essa opção para chamar atenção para o fato que os serviços REST foram ativados, como padrão acessar os objetos de banco de dados é grátis desde que os acessos REST não tenham sido configurados. + + +## Configuração de acesso REST -The warning message "Caution, check the access privileges" is displayed when you check this option to draw your attention to the fact that when REST services are activated, by default access to database objects is free as long as the REST accesses have not been configured. +Como padrão, acessos REST são abertos a todos os usuários que são obviamente não configurados para razões de segurança e também para controlar uso de licenças de cliente. -## Configuring REST access +Pode configurar os acessos REST de uma das maneiras abaixo: +- Atribuir um grupo de usuários **Read/Write** para serviços REST na página "Web/REST das Configurações de banco de dados; +- escrever um método de database `On REST Authentication` para interceptar e manejar qualquer petição inicial REST. -By default, REST accesses are open to all users which is obviously not recommended for security reasons, and also to control client licenses usage. +> Não pode usar as duas funcionalidades ao mesmo tempo. Quando um método de banco de dados `On REST Authentication` for definido, 4D delega controle de petições REST totalmente para ele: qualquer configuração feita usando o menu "Read/Write" na página Web/REST resource das configurações de banco de dados será ignorada. -You can configuring REST accesses with one of the following means: -- assigning a **Read/Write** user group to REST services in the "Web/REST resource" page of the Database Settings; -- writing an `On REST Authentication` database method to intercept and handle every initial REST request. +### Utilização dos parâmetros de la base -> You cannot use both features simultaneously. Once an `On REST Authentication` database method has been defined, 4D fully delegates control of REST requests to it: any setting made using the "Read/Write" menu on the Web/REST resource page of the Database Settings is ignored. +O menu **Read/Write** na página "Web/REST resource" das configurações de banco de dados especifica um grupo de usuários 4D que está autorizado a estabelecer o link com o banco de dados 4D usando pesquisas REST. -### Using the Database settings +Como padrão, o menu mostra ****, o que significa que os acessos REST estão abertos a todos os usuários. Quando tiver especificado um grupo, só contas de usuários 4D que pertençam ao grupo podem ser usadas [acesso a 4D através de petições REST](authUsers.md). Se uma conta for usada que não pertença a esse grupo, 4D retorna um erro de autenticação para o emissor da petição. -The **Read/Write** menu in the "Web/REST resource" page of the database settings specifies a group of 4D users that is authorized to establish the link to the 4D database using REST queries. +> Para essa configuração funcionar, o método de database `On REST Authentication` não deve ser definido. Se existir, 4D ignora os parâmetros de aceso definidos nas propriedades do banco de dados. -By default, the menu displays ****, which means that REST accesses are open to all users. Once you have specified a group, only a 4D user account that belongs to this group may be used to [access 4D by means of a REST request](authUsers.md). If an account is used that does not belong to this group, 4D returns an authentication error to the sender of the request. +### Método base On REST Authentication +O método database `On REST Authentication` lhe oferece uma forma personalizada de controlar a abertura de sessões REST em 4D. Esse método de banco de dados é chamado automaticamente quando uma nova sessão for aberta através da petição REST. Quando receber uma [solicitação para abrir uma sessão REST](authUsers.md), os identificadores de conexão são oferecidos no cabeçalho da solicitação. O método database `On REST Authentication` é chamado para poder avaliar estes identificadores. Pode utilizar a lista de usuários do banco 4D ou pode utilizar sua própria tabela de identificadores. Para obter mais informação, consulte a [documentación](https://doc.4d.com/4Dv18/4D/18/On-REST-Authentication-database-method.301-4505004.en.html) do método database`On REST Authentication`. -> In order for this setting to take effect, the `On REST Authentication` database method must not be defined. If it exists, 4D ignores access settings defined in the Database Settings. -### Using the On REST Authentication database method -The `On REST Authentication` database method provides you with a custom way of controlling the opening of REST sessions on 4D. This database method is automatically called when a new session is opened through a REST request. When a [request to open a REST session](authUsers.md) is received, the connection identifiers are provided in the header of the request. The `On REST Authentication` database method is called so that you can evaluate these identifiers. You can use the list of users for the 4D database or you can use your own table of identifiers. For more information, refer to the `On REST Authentication` database method [documentation](https://doc.4d.com/4Dv18/4D/18/On-REST-Authentication-database-method.301-4505004.en.html). +## Expor tabelas e campos -## Exposing tables and fields +Quando serviços REST estiverem ativados no banco de dados 4D, como padrão uma sessão REST pode acessar todas as tabelas e campos da datastore, e assim usar seus dados. Por exemplo, se seu banco de dados conter uma tabela [Employee], é possível escrever: -Once REST services are enabled in the 4D database, by default a REST session can access all tables and fields of the datastore, and thus use their data. For example, if your database contains an [Employee] table, it is possible to write: +``` +http://127.0.0.1:8044/rest/Employee/?$filter="salary>10000" - http://127.0.0.1:8044/rest/Employee/?$filter="salary>10000" - - +``` +Esta petição devolverá todos os empregados cujo campo de salario seja superior a 10000. -This request will return all employees whose salary field is higher than 10000. +> As tabelas ou campos 4D que tenham o atributo "Invisível" também são expostas em REST por padrão. -> 4D tables and/or fields that have the "Invisible" attribute are also exposed in REST by default. +Se quiser personalizar os objetos de datastore acessíveis através de REST, deve desativar a exposição para cada tabela ou campo que queira esconder. Quando uma petição REST tentar acessar um recurso não autorizado, 4D devolve um erro. -If you want to customize the datastore objects accessible through REST, you must disable the exposure of each table and/or field that you want to hide. When a REST request attempts to access an unauthorized resource, 4D returns an error. +### Expor as tabelas -### Exposing tables +Como padrão, todas as tabelas são expostas em REST. -By default, all tables are exposed in REST. +Por razões de segurança, pode querer expor apenas algumas tabelas em sua datastore para as chamadas REST. Por exemplo, se criar uma tabela [Users] que armazene os nomes de usuário e as senhas, seria melhor não deixá-la exposta. -For security reasons, you may want to only expose certain tables of your datastore to REST calls. For instance, if you created a [Users] table storing user names and passwords, it would be better not to expose it. +Para remover a exposição REST para uma tabela: -To remove the REST exposure for a table: +1. Visualizar o inspetor de Tabelas no editor de Estrutura e selecionar a tabela que quiser modfiicar. -1. Display the Table Inspector in the Structure editor and select the table you want to modify. +2. Desmarque a opção **Expor como recurso REST**: ![alt-text](assets/es/REST/table.png) Faça isso para cada tabela cuja exposição deva ser modificada. -2. Uncheck the **Expose as REST resource** option: ![alt-text](assets/en/REST/table.png) Do this for each table whose exposure needs to be modified. -### Exposing fields +### Expor campos -By default, all 4D database fields are exposed in REST. +Como padrão, todos os campos 4D database são expostos em REST. -You may not want to expose certain fields of your tables to REST. For example, you may not want to expose the [Employees]Salary field. +Pode querer expor certos campos de suas tabelas para REST. Por exemplo, é possível que não queira expor o campo [Employees]Salary. -To remove the REST exposure for a field: +Para eliminar a exposição REST de um campo: -1. Display the Field Inspector in the Structure editor and select the field you want to modify. +1. Exibar o inspetor de Campo no editor de Estruturas e selecione o campo a modificar. -2. Uncheck the **Expose as REST resource** for the field. ![alt-text](assets/en/REST/field.png) Repeat this for each field whose exposure needs to be modified. +2. Desmarque a opção **Expor como recurso REST** para o campo. ![alt-text](assets/en/REST/field.png) Repita esta operação para cada campo cuja exposição deva modificar-se. -> In order for a field to be accessible through REST, the parent table must be as well. If the parent table is not exposed, none of its fields will be, regardless of their status. \ No newline at end of file +> Para que um campo seja accessível a través de REST, a tabela pai também deve ser. Se a tabela pai não estiver exposta, nenhum dos campos estará, independente de seu estado. diff --git a/website/translated_docs/pt/REST/genInfo.md b/website/translated_docs/pt/REST/genInfo.md index 7c1fea10deeb26..400999a02b3c19 100644 --- a/website/translated_docs/pt/REST/genInfo.md +++ b/website/translated_docs/pt/REST/genInfo.md @@ -1,36 +1,36 @@ --- id: genInfo -title: Getting Server Information +title: Obter informação do servidor --- -You can get several information from the REST server: +Pode obter várias informações do servidor REST: -- the exposed datastores and their attributes -- the REST server cache contents, including user sessions. +- os bancos expostos e seus atributos +- os conteúdos de cache do servidor REST, incluindo sessões de usuário. -## Catalog +## Catálogo -Use the [`$catalog`]($catalog.md), [`$catalog/{dataClass}`]($catalog.md#catalogdataclass), or [`$catalog/$all`]($catalog.md#catalogall) parameters to get the list of [exposed datastore classes and their attributes](configuration.md#exposing-tables-and-fields). +Utilize os parâmetros [`$catalog`]($catalog.md), [`$catalog/{dataClass}`]($catalog.md#catalogdataclass), o [`$catalog/$all`]($catalog.md#catalogall) para obter a lista de [as classes de dados expostas e seus atributos](configuration.md#exposing-tables-and-fields). -To get the collection of all exposed dataclasses along with their attributes: +Para obter a coleção de todas as classes de dados expostas junto com seus atributos: `GET /rest/$catalog/$all` -## Cache info -Use the [`$info`]($info.md) parameter to get information about the entity selections currently stored in 4D Server's cache as well as running user sessions. +## Informação de Cache -## queryPath and queryPlan +Use o parâmetro [`$info`]($info.md) para obter informações sobre as seleções de entidade armazenadas atualmente na cache de 4D Server' assim como sobre a execução de sessões de usuário. -Entity selections that are generated through queries can have the following two properties: `queryPlan` and `queryPath`. To calculate and return these properties, you just need to add [`$queryPlan`]($queryplan.md) and/or [`$queryPath`]($querypath.md) in the REST request. +## queryPath e queryPlan -For example: +As seleções de entidade que são geradas através de pesquisas podem ter duas propriedades : `queryPlan` e `queryPath`. Para calcular e retornar essas propriedades, precisa apenas adicionar um [`$queryPlan`]($queryplan.md) ou [`$queryPath`]($querypath.md) na petição REST. -`GET /rest/People/$filter="employer.name=acme AND lastName=Jones"&$queryplan=true&$querypath=true` +Por exemplo: -These properties are objects that contain information about how the server performs composite queries internally through dataclasses and relations: +`GET /rest/People/$filter="employer.name=acme AND lastName=Jones"&$queryplan=true&$querypath=true` -- **queryPlan**: object containing the detailed description of the query just before it was executed (i.e., the planned query). -- **queryPath**: object containing the detailed description of the query as it was actually performed. +Essas propriedades são objetos que contém informação sobre como o servidor realiza pesquisas compostas internamente através de dataclasses e relações: +- **queryPlan**: objeto contendo a descrição detalhada da pesquisa logo antes de ser executada (ou seja, a pesquisa planejada). +- **queryPath**: objeto contendo a descrição detalhada da pesquisa como foi realizada. -The information recorded includes the query type (indexed and sequential) and each necessary subquery along with conjunction operators. Query paths also contain the number of entities found and the time required to execute each search criterion. You may find it useful to analyze this information while developing your application. Generally, the description of the query plan and its path are identical but they can differ because 4D can implement dynamic optimizations when a query is executed in order to improve performance. For example, the 4D engine can dynamically convert an indexed query into a sequential one if it estimates that it is faster. This particular case can occur when the number of entities being searched for is low. \ No newline at end of file +A informação registrada inclui o tipo de pesquisa (indexada e sequencial) e cada subpesquisa necessária junto com operações de conjunção. As rotas de acesso das petições também contém o número de entidades encontradas e o tempo necessário para executar cada critério de pesquisa. Pode ser útil analisar essa informação enquanto desenvolve sua aplicação. Geralmente a descrição do plano de pesquisa e sua rota são idênticas mas podem ser diferentes porque 4D pode implementar otimizações dinâmicas quando uma pesquisa for executada para melhorar a performance. Por exemplo, o motor 4D pode converter dinamicamente uma consulta indexada em uma consulta sequencial se estimar que seja mais rápido. Esse caso particular pode acontecer quando o número de entidades sendo pesquisada é baixo. \ No newline at end of file diff --git a/website/translated_docs/pt/REST/gettingStarted.md b/website/translated_docs/pt/REST/gettingStarted.md index fa4aa595dd5b63..654722bb10ff7b 100644 --- a/website/translated_docs/pt/REST/gettingStarted.md +++ b/website/translated_docs/pt/REST/gettingStarted.md @@ -1,130 +1,138 @@ --- id: gettingStarted -title: Getting Started +title: Começando --- -4D provides you with a powerful REST server, that allows direct access to data stored in your 4D databases. +4D oferece um servidor REST poderoso que permite acesso direto aos dados armazenadas em seus bancos 4D. -The REST server is included in the 4D and 4D Server applications, it is automatically available in your 4D databases [once it is configured](configuration.md). +O servidor REST está incluído nas aplicações 4D e 4D Server, e disponível automaticamente em seus bancos 4D [logo após ser configurado](configuration.md). -This section is intended to help familiarize you with REST functionality by means of a simple example. We are going to: +Esta seção tem o objetivo de familiarizar com as funcionalidades REST com um exemplo simples. Nós vamos: +- criar e configurar um banco de dados 4D simples +- acessar aos dados do banco 4D através de REST usando um navegador padrão. -- create and configure a basic 4D database -- access data from the 4D database through REST using a standard browser. +Para simplificar o exemplo, vamos usar uma aplicação 4D e um navegador que são executados na mesma máquina. Também poderia usar uma arquitetura remota. -To keep the example simple, we’re going to use a 4D application and a browser that are running on the same machine. Of course, you could also use a remote architecture. -## Creating and configuring the 4D database -1. Launch your 4D or 4D Server application and create a new database. You can name it "Emp4D", for example. +## Criar e configurar o banco de dados 4D -2. In the Structure editor, create an [Employees] table and add the following fields to it: - +1. Lançar sua aplicação 4D ou 4D server e criar um novo banco de dados. Pode chamar de "Emp4D", por exemplo. + +2. No editor de Estrutura, crie uma [Employees] tabela e adicione os campos abaixo: - Lastname (Alpha) - Firstname (Alpha) - Salary (Longint) ![](assets/en/REST/getstarted1.png) -> The "Expose a REST resource" option is checked by default for the table and every field; do not change this setting. +> A opção "Expor um recurso REST" está marcada por definição para a tabela e cada campo; não mude essa configuração. -3. Create forms, then create a few employees: +3. Crie formulários depois crie alguns funcionários: ![](assets/en/REST/getstarted2.png) -4. Display the **Web/REST resource** page of the Database Settings dialog box and [check the Expose as REST server](configuration.md#starting-the-rest-server) option. - -5. In the **Run** menu, select **Start Web Server** (if necessary), then select **Test Web Server**. - -4D displays the default home page of the 4D Web Server. - -## Accessing 4D data through the browser - -You can now read and edit data within 4D only through REST requests. - -Any 4D REST URL request starts with `/rest`, to be inserted after the `address:port` area. For example, to see what's inside the 4D datastore, you can write: - - http://127.0.0.1/rest/$catalog - - -The REST server replies: - - { - "__UNIQID": "96A49F7EF2ABDE44BF32059D9ABC65C1", - "dataClasses": [ - { - "name": "Employees", - "uri": "/rest/$catalog/Employees", - "dataURI": "/rest/Employees" - } - ] - } - - -It means that the datastore contains the Employees dataclass. You can see the dataclass attributes by typing: - - /rest/$catalog/Employees - - -If you want to get all entities of the Employee dataclass, you write: - - /rest/Employees - - -**Response:** - - { - "__entityModel": "Employees", - "__GlobalStamp": 0, - "__COUNT": 3, - "__FIRST": 0, - "__ENTITIES": [ - { - "__KEY": "1", - "__TIMESTAMP": "2020-01-07T17:07:52.467Z", - "__STAMP": 2, - "ID": 1, - "Lastname": "Brown", - "Firstname": "Michael", - "Salary": 25000 - }, - { - "__KEY": "2", - "__TIMESTAMP": "2020-01-07T17:08:14.387Z", - "__STAMP": 2, - "ID": 2, - "Lastname": "Jones", - "Firstname": "Maryanne", - "Salary": 35000 - }, - { - "__KEY": "3", - "__TIMESTAMP": "2020-01-07T17:08:34.844Z", - "__STAMP": 2, - "ID": 3, - "Lastname": "Smithers", - "Firstname": "Jack", - "Salary": 41000 - } - ], - "__SENT": 3 - } - - -You have many possibilities to filter data to receive. For example, to get only the "Lastname" attribute value from the 2nd entity, you can just write: - - /rest/Employees(2)/Lastname - - -**Response:** - - { - "__entityModel": "Employees", - "__KEY": "2", - "__TIMESTAMP": "2020-01-07T17:08:14.387Z", - "__STAMP": 2, - "Lastname": "Jones" - } - - -The 4D [REST API](REST_requests.md) provides various commands to interact with the 4D database. \ No newline at end of file +4. Mostre a página **Recursos web/REST** da caixa de diálogo das Propriedades do banco de dados e [marque a opção Exponer como servidor REST](configuration.md#starting-the-rest-server). + +5. No menu **Run**, selecione **Start Web Server** (se necessário) então selecione **Test Web Server**. + +4D exibe a página home padrão do 4D Web Server. + + +## Acessar dados 4D através do navegador + +Pode ler e editar dados com 4D apenas através de petições REST. + +Qualquer petição 4D Rest URL inicia com `/ rest`, para ser inserido depois da área `adress:port`. Por exemplo, para ver o que está dentro da 4D Datastore, pode escrever: + +``` +http://127.0.0.1/rest/$catalog +``` + +O servidor REST responde: + +``` +{ + "__UNIQID": "96A49F7EF2ABDE44BF32059D9ABC65C1", + "dataClasses": [ + { + "name": "Employees", + "uri": "/rest/$catalog/Employees", + "dataURI": "/rest/Employees" + } + ] +} +``` + +Significa que a datastore contém a dataclass Employees. Pode ver os atributos de classe de dados digitando: + +``` +/rest/$catalog/Employees +``` + +Se quiser obter todas as entidades da classe de dados Employee, pode escrever: + +``` +/rest/Employees +``` + +**Resposta:** + +``` +{ + "__entityModel": "Employees", + "__GlobalStamp": 0, + "__COUNT": 3, + "__FIRST": 0, + "__ENTITIES": [ + { + "__KEY": "1", + "__TIMESTAMP": "2020-01-07T17:07:52.467Z", + "__STAMP": 2, + "ID": 1, + "Lastname": "Brown", + "Firstname": "Michael", + "Salary": 25000 + }, + { + "__KEY": "2", + "__TIMESTAMP": "2020-01-07T17:08:14.387Z", + "__STAMP": 2, + "ID": 2, + "Lastname": "Jones", + "Firstname": "Maryanne", + "Salary": 35000 + }, + { + "__KEY": "3", + "__TIMESTAMP": "2020-01-07T17:08:34.844Z", + "__STAMP": 2, + "ID": 3, + "Lastname": "Smithers", + "Firstname": "Jack", + "Salary": 41000 + } + ], + "__SENT": 3 +} +``` + +Tem muitas possibilidades para filtrar dados a receber. Por exemplo, para obter só o valor de atributo "Lasname" da segunda entidade, pode escrever: + +``` +/rest/Employees(2)/Lastname +``` + +**Responsa:** + +``` +{ + "__entityModel": "Employees", + "__KEY": "2", + "__TIMESTAMP": "2020-01-07T17:08:14.387Z", + "__STAMP": 2, + "Lastname": "Jones" +} +``` + +A [REST API](REST_requests.md) oferece vários comandos para interagir com o banco de dados 4D. diff --git a/website/translated_docs/pt/REST/manData.md b/website/translated_docs/pt/REST/manData.md index 6944e030a71255..e74af51a58c0be 100644 --- a/website/translated_docs/pt/REST/manData.md +++ b/website/translated_docs/pt/REST/manData.md @@ -1,87 +1,96 @@ --- id: manData -title: Manipulating Data +title: Manipulação de dados --- -All [exposed datastore classes, attributes](configuration.md#exposing-tables-and-fields) and methods can be accessed through REST. Dataclass, attribute, and method names are case-sensitive; however, the data for queries is not. +Todos [os atributos, classes](configuration.md#exposing-tables-and-fields) e métodos da datastore expostos podem ser acessados através de REST. Os nomes de classes de dados, atributos e métodos são sensíveis às maiúsculas e minúsculas, entretanto, os dados das pesquisas não são. -## Querying data +## Pesquisas de dados -To query data directly, you can do so using the [`$filter`]($filter.md) function. For example, to find a person named "Smith", you could write: +Para pesquisar diretamente aos dados, pode fazer isso usando a função [`$filter`]($filter.md). Por exemplo, para encontrar a pessoa chamada "smith" poderia escrever: `http://127.0.0.1:8081/rest/Person/?$filter="lastName=Smith"` -## Adding, modifying, and deleting entities -With the REST API, you can perform all the manipulations to data as you can in 4D. -To add and modify entities, you can call [`$method=update`]($method.md#methodupdate). Before saving data, you can also validate it beforehand by calling [`$method=validate`]($method.md#methodvalidate). If you want to delete one or more entities, you can use [`$method=delete`]($method.md#methoddelete). -Besides retrieving one attribute in a dataclass using [{dataClass}({key})](%7BdataClass%7D_%7Bkey%7D.html), you can also write a method in your datastore class and call it to return an entity selection (or a collection) by using [{dataClass}/{method}](%7BdataClass%7D.html#dataclassmethod). +## Adicionar, modificar e apagar entidades -Before returning the collection, you can also sort it by using [`$orderby`]($orderby.md) one one or more attributes (even relation attributes). +Com o REST API, pode realizar todas as manipulações de dados que quiser em 4D. -## Navigating data +Para adicionar e modificar entidades, pode chamar [`$method=update`]($method.md#methodupdate). Se quiser apagar uma ou mais entidades, pode usar [`$method=delete`]($method.md#methoddelete). -Add the [`$skip`]($skip.md) (to define with which entity to start) and [`$top/$limit`]($top_$limit.md) (to define how many entities to return) REST requests to your queries or entity selections to navigate the collection of entities. +Além de recuperar uma única entidade em uma classe de dados utilizando [{dataClass}({key})](%7BdataClass%7D_%7Bkey%7D.html), também pode escrever um método em sua classe DataClass e chamá-lo para devolver uma seleção de entidades (ou uma coleção) utilizando [{dataClass}/{method}](%7BdataClass%7D.html#dataclassmethod). -## Creating and managing entity set +Antes de devolver a coleção, também pode ordená-la utilizando [`$orderby`]($orderby.md) um ou vários atributos (mesmo os atributos de relação). -An entity set (aka *entity selection*) is a collection of entities obtained through a REST request that is stored in 4D Server's cache. Using an entity set prevents you from continually querying your application for the same results. Accessing an entity set is much quicker and can improve the speed of your application. -To create an entity set, call [`$method=entityset`]($method.md#methodentityset) in your REST request. As a measure of security, you can also use [`$savedfilter`]($savedfilter.md) and/or [`$savedorderby`]($savedorderby.md) when you call [`$filter`]($filter.md) and/or [`$orderby`]($orderby.md) so that if ever the entity set timed out or was removed from the server, it can be quickly retrieved with the same ID as before. +## Navegando dados -To access the entity set, you must use `$entityset/{entitySetID}`, for example: +Adicione [`$skip`]($skip.md) (para definir qual entidade a iniciar) e [`$top/$limit`]($top_$limit.md) (para definir quantas entidades retornar) petições REST para suas pesquisas ou seleções de entidade para navegar a coleção de entidades. + + + +## Criar e gerenciar conjuntos de entidades + +Um conjunto de entidades (ou então *seleções de entidades*) é uma coleção de entidades obtidas através de petições REST que é armazenada no cache de 4D Server. Usar um conjunto de entidades previne que pesquise continuamente sua aplicação pelos mesmos resultados. Acessar um conjunto de entidades é mais rápido e pode melhorar a velocidade de sua aplicação. + +Para criar um conjunto de entidades, chame [`$method=entityset`]($method.md#methodentityset) em sua petição REST. Como uma medida de segurança, também pode usar [`$savedfilter`]($savedfilter.md) ou [`$savedorderby`]($savedorderby.md) quando chamar [`$filter`]($filter.md) ou [`$orderby`]($orderby.md) assim se o conjunto de entidade alguma ver for removido ou der time out no servidor, pode ser facilmente recuperado com a mesma ID que antes. + +Para acessar o conjunto de entidades, deve usar `$entityset/{entitySetID}`, por exemplo: `/rest/People/$entityset/0AF4679A5C394746BFEB68D2162A19FF` -By default, an entity set is stored for two hours; however, you can change the timeout by passing a new value to [`$timeout`]($timeout.md). The timeout is continually being reset to the value defined for its timeout (either the default one or the one you define) each time you use it. -If you want to remove an entity set from 4D Server's cache, you can use [`$method=release`]($method.md#methodrelease). +Como padrão, um conjunto de entidades é armazenado por duas horas; entretanto pode mudar o timeout ao passar um novo valor a [`$timeout`]($timeout.md). O timeout é continuamente resetado ao valor definido (seja o valor padrão ou um definido por você) a cada vez que for usado. -If you modify any of the entity's attributes in the entity set, the values will be updated. However, if you modify a value that was a part of the query executed to create the entity set, it will not be removed from the entity set even if it no longer fits the search criteria. Any entities you delete will, of course, no longer be a part of the entity set. +Se quiser remover um conjunto de entidades da cache 4D Server, pode usar [`$method=release`]($method.md#methodrelease). -If the entity set no longer exists in 4D Server's cache, it will be recreated with a new default timeout of 10 minutes. The entity set will be refreshed (certain entities might be included while others might be removed) since the last time it was created, if it no longer existed before recreating it. +Se modificar qualquer dos atributos de entidade no conjunto de entidades, o valor será atualizado. Entretanto, se modificar um valor que era uma parte da pesquisa executada para criar o conjunto de entidades, não será removido do conjunto de entidades mesmo se não se enquadrar mais nos critérios de pesquisa. Qualquer entidade que apagar não será mais parte do conjunto de entidades. -Using [`$entityset/{entitySetID}?$logicOperator... &$otherCollection`]($entityset.md#entitysetentitysetidoperatorothercollection), you can combine two entity sets that you previously created. You can either combine the results in both, return only what is common between the two, or return what is not common between the two. +Se o conjunto de entidades não existir mais no cache 4D Server, será recriada com um novo timeout padrão de 10 minutos. O conjunto de entidades será renovado (certas entidades podem ser incluidas e outras podem ser removidas) já que desde a última vez que foi criada, não existe mais antes da recriação). -A new selection of entities is returned; however, you can also create a new entity set by calling [`$method=entityset`]($method.md#methodentityset) at the end of the REST request. +Usando [`$entityset/{entitySetID}?$logicOperator... &$otherCollection`]($entityset.md#entitysetentitysetidoperatorothercollection), pode combinar dois conjuntos de entidade que foram previamente criados. Pode então combinar os resultados em ambos, retornar só o que é comum entre os dois, ou retornar o que não é comum entre os dois. -## Calculating data +Uma nova seleção de entidades é retornada, entretanto também pode criar um novo conjunto de entidades chamando [`$method=entityset`]($method.md#methodentityset) no fim da petição REST. -By using [`$compute`]($compute.md), you can compute the **average**, **count**, **min**, **max**, or **sum** for a specific attribute in a dataclass. You can also compute all values with the $all keyword. -For example, to get the highest salary: + +## Calcular dados + +Usando [`$compute`]($compute.md), pode computar **average**, **count**, **min**, **max**, ou **sum** para um atributo específico em uma classe de dados. Pode também computar todos os valores com a palavra chave $all. + +Por exemplo, para obter o maior salário: `/rest/Employee/salary/?$compute=sum` -To compute all values and return a JSON object: +Para computar todos os valores e retornar um objeto JSON: `/rest/Employee/salary/?$compute=$all` -## Getting data from methods -You can call 4D project methods that are [exposed as REST Service](%7BdataClass%7D.html#4d-configuration). A 4D method can return in $0: +## Obter dados de métodos -- an object -- a collection +Pode chamar métodos de projeto 4D que são [expostos como serviços REST](%7BdataClass%7D.html#4d-configuration). Um método 4D pode retornar em $0: -The following example is a dataclass method that reveives parameters and returns an object: +- um objeto +- uma coleção + +O exemplo abaixo é um método de classe de dados que recebe parâmetros e retorna um objeto: ```4d -// 4D findPerson method -C_TEXT($1;$firstname;$2;$lastname) +// método 4D findPerson C_TEXT($1;$firstname;$2;$lastname) $firstname:=$1 $lastname:=$2 -$0:=ds.Employee.query("firstname = :1 and lastname = :2";$firstname;$lastname).first().toObject() +$0:=ds. Employee.query("firstname = :1 and lastname = :2";$firstname;$lastname).first().toObject() ``` -The method properties are configured accordingly on the 4D project side: +As propriedades de método são configuradas de acordo com o lado do projeto 4D: ![alt-text](assets/en/REST/methodProp_ex.png) -Then you can send the following REST POST request, for example using the `HTTP Request` 4D command: +Pode então enviar a seguinte petição REST POST, por exemplo usando o comando 4D `HTTP Request`: ```4d C_TEXT($content) @@ -92,160 +101,170 @@ $content:="[\"Toni\",\"Dickey\"]" $statusCode:=HTTP Request(HTTP POST method;"127.0.0.1:8044/rest/Employee/findPerson";$content;$response) ``` -Method calls are detailed in the [{dataClass}](%7BdataClass%7D.html#dataclassmethod-and-dataclasskeymethod) section. - -## Selecting Attributes to get - -You can always define which attributes to return in the REST response after an initial request by passing their path in the request (*e.g.*, `Company(1)/name,revenues/`) - -You can apply this filter in the following ways: - -| Object | Syntax | Example | -| ---------------------- | --------------------------------------------------- | ------------------------------------------------------------- | -| Dataclass | {dataClass}/{att1,att2...} | /People/firstName,lastName | -| Collection of entities | {dataClass}/{att1,att2...}/?$filter="{filter}" | /People/firstName,lastName/?$filter="lastName='a@'" | -| Specific entity | {dataClass}({ID})/{att1,att2...} | /People(1)/firstName,lastName | -| | {dataClass}:{attribute}(value)/{att1,att2...}/ | /People:firstName(Larry)/firstName,lastName/ | -| Entity selection | {dataClass}/{att1,att2...}/$entityset/{entitySetID} | /People/firstName/$entityset/528BF90F10894915A4290158B4281E61 | - - -The attributes must be delimited by a comma, *i.e.*, `/Employee/firstName,lastName,salary`. Storage or relation attributes can be passed. - -### Examples - -Here are a few examples, showing you how to specify which attributes to return depending on the technique used to retrieve entities. - -You can apply this technique to: - -- Dataclasses (all or a collection of entities in a dataclass) -- Specific entities -- Entity sets - -#### Dataclass Example - -The following requests returns only the first name and last name from the People datastore class (either the entire datastore class or a selection of entities based on the search defined in `$filter`). - -`GET /rest/People/firstName,lastName/` - -**Result**: - - { - __entityModel: "People", - __COUNT: 4, - __SENT: 4, - __FIRST: 0, - __ENTITIES: [ - { - __KEY: "1", - __STAMP: 1, - firstName: "John", - lastName: "Smith" - }, - { - __KEY: "2", - __STAMP: 2, - firstName: "Susan", - lastName: "O'Leary" - }, - { - __KEY: "3", - __STAMP: 2, - firstName: "Pete", - lastName: "Marley" - }, - { - __KEY: "4", - __STAMP: 1, - firstName: "Beth", - lastName: "Adams" - } - ] - } - +As chamadas de métodos são detalhadas na seção [{dataClass}](%7BdataClass%7D.html#dataclassmethod-and-dataclasskeymethod). -`GET /rest/People/firstName,lastName/?$filter="lastName='A@'"/` +## Selecionar atributos a obter + +Sempre pode definir que atributos a retornar na resposta REST depois de uma petição inicial ao passar sua rota na petição (*e.g.*, `Company(1)/name,revenues/`) + +Pode aplicar esse filtro das maneiras a seguir: + +| Objeto | Sintaxe | Exemplo | +| --------------------- | --------------------------------------------------- | ------------------------------------------------------------- | +| Dataclass | {dataClass}/{att1,att2...} | /People/firstName,lastName | +| Coleção de entidades | {dataClass}/{att1,att2...}/?$filter="{filter}" | /People/firstName,lastName/?$filter="lastName='a@'" | +| Entidade especificada | {dataClass}({ID})/{att1,att2...} | /People(1)/firstName,lastName | +| | {dataClass}:{attribute}(value)/{att1,att2...}/ | /People:firstName(Larry)/firstName,lastName/ | +| Seleção de entidades | {dataClass}/{att1,att2...}/$entityset/{entitySetID} | /People/firstName/$entityset/528BF90F10894915A4290158B4281E61 | + +Os atributos devem ser delimitados por uma vírgula, *ou seja*, `/Employee/firstName,lastName,salary`. Os atributos de armazenamento ou relação podem ser passados. + + +### Exemplos +Aqui alguns exemplos, mostrando como especificar que atributos vai retornar dependendo da técnica usada para recuperar entidades. + +Pode aplicar essa técnica a: + +- Classes de dados (todas ou uma coleção de entidades em uma classe de dados) +- Entidades especificas +- Conjuntos de entidades + +#### Exemplo com uma dataclass + +As petições abaixo retornar apenas o primeiro nome e o último nome da classe de dados People (seja a classe de dados inteira ou a seleção de entidades baseada na pesquisa definida em`$filter`). + + `GET /rest/People/firstName,lastName/` -**Result**: - - { - __entityModel: "People", - __COUNT: 1, - __SENT: 1, - __FIRST: 0, - __ENTITIES: [ - { - __KEY: "4", - __STAMP: 4, - firstName: "Beth", - lastName: "Adams" - } - ] - } - - -#### Entity Example - -The following request returns only the first name and last name attributes from a specific entity in the People dataclass: - -`GET /rest/People(3)/firstName,lastName/` - -**Result**: - - { - __entityModel: "People", - __KEY: "3", - __STAMP: 2, - firstName: "Pete", - lastName: "Marley" - } - - -`GET /rest/People(3)/` - -**Result**: - - { - __entityModel: "People", - __KEY: "3", - __STAMP: 2, - ID: 3, - firstName: "Pete", - lastName: "Marley", - salary: 30000, - employer: { - __deferred: { - uri: "http://127.0.0.1:8081/rest/Company(3)", - __KEY: "3" - } + +**Resultado**: + +```` +{ + __entityModel: "People", + __COUNT: 4, + __SENT: 4, + __FIRST: 0, + __ENTITIES: [ + { + __KEY: "1", + __STAMP: 1, + firstName: "John", + lastName: "Smith" + }, + { + __KEY: "2", + __STAMP: 2, + firstName: "Susan", + lastName: "O'Leary" }, - fullName: "Pete Marley", - employerName: "microsoft" - - } - + { + __KEY: "3", + __STAMP: 2, + firstName: "Pete", + lastName: "Marley" + }, + { + __KEY: "4", + __STAMP: 1, + firstName: "Beth", + lastName: "Adams" + } + ] +} +```` + + +`GET /rest/People/firstName,lastName/?$filter="lastName='A@'"/` + +**Resultado**: + +```` +{ + __entityModel: "People", + __COUNT: 1, + __SENT: 1, + __FIRST: 0, + __ENTITIES: [ + { + __KEY: "4", + __STAMP: 4, + firstName: "Beth", + lastName: "Adams" + } + ] +} +```` + + +#### Exemplo entidade +As petições abaixo retornar apenas os atributos primeiro nome e último sobrenome de uma entidade especifica na dataclasse People: + + `GET /rest/People(3)/firstName,lastName/` + +**Resultado**: + +```` +{ + __entityModel: "People", + __KEY: "3", + __STAMP: 2, + firstName: "Pete", + lastName: "Marley" +} +```` + + + `GET /rest/People(3)/` + +**Resultadoi**: + +```` +{ + __entityModel: "People", + __KEY: "3", + __STAMP: 2, + ID: 3, + firstName: "Pete", + lastName: "Marley", + salary: 30000, + employer: { + __deferred: { + uri: "http://127.0.0.1:8081/rest/Company(3)", + __KEY: "3" + } + }, + fullName: "Pete Marley", + employerName: "microsoft" + +} +```` + +#### Exemplo de conjunto de Entidades + +Quanto tiver [criado um conjunto de entidade](#creating-and-managing-entity-set), pode filtrar a informação nele definindo quais atributos a retornar: -#### Entity Set Example + `GET /rest/People/firstName,employer.name/$entityset/BDCD8AABE13144118A4CF8641D5883F5?$expand=employer -Once you have [created an entity set](#creating-and-managing-entity-set), you can filter the information in it by defining which attributes to return: -`GET /rest/People/firstName,employer.name/$entityset/BDCD8AABE13144118A4CF8641D5883F5?$expand=employer +## Vendo um atributo de imagem -## Viewing an image attribute +Se quiser ver um atributo de imagem integralmente, escreva o abaixo: -If you want to view an image attribute in its entirety, write the following: + `GET /rest/Employee(1)/photo?$imageformat=best&$version=1&$expand=photo` -`GET /rest/Employee(1)/photo?$imageformat=best&$version=1&$expand=photo` +Para saber mais sobre formatos de imagem, veja [`$imageformat`]($imageformat.md). Para saber mais sobre parâmetros de versão, veja [`$version`]($version.md). -For more information about the image formats, refer to [`$imageformat`]($imageformat.md). For more information about the version parameter, refer to [`$version`]($version.md). +## Salvar um atributo BLOB ao disco -## Saving a BLOB attribute to disk +Se quiser salvar um BLOB armazenado na dataclass, pode escrever: -If you want to save a BLOB stored in your dataclass, you can write the following: + `GET /rest/Company(11)/blobAtt?$binary=true&$expand=blobAtt` -`GET /rest/Company(11)/blobAtt?$binary=true&$expand=blobAtt` -## Retrieving only one entity +## Recuperar apenas uma entidade -You can use the [`{dataClass}:{attribute}(value)`](%7BdataClass%7D.html#dataclassattributevalue) syntax when you want to retrieve only one entity. It's especially useful when you want to do a related search that isn't created on the dataclass's primary key. For example, you can write: +Pode usar a sintaxe[`{dataClass}:{attribute}(value)`](%7BdataClass%7D.html#dataclassattributevalue) quando quiser recuperar apenas uma entidade. É particularmente útil quando quiser fazer uma pesquisa relacionada que não seja criada com a mesma chave primária que a dataclass. Por exemplo, pode escrever: -`GET /rest/Company:companyCode("Acme001")` \ No newline at end of file + `GET /rest/Company:companyCode("Acme001")` + + diff --git a/website/translated_docs/pt/REST/{dataClass}.md b/website/translated_docs/pt/REST/{dataClass}.md index e6bb7bde7b9769..ffe32d265c904f 100644 --- a/website/translated_docs/pt/REST/{dataClass}.md +++ b/website/translated_docs/pt/REST/{dataClass}.md @@ -7,273 +7,286 @@ title: -Dataclass names can be used directly in the REST requests to work with entities, entity selections, or methods of the dataclass. +Os nomes das classes de dados podem ser usadas diretamente nas petições REST para trabalhar com entidades, seleções de entidades ou métodos da classe de dados. + +## Sintaxe + +| Sintaxe | Exemplo | Descrição | +| -------------------------------------------------------------------------- | --------------------------- | -------------------------------------------------------------------------------------------------- | +| [**{dataClass}**](#dataClass) | `/Employee` | Retorna todos os dados (como padrão as primeiras 100 entidades) para a dataclass | +| [**{dataClass}({key})**](#dataclasskey) | `/Employee(22)` | Retorna os dados para a entidade especifica definida pela chave primária da classe de dados | +| [**{dataClass}:{attribute}(value)**](#dataclassattributevalue) | `/Employee:firstName(John)` | Retorna os dados para uma entidade na qual os valores de atributo são definidas | +| [**{dataClass}/{method}**](#dataclassmethod-and-dataclasskeymethod) | `/Employee/getHighSalaries` | Executa um método projeto e devolve um objeto ou uma coleção (o método projeto deve estar exposto) | +| [**{dataClass}({key})/{method}**](#dataclassmethod-and-dataclasskeymethod) | `/Employee(22)/getAge` | Retona um valor baseado no método de entidade | -## Available syntaxes -| Syntax | Example | Description | -| -------------------------------------------------------------------------- | --------------------------- | ---------------------------------------------------------------------------------------------------- | -| [**{dataClass}**](#dataClass) | `/Employee` | Returns all the data (by default the first 100 entities) for the dataclass | -| [**{dataClass}({key})**](#dataclasskey) | `/Employee(22)` | Returns the data for the specific entity defined by the dataclass's primary key | -| [**{dataClass}:{attribute}(value)**](#dataclassattributevalue) | `/Employee:firstName(John)` | Returns the data for one entity in which the attribute's value is defined | -| [**{dataClass}/{method}**](#dataclassmethod-and-dataclasskeymethod) | `/Employee/getHighSalaries` | Executes a project method and returns an object or a collection (the project method must be exposed) | -| [**{dataClass}({key})/{method}**](#dataclassmethod-and-dataclasskeymethod) | `/Employee(22)/getAge` | Returns a value based on an entity method | ## {dataClass} -Returns all the data (by default the first 100 entities) for a specific dataclass (*e.g.*, `Company`) +Retorna todos os dados (como padrão as primeiras 100 entidades) para uma classe de dados específica (*por exemplo *, `Company`) -### Description +### Descrição -When you call this parameter in your REST request, the first 100 entities are returned unless you have specified a value using [`$top/$limit`]($top_$limit.md). +Quando chamar este parâmetro em sua petição REST, as primeiras 100 entidades são retornadas a menos que tenha especificado um valor usando [`$top/$limit`]($top_$limit.md). -Here is a description of the data returned: +Aqui está uma descrição dos dados retornados: -| Property | Type | Description | -| ------------- | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| __entityModel | String | Name of the datastore class. | -| __COUNT | Number | Number of entities in the datastore class. | -| __SENT | Number | Number of entities sent by the REST request. This number can be the total number of entities if it is less than the value defined by `$top/$limit`. | -| __FIRST | Number | Entity number that the selection starts at. Either 0 by default or the value defined by `$skip`. | -| __ENTITIES | Collection | This collection of objects contains an object for each entity with all its attributes. All relational attributes are returned as objects with a URI to obtain information regarding the parent. | +| Propriedade | Tipo | Descrição | +| ------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| __entityModel | String | Nome da dataclass. | +| __COUNT | Número | Número de entidades na classe de dados. | +| __SENT | Número | Número de entidades enviadas pela petição REST. Esse número pode ser o número total de entidades se for menor que o valor definido por `$top/$limit`. | +| __FIRST | Número | Número de entidade em que a seleção vai começar. Ou o valor padrão 0 ou o valor definido por `$skip`. | +| __ENTITIES | Coleção | Esta coleção de objetos contém um objeto para cada entidade com todos seus atributos. Todos os atributos relacionais são retornados como objetos com uma URI para obter informação sobre o objeto pai. | +Cada entidade contém as propriedades abaixo: -Each entity contains the following properties: +| Propriedade | Tipo | Descrição | +| ----------- | ------ | ------------------------------------------------------------------------------------------------------------- | +| __KEY | String | Valor da chave primária definida para a classe de dados. | +| __TIMESTAMP | Data | Registro de hora da última modificação da entidade | +| __STAMP | Número | Registro interno necessário quando modificar qualquer um dos valores na entidade quando usar`$method=update`. | -| Property | Type | Description | -| ----------- | ------ | ---------------------------------------------------------------------------------------------------------- | -| __KEY | String | Value of the primary key defined for the datastore class. | -| __TIMESTAMP | Date | Timestamp of the last modification of the entity | -| __STAMP | Number | Internal stamp that is needed when you modify any of the values in the entity when using `$method=update`. | +Se quiser especificar quais atributos quer retornar, defina-os usando a sintaxe abaixo [{atributo1, atributo2, ...}](manData.md##selecting-attributes-to-get). Por exemplo: + `GET /rest/Company/name,address` -If you want to specify which attributes you want to return, define them using the following syntax [{attribute1, attribute2, ...}](manData.md##selecting-attributes-to-get). For example: -`GET /rest/Company/name,address` -### Example +### Exemplo -Return all the data for a specific datastore class. +Retorna todas as datas para uma classe de dados específica. -`GET /rest/Company` + `GET /rest/Company` -**Result**: +**Resultado**: - { - "__entityModel": "Company", - "__GlobalStamp": 51, - "__COUNT": 250, - "__SENT": 100, - "__FIRST": 0, - "__ENTITIES": [ - { - "__KEY": "1", - "__TIMESTAMP": "2020-04-10T10:44:49.927Z", - "__STAMP": 1, - "ID": 1, - "name": "Adobe", - "address": null, - "city": "San Jose", - "country": "USA", - "revenues": 500000, - "staff": { - "__deferred": { - "uri": "http://127.0.0.1:8081/rest/Company(1)/staff?$expand=staff" - } +```` +{ + "__entityModel": "Company", + "__GlobalStamp": 51, + "__COUNT": 250, + "__SENT": 100, + "__FIRST": 0, + "__ENTITIES": [ + { + "__KEY": "1", + "__TIMESTAMP": "2020-04-10T10:44:49.927Z", + "__STAMP": 1, + "ID": 1, + "name": "Adobe", + "address": null, + "city": "San Jose", + "country": "USA", + "revenues": 500000, + "staff": { + "__deferred": { + "uri": "http://127.0.0.1:8081/rest/Company(1)/staff?$expand=staff" } - }, - { - "__KEY": "2", - "__TIMESTAMP": "2018-04-25T14:42:18.351Z", - "__STAMP": 1, - "ID": 2, - "name": "Apple", - "address": null, - "city": "Cupertino", - "country": "USA", - "revenues": 890000, - "staff": { - "__deferred": { - "uri": "http://127.0.0.1:8081/rest/Company(2)/staff?$expand=staff" - } + } + }, + { + "__KEY": "2", + "__TIMESTAMP": "2018-04-25T14:42:18.351Z", + "__STAMP": 1, + "ID": 2, + "name": "Apple", + "address": null, + "city": "Cupertino", + "country": "USA", + "revenues": 890000, + "staff": { + "__deferred": { + "uri": "http://127.0.0.1:8081/rest/Company(2)/staff?$expand=staff" } - }, - { - "__KEY": "3", - "__TIMESTAMP": "2018-04-23T09:03:49.021Z", - "__STAMP": 2, - "ID": 3, - "name": "4D", - "address": null, - "city": "Clichy", - "country": "France", - "revenues": 700000, - "staff": { - "__deferred": { - "uri": "http://127.0.0.1:8081/rest/Company(3)/staff?$expand=staff" - } + } + }, + { + "__KEY": "3", + "__TIMESTAMP": "2018-04-23T09:03:49.021Z", + "__STAMP": 2, + "ID": 3, + "name": "4D", + "address": null, + "city": "Clichy", + "country": "France", + "revenues": 700000, + "staff": { + "__deferred": { + "uri": "http://127.0.0.1:8081/rest/Company(3)/staff?$expand=staff" } - }, - { - "__KEY": "4", - "__TIMESTAMP": "2018-03-28T14:38:07.430Z", - "__STAMP": 1, - "ID": 4, - "name": "Microsoft", - "address": null, - "city": "Seattle", - "country": "USA", - "revenues": 650000, - "staff": { - "__deferred": { - "uri": "http://127.0.0.1:8081/rest/Company(4)/staff?$expand=staff" - } + } + }, + { + "__KEY": "4", + "__TIMESTAMP": "2018-03-28T14:38:07.430Z", + "__STAMP": 1, + "ID": 4, + "name": "Microsoft", + "address": null, + "city": "Seattle", + "country": "USA", + "revenues": 650000, + "staff": { + "__deferred": { + "uri": "http://127.0.0.1:8081/rest/Company(4)/staff?$expand=staff" } } - .....//more entities here - ] - } - + } +.....//mais entidades aqui + ] +} +```` + ## {dataClass}({key}) -Returns the data for the specific entity defined by the dataclass's primary key, *e.g.*, `Company(22) or Company("IT0911AB2200")` +Retorna os dados para a entidade específica definida pela chave primária da classe de dados, *e.g.*, `Company(22) ou Company("IT0911AB2200")` -### Description +### Descrição -By passing the dataclass and a key, you can retrieve all the public information for that entity. The key is the value in the attribute defined as the Primary Key for your datastore class. For more information about defining a primary key, refer to the **Modifying the Primary Key** section in the **Data Model Editor**. +Passando a classe de dados e uma chave, pode recuperar toda a informação pública para a entidade. Passando a classe de dados e uma chave, pode recuperar toda a informação pública para a entidade. Para saber mais sobre a definição de chave primária, veja a seção **Modifying the Primary Key** em **Data Model Editor**. -For more information about the data returned, refer to [{datastoreClass}](#datastoreclass). +Para saber mais sobre os dados retornados, veja [{datastoreClass}](#datastoreclass). -If you want to specify which attributes you want to return, define them using the following syntax [{attribute1, attribute2, ...}](manData.md##selecting-attributes-to-get). For example: +Se quiser especificar quais atributos quer retornar, defina-os usando a sintaxe abaixo [{atributo1, atributo2, ...}](manData.md##selecting-attributes-to-get). Por exemplo: -`GET /rest/Company(1)/name,address` + `GET /rest/Company(1)/name,address` -If you want to expand a relation attribute using `$expand`, you do so by specifying it as shown below: +Se quiser expandir o atributo de relação usando `$expand`, pode fazer isso como mostrado abaixo: -`GET /rest/Company(1)/name,address,staff?$expand=staff` + `GET /rest/Company(1)/name,address,staff?$expand=staff` -### Example +### Exemplo -The following request returns all the public data in the Company datastore class whose key is 1. +A petição abaixo retorna todos os dados públicos na dataclass Company cuja chave é 1. -`GET /rest/Company(1)` + `GET /rest/Company(1)` -**Result**: +**Resultado**: - { - "__entityModel": "Company", - "__KEY": "1", - "__TIMESTAMP": "2020-04-10T10:44:49.927Z", - "__STAMP": 2, - "ID": 1, - "name": "Apple", - "address": Infinite Loop, - "city": "Cupertino", - "country": "USA", - "url": http://www.apple.com, - "revenues": 500000, - "staff": { - "__deferred": { - "uri": "http://127.0.0.1:8081/rest/Company(1)/staff?$expand=staff" - } +```` +{ + "__entityModel": "Company", + "__KEY": "1", + "__TIMESTAMP": "2020-04-10T10:44:49.927Z", + "__STAMP": 2, + "ID": 1, + "name": "Apple", + "address": Infinite Loop, + "city": "Cupertino", + "country": "USA", + "url": http://www.apple.com, + "revenues": 500000, + "staff": { + "__deferred": { + "uri": "http://127.0.0.1:8081/rest/Company(1)/staff?$expand=staff" } } - +} +```` + + ## {dataClass}:{attribute}(value) -Returns the data for one entity in which the attribute's value is defined +Retorna os dados para uma entidade na qual os valores de atributo são definidas + +### Descrição -### Description +Passando *dataClass* e um *atributo* junto com o valor, pode recuperar toda a informação pública para essa entidade. O valor é um valor único para o atributo, mas não é a chave primária. -By passing the *dataClass* and an *attribute* along with a value, you can retrieve all the public information for that entity. The value is a unique value for attribute, but is not the primary key. + `GET /rest/Company:companyCode(Acme001)` -`GET /rest/Company:companyCode(Acme001)` +Se quiser especificar quais atributos quer retornar, defina-os usando a sintaxe abaixo [{atributo1, atributo2, ...}](manData.md##selecting-attributes-to-get). Por exemplo: -If you want to specify which attributes you want to return, define them using the following syntax [{attribute1, attribute2, ...}](manData.md##selecting-attributes-to-get). For example: + `GET /rest/Company:companyCode(Acme001)/name,address` -`GET /rest/Company:companyCode(Acme001)/name,address` +Se quiser usar um atributo de relação usando [$attributes]($attributes.md), pode fazer isso especificando-o como mostrado abaixo: -If you want to use a relation attribute using [$attributes]($attributes.md), you do so by specifying it as shown below: + `GET /rest/Company:companyCode(Acme001)?$attributes=name,address,staff.name` -`GET /rest/Company:companyCode(Acme001)?$attributes=name,address,staff.name` +### Exemplo -### Example +A petição abaixo retorna todos os dados públicos do funcionário chamado "Jones". -The following request returns all the public data of the employee named "Jones". + `GET /rest/Employee:lastname(Jones)` -`GET /rest/Employee:lastname(Jones)` ## {dataClass}/{method} and {dataClass}({key})/{method} -Returns an object or a collection based on a project method. +Retorna um objeto ou uma coleção baseada em um método projeto. -### Description +### Descrição -Project methods are called through a dataclass (table) or an entity (record), and must return either an object or a collection. +Os métodos projeto são chamados através de uma classe de dados (tabela) ou uma entidade (registro), e devem retornar ou um objeto ou uma coleção. `POST /rest/Employee/getHighSalaries` `POST /rest/Employee(52)/getFullName` -### 4D Configuration -To be called in a REST request, a method must: +### Configuração 4D -- have been declared as "Available through REST server" in 4D, -- have its master table and scope defined accordingly: - - **Table**: 4D table (i.e. dataclass) on which the method is called. The table must be [exposed to REST](configuration.md#exposing-tables-and-fields). - - **Scope**: This setting is useful when the method uses the 4D classic language and thus, needs to have a database context on the server side. - - **Table** -for methods applied to the whole table (dataclass) - - **Current record** -for methods applied to the current record (entity) using the `{dataClass}(key)/{method}` syntax. - - **Current selection** -for methods applied to the current selection +Para ser chamado em uma petição REST, um método deve: -![alt-text](assets/en/REST/MethodProp.png) +- ter sido declarado como "disponível via o servidor REST" em 4D, +- ter sua tabela mestre e escopo definidos de forma coerente: + - **Tabela**: tabela 4D (classe de dados) na qual o método é chamado. A tabela deve ser [exposta a REST](configuration.md#exposing-tables-and-fields). + - **Escopo/alcance**: Essa configuração é útil quando o método usar a linguagem clássica 4D e assim precisar ter um contexto de database no lado do servidor. + - **Tabela** -para métodos aplicados para a tabela inteira (dataclass) + - **Registro atual** -para os métodos aplicados ao registro atual (entidade) utilizando a sintaxe `{dataClass}(key)/{method}`. + - **Seleção atual** -para os métodos aplicados à seleção atual -### Passing Parameters to a Method +![alt-text](assets/en/REST/methodProp_ex.png) -You can also pass parameters to a method in a POST. + +### Passar parâmetros a um Método + +Também pode passar parâmetros a um método e um POST. `POST /rest/Employee/addEmployee` -You can POST data in the body part of the request, for example: +Pode fazer um POST de dados no corpo da consulta, por exemplo: ["John","Smith"] -### Examples -#### Table scope -Call of a `getAverage` method: -- on [Employee] table -- with **Table** scope +### Exemplos + +#### Alcance da tabela + +Chamada de um método `getAverage`: +- na tabela [Employee] +- com o alcance de **Table** + ```4d - //getAverage -ALL RECORDS([Employee]) + //getAverage ALL RECORDS([Employee]) $0:=New object("ageAverage";Average([Employee]age)) ``` `POST /rest/Employee/getAverage` -Result: - - { - "result": { - "ageAverage": 44.125 - } +Resultado: +``` +{ + "result": { + "ageAverage": 44.125 } - +} +``` + -#### Current record scope -Call of a `getFullName` method: +#### Alcance do registro atual -- on [Employee] table -- with **Current record** scope +Chamada de um método `getFullName`: +- na tabela [Employee] +- com o alcance de **Current record** ```4d //getFullName @@ -282,46 +295,46 @@ $0:=New object("fullName";[Employee]firstname+" "+[Employee]lastname) `POST /rest/Employee(3)/getFullName` -Result: - - { - "result": { - "fullName": "John Smith" - } +Resultado: +``` +{ + "result": { + "fullName": "John Smith" } - +} +``` -#### Current selection scope -Call of a `updateSalary` method: -- on [Employee] table -- with **Current selection** scope +#### Alcance da seleção atual + +Chamada de um método `updateSalary`: +- na tabela [Employee] +- com o alcance de **Current selection** ```4d - //updateSalary -C_REAL($1;$vCount) + //updateSalary C_REAL($1;$vCount) READ WRITE([Employee]) -$vCount:=0 -FIRST RECORD([Employee]) +$vCount:=0 FIRST RECORD([Employee]) While (Not(End selection([Employee])) [Employee]salary:=[Employee]salary * $1 SAVE RECORD([Employee]) $vCount:=$vCount+1 NEXT RECORD([Employee]) -End while -UNLOAD RECORD([Employee]) +End while UNLOAD RECORD([Employee]) $0:=New object("updates";$vCount) ``` `POST /rest/Employee/updateSalary/?$filter="salary<1500"` -POST data (in the request body): [1.5] +Datos POST (no corpo da petição): [1.5] -Result: +Resultado: +``` +{ + "result": { + "ageAverage": 42 + } +} +``` - { - "result": { - "updated": 42 - } - } \ No newline at end of file diff --git a/website/translated_docs/pt/Users/handling_users_groups.md b/website/translated_docs/pt/Users/handling_users_groups.md index 4150c3de1456aa..d8864c2fc1c27d 100644 --- a/website/translated_docs/pt/Users/handling_users_groups.md +++ b/website/translated_docs/pt/Users/handling_users_groups.md @@ -1,118 +1,119 @@ --- id: editing -title: Managing 4D users and groups +title: Gestão de usuários e grupos 4D --- -## Designer and Administrator +## Designer e Administrador -4D provides users with certain standard access privileges and certain powers. Once a users and groups system has been initiated, these standard privileges take effect. +4D fornece aos usuários privilégios de acesso comuns e certos poderes. Quando o usuário e sistema de grupos tiver sido iniciado, esses privilégios começam a funcionar. -The most powerful user is named **Designer**. No aspect of the database is closed to the Designer. The Designer can: +O usuário mais poderoso é chamado **Designer**. Nenhum aspecto do banco de dados é fechado ao Designer. O Designer pode: +- acessar todos os servidores de banco de dados sem restrição, +- criar usuários e grupos, +- atribuir privilégios de acesso a grupos, +- acessar o ambiente Design. Em ambiente monousuário, direitos de acesso de Designer são sempre usados. Em ambiente cliente/servidor, atribuir uma senha ao Designer ativa a exibição do diálogo de login de usuário 4D. Acesso ao ambiente Design é apenas leitura. -- access all database servers without restriction, -- create users and groups, -- assign access privileges to groups, -- access the Design environment. In single-user environment, Designer access rights are always used. In client/server environment, assigning a password to the Designer activates the display of the 4D user login dialog. Access to Design environment is read-only. +Depois do Designer, o usuário mais poderoso é o **Administrador**, ao qual é geralmente dada a tarefa de gerenciamento de acesso ao sistema e administração de funcionalidades. -After the Designer, the next most powerful user is the **Administrator**, who is usually given the tasks of managing the access system and administration features. +O administrador pode: +- criar usuários e grupos, +- acessar ao monitor e janela de Administração 4D Server +- acessar a janela MSC para gerenciar cópias de segurança, restaurações ou servidor. -The Administrator can: +O Administrador não pode: +- editar o usuário Designer +- como padrão, acessar as partes protegidas do banco de dados. O Administrador não pode acessar o modo Design se for restringido. O Administrador não pode acessar o modo Design se for restringido. O administrador é inscrito em todo novo grupo, mas é possível remover o nome do Administrador de qualquer grupo. -- create users and groups, -- access the 4D Server Administration window and monitor -- access the MSC window to monitor backup, restore, or server. +Tanto o Designer quanto o Administrador estão disponíveis como padrão em todos os bancos de dados. No diálogo de [gestão de usuários](#users-and-groups-editor), os ícones de Designer e Administrator são exibidos em verde e vermelho, respectivamentes: -The Administrator cannot: +- Ícone Designer: ![](assets/en/Users/iconDesigner.png) +- Ícone de Administrador: ![](assets/en/Users/iconAdmin.png) -- edit the Designer user -- by default, access to protected parts of the database. In particular, the Administrator cannot access to the Design mode if it is restricted. The Administrator must be part of one or more groups to have access privileges in the database. The Administrator is placed in every new group, but you can remove the Administrator’s name from any group. +Pode renomear os usuários Designer e Administardor. Na linguagem, o ID de Designer é sempre 1 e a ID de Administrador é sempre 2. -Both the Designer and Administrator are available by default in all databases. In the [user management dialog box](#users-and-groups-editor), the icons of the Designer and Administrator are displayed in red and green respectively: +O Designer e Administrador podem cada um criar até 16.000 grupos e 16 mil usuários. -- Designer icon: ![](assets/en/Users/IconDesigner.png) -- Administrator icon: ![](assets/en/Users/IconAdmin.png) -You can rename the Designer and Administrator users. In the language, the Designer ID is always 1 and the Administrator ID is always 2. -The Designer and Administrator can each create up to 16,000 groups and 16,000 users. +## Editor de usuários -## Users editor - -The editor for users is located in the Toolbox of 4D. +O editor de usuários está na Barra de Ferramentas de 4D. ![](assets/en/Users/editor.png) -### Adding and modifying users +### Adicionar e modificar usuários + +Para usar o editor de usuários para criar contas de usuário, estabeleça as propriedades e atribua aos vários grupos. -You use the users editor to create user accounts, set their properties and assign them to various groups. +Para adicionar um usuário da Barra de Ferramentas: -To add a user from the Toolbox : +1. Selecione **Tool Box > Users** do menu**Design** ou clique no botão **Tool Box** da barra 4D. 4D exibe o editor de usuários. -1. Select **Tool Box > Users** from the **Design** menu or click on the **Tool Box** button of the 4D toolbar. 4D displays the users editor. +A lista de usuários exibe todos os usuários, incluindo o[Designer and the Administrator](#designer-and-administrator). -The list of users displays all the users, including the [Designer and the Administrator](#designer-and-administrator). +2. Clique no botão ![](assets/en/Users/PlussNew.png) que está abaixo da lista de usuários. OU Dê um clique direito na lista de usuários e escolha **Add** ou **Duplicate** no menu contextual. -2. Click on the ![](assets/en/Users/PlussNew.png) button located below the list of users. OR Right-click in the list of users and choose **Add** or **Duplicate** in the context menu. +> O comando **Duplicate** pode ser usado para criar rapidamente vários usuários com as mesmas características. -> The **Duplicate** command can be used to create several users having the same characteristics quickly. +4D adiciona um novo usuário para a lista, chamado "Novo usuárioX" como padrão. -4D adds a new user to the list, named "New userX" by default. +3. Digite o nome de usuário. O nome será usado pelo usuário para abrir o banco de dados. Pode renomear um usuário a qualquer momento usando o comando **Rename** do menu contextual ou usando os atalhos Alt+clique (Windows) ou Opção+clique (macOS), ou ainda clicando duas vezes no nome que quiser mudar. -3. Enter the user name. This name will be used by the user to open the database. You can rename a user at any time using the **Rename** command of the context menu, or by using the Alt+click (Windows) or Option+click (macOS) shortcuts, or by clicking twice on the name you want to change. +4. Para digitar uma senha para o usuário, clique o botão **Edit...** na área de propriedades de usuário e digite a senha daus vezes na caixa de diálogo. Pode usar até 15 caracteres alfanuméricos para a senha. O editor de senhas é sensível a maiúsculas ou minúsculas. -4. To enter a password for the user, click the **Edit...** button in the user properties area and enter the password twice in the dialog box. You can use up to 15 alphanumeric characters for a password. The password editor is case sensitive. +> Os usuários podem mudar suas senhas a qualquer momento de acordo com as opções na página "Segurança" das configurações de banco de dados ou usando o comando `CHANGE PASSWORD`. -> Users can change their password at any time according to the options in the "Security" page of the database settings, or using the `CHANGE PASSWORD` command. +5. Estabeleça os grupos aos quais o usuário vai pertencer com a tabela "Membro de Grupos". Pode adicionar ou remover os usuários selecionados de ou para um grupo marcando a opção correspondente na coluna Membro. -5. Set the group(s) to which the user belongs using the "Member of Groups" table. You can add or remove the selected user to/from a group by checking the corresponding option in the Member column. +A adesão do usuário aos diferentes grupos também pode ser estabelecida por grupo na página [Grupos](#configuring-access-groups). -The membership of users to different groups can also be set by group on the [Groups page](#configuring-access-groups). +### Apagar um usuário -### Deleting a user +Para apagar um usuário, selecione-o e clique no botão apagar ou use o comando **Delete** no menu contextual. ![](assets/en/Users/MinussNew.png) -To delete a user, select it then click the deletion button or use the **Delete** command of the context menu. ![](assets/en/Users/MinussNew.png) +Usuários deletados não aparecem mais no editor de Usuários. Note que as IDs de usuários deletados são retribuídas quando novas contas de usuário forem criadas. -Deleted user names no longer appear in the Users editor. Note that the IDs for deleted users are reassigned when new user accounts are created. +### Propriedades de usuário -### User properties +- **Tipo de usuário**: O campo Tipo de usuário/User Kind contém "Designer", "Administrador", ou (Para todos os outros usuários) "Usuário". -- **User Kind**: The User Kind field contains "Designer", "Administrator", or (for all other users) "User". +- **Método de início Method**: Nome do método associado que será executado automaticamente quando o usuário abrir o banco de dados (opcional). Esse método pode ser usado por exemplo para carregar as preferências de usuário. -- **Startup Method**: Name of an associated method that will be automatically executed when the user opens the database (optional). This method can be used for example to load the user preferences. -## Groups editor +## Editor de grupos -The editor for groups is located in the Toolbox of 4D. +O editor para grupos está na Barra de ferramentas de 4D. -### Configuring groups +### Grupos de configuração -You use the groups editor to set the elements that each group contains (users and/or other groups) and to distribute access to plug-ins. +Pode usar o editor de grupos para estabelecer os elementos que cada grupo conter (usuários ou outros grupos) e distribuir acesso aos plug-ins. -Keep in mind that once a group has been created, it cannot be deleted. If you want to deactivate a group, you just need to remove any users it contains. +Lembre que se um grupo for criado não pode ser apagado. Se quiser desativar um grupo, precisa remover primeiro todos seus usuários. -To create a group: +Para criar um gurpo: -1. Select **Tool Box > Groups** in the **Design** menu or click on the **Tool Box** button of the 4D toolbar then on the **Groups** button. 4D displays the groups editor window. The list of groups displays all the groups of the database. +1. Selecione **Tool Box > Grupos** no menu **Design** ou clique no botão **Tool Box** da barra 4D e depois no botão **Grupos**. 4D exibe a janela de editor de grupos. A lista de grupos exibe todos os grupos do banco de dados. -2. Click on the ![](assets/en/Users/PlussNew.png) button located below the list of groups. - OR - Right-click in the list of groups and choose the **Add** or **Duplicate** command in the context menu. +2. Clique no botão ![](assets/en/Users/PlussNew.png) abaixo da lista de grupos. + OR + Dê um clique direito na lista de grupos e escolha os comandos **Add** or **Duplicate** no menu contextual. -> The Duplicate command can be used to create several groups having the same characteristics quickly. +> O comando Dupplicate/Duplicar pode ser usado para criar vários grupos tendo as mesmas características. -4D adds a new group to the list, named "New groupX" by default. +4D adiciona um novo grupo para a lista, chamado "Novo grupoX". -3. Enter the name of the new group. The group name can be up to 15 characters long. You can rename a group at any time using the **Rename** command of the context menu, or by using the Alt+click (Windows) or Option+click (macOS) shortcuts, or by clicking twice on the name you want to change. +3. Digite o nome do novo grupo. O nome de grupo pode ter até 15 caracteres. Pode renomear um grupo a qualquer momento usando o comando **Rename** ou o menu contextual, ou usando os atalhos Alt+clique (Windows) ou Opção+clique (macOS), ou clicando duas vezes no nome que quer mudar. -### Placing users or groups into groups -You can place any user or group into a group, and you can also place the group itself into several other groups. It is not mandatory to place a user in a group. +### Colocar usuários ou grupos dentro de grupos -To place a user or group in a group, you simply need to check the "Member" option for each user or group in the member attribution area: +Pode colocar qualquer usuário ou grupo dentro de um grupo, e pode também colocar um grupo dentro de vários outros grupos. Não é obrigatório colocar um usuário em um grupo. + +Para colocar um usuário ou grupo em um grupo, precisa marcar a opção "Membro" para cada usuário ou grupo na área de atribuição de membros: ![](assets/en/Users/groups.png) -If you check the name of a user, this user is added to the group. If you check the name of a group, all the users of the group are added to the new group. The affiliated user or group will then have the same access privileges as those assigned to the new group. +Se marcar o nome de usuário, esse usuário é adicionado ao grupo. Se marcar o nome de um grupo, todos os usuários do grupo serão adicionados ao novo grupo. The affiliated user or group will then have the same access privileges as those assigned to the new group. Placing groups into other groups lets you create a user hierarchy. The users of a group placed in another group will have the access privileges of both groups. See "[An access hierarchy scheme](#an-access-hierarchy-scheme)" below. @@ -132,6 +133,7 @@ The “Plug-in” area on the Groups page of the tool box lists all the plug-ins The **4D Client Web Server** and **4D Client SOAP Server** items lets you control the possibility of Web and SOAP (Web Services) publication for each 4D in remote mode. These licenses are considered as plug-in licenses by 4D Server. Therefore, in the same way as for plug-ins, you can restrict the right to use these licenses to a specific group of users. + ### An access hierarchy scheme The best way to ensure the security of your database and provide users with different levels of access is to use an access hierarchy scheme. Users can be assigned to appropriate groups and groups can be nested to create a hierarchy of access rights. This section discusses several approaches to such a scheme. @@ -148,4 +150,4 @@ The groups are then nested so that privileges are correctly distributed to the u You can decide which access privileges to assign to each group based on the level of responsibility of the users it includes. -Such a hierarchical system makes it easy to remember to which group a new user should be assigned. You only have to assign each user to one group and use the hierarchy of groups to determine access. \ No newline at end of file +Such a hierarchical system makes it easy to remember to which group a new user should be assigned. You only have to assign each user to one group and use the hierarchy of groups to determine access. diff --git a/website/translated_docs/pt/Users/overview.md b/website/translated_docs/pt/Users/overview.md index b7c5ab0c7d29da..fe7c331043a6e6 100644 --- a/website/translated_docs/pt/Users/overview.md +++ b/website/translated_docs/pt/Users/overview.md @@ -1,59 +1,71 @@ --- -id: overview -title: Overview +id: visão Geral +title: Visão Geral --- -If more than one person uses a database, which is usually the case in client-server architecture or Web interfaces, you need to control access or provide different features according to the connected users. It is also essential to provide security for sensitive data. You can provide this security by assigning passwords to users and creating access groups that have different levels of access to information in the database or to database operations. +Se mais que uma pessoa usar um banco de dados, o que é o caso em arquitetura cliente-servidor e interfaces web, é preciso controlar o acesso ou oferecer funcionalidades diferentes de acordo com o tipo de usuário conectado. É essencial para segurança de dados sensíveis. Pode oferecer essa segurança através de senhas de usuários e grupos de acesso com graus diferentes de acesso às informações do banco de dados ou às operações do banco. -> For an overview of 4D's security features, see the [4D Security guide](https://blog.4d.com/4d-security-guide/). +> Para uma visão geral das funções de segurança de 4D, consulte o [Guia de segurança de 4D](https://blog.4d.com/4d-security-guide/). -## Assigning group access -4D’s password access system is based on users and groups. You create users and assign passwords, put users in groups, and assign each group access rights to appropriate parts of the database. -Groups can then be assigned access privileges to specific parts or features of the database (Design access, HTTP server, SQL server, etc.), or any custom part. -The following example shows Design and Runtime explorer access rights being assigned to the "Devs" group: + +## Atribuir grupos de acesso + +O sistema de senhas de acesso é baseado em usuários e grupos. Pode criar usuários e atribuir senhas, colocar usuários em grupos, e dar a cada grupo direitos a partes apropriadas do banco de dados. + +Grupos podem então atribuir privilégios de acesso a partes específicar ou à funcionalidades do banco de dados (acesso ao modo Design, servidor HTTP, servidor SQL, etc) ou a qualquer parte personalizada. + +O exemplo abaixo mostra direitos de acesso ao explorador de Execução e ao Design sendo atribuidos ao grupo "Devs": ![](assets/en/Users/Access1.png) -## Activating access control -You initiate the 4D password access control system in client-server by **assigning a password to the Designer**. -Until you give the Designer a password, all database access are done with the Designer's access rights, even if you have set up users and groups (when the database opens, no ID is required). Any part of the database can be opened. +## Ativar controles de acesso + +Se inicia o sistema de controle de senhas de acesso 4D em cliente-servidor **atribuindo uma senha ao Designer**. + +Até que dê ao Designer uma senha, todos os acessos ao banco de dados são feitos com os direitos de acesso de Designer, mesmo que tenha estabelecido usuários e grupos (quando o banco abrir, nenhuma ID é exigida). Qualquer parte do banco pode ser aberta. -When a password is assigned to the Designer, all the access privileges take effect. In order to connect to the database, remote users must enter a password. +Quando uma senha for estabelecida para o Designer, todos os privilégios de acesso têm efeito. Para se conectar ao banco de dados, usuários remotos precisam entrar a senha. -To disable the password access system, you just need to remove the Designer password. +Para desativar o sistema de acesso a senhas, precisa remover a senha Designer. -## Users and groups in project architecture -In project databases (.4DProject or .4dz files), 4D users and groups can be configured in both single-user and client-server environments. However, access control is only effective in 4D Server databases. The following table lists the main users and groups features and their availability: +## Usuários e grupos em arquitetura de projeto -| | 4D Developer (single-user) | 4D Server | -| ------------------------------------------------------------- | ---------------------------- | --------- | -| Adding/editing users and groups | yes | yes | -| Assigning user/group access to servers | yes | yes | -| User identification | no (all users are Designer) | yes | -| Access control once the Designer has been assigned a password | no (all access are Designer) | yes | +Em bancos de dados projeto (arquivos .4DProject ou .4dz) usuários 4D e grupos podem ser configurados em ambientes monousuário e cliente servidor. Entretanto, controles de acesso são efetivos apenas em bancos de dados 4D Server. A tabela abaixo lista as principais funcionalidades de usuários e grupos e sua disponibilidade: +| | 4D Developer (monousuário) | 4D Server | +| ---------------------------------------------------------- | ------------------------------------ | --------- | +| Adicionar/editar usuários e grupos | sim | sim | +| Atribuir acesso de usuário/grupo a servidores | sim | sim | +| Identificação de usuário | não (todos os usuários são Designer) | sim | +| Controle de acesso quando o Designer for atribuído a senha | não (todos os acessos são Designer) | sim | -## Toolbox editor -The editors for users and groups are located in the toolbox of 4D. These editors can be used to create both users and groups, assign passwords to users, place users in groups, etc. + + + +## Editor de toolbox + +Os editores para usuários e grupos estão na barra de ferramentas de 4D. Esses editores podem ser usados para criar grupos ou usuários, atribuir senhas a usuários, colocar usuários em grupos, etc. ![](assets/en/Users/editor.png) -> Users and groups editor can be displayed at runtime using the [EDIT ACCESS](https://doc.4d.com/4Dv18/4D/18/EDIT-ACCESS.301-4504687.en.html) command. +> O editor de usuários e grupos pode ser exibido em execução com ajuda do comando [EDIT ACCESS](https://doc.4d.com/4Dv18/4D/18/EDIT-ACCESS.301-4504687.en.html). + + ## Directory.json file -Users, groups, as well as their access rights are stored in a specific database file named **directory.json**. +Os usuários, grupos, assim como seus direitos de acesso são armazenados em um arquivo específico do banco de dados chamado **directory.json**. -This file can be stored at the following locations: +Este arquivo pode ser armazenado nos locais abaixo: -- in the user database settings folder, i.e. in the "Settings" folder at the same level as the "Project" folder. These settings are used by default for the database. -- in the data settings folder, i.e. in the "Settings" folder in the "Data" folder. If a directory.json file is present at this location, it takes priority over the file in the user database settings folder. This feature allows you to define custom/local Users and Groups configurations. The custom configuration will left untouched by a database upgrade. +- na pasta de configurações de usuário, ou seja, na pasta "Settings" no mesmo nível que a pasta "Project". Essas configurações são usadas como padrão para o banco de dados. +- na pasta de configurações de dados, ou seja na pasta "Settings" na pasta "Data". Se um arquivo directory.json estiver presente nesse local, tem prioridade sobre o arquivo na pasta Settings do banco usuário. Essa funcionalidade permite que se defina usuários locais/personalizados e configurações de Grupos. A configuração personalizada não será afetada por atualizações no banco de dados. -> If users and groups management is not active, the directory.json is not created. \ No newline at end of file +> Se gerenciamento de grupos e usuários não estiver ativo, directory.json não é criado.